Closed Inhumierer closed 10 years ago
This is not the desired behavior. See description on homepage. Only one packet is to be sent in every cycle. This is to not "overload" the air traffic. The user has to set up the wake-up cycle according to his measuring interval so every packet can be sent from time to time.
But then you will have to fix it in another way. In the current implementation the brightness status is not sent at all.
Setting all Intervals to 1 when 3 sensors are set up is a misconfiguration by the user. Assuming three sensors, he should set all MeasuringIntervals to 3, all AveragingIntervals to 1 and then everything is fine. Of course, the firmware could detect and "correct" that (by overriding the Intervals), but I'm not sure if this is needed.
There was a bug in the workflow of generating & sending packets, if MeasuringInterval & AveringInterval of 2 sensors are all set to 1, to send a value every time the device wakes up by timer. Only the first value is sent, the other is collected forever. Sending the packet moved to a subroutine, gets called for every value which has reached the counter. Switch the LED on while the encrypted packet is sent to the RFM12B buffer, no need to wait every time.