mysensors / NodeManager

Plugin for a rapid development of battery-powered sensors
130 stars 82 forks source link

Fix bug where loop() is run for ALL sensors after an interrupt #506

Closed liwenyip closed 4 years ago

liwenyip commented 4 years ago

Fix to ensure intended behaviour for SensorDoor (and other interrupt sensors) - when the SensorDoor changes state, the node should wake up, report the value of SensorDoor only, then go straight back to sleep.

What it actually did (before this fix) is wake up, skip over all sensors with a child_id lower than the SensorDoor, report on SensorDoor, then report on all the sensors with a child_id higher than the SensorDoor, before going back to sleep.

user2684 commented 4 years ago

Good catch, never noticed this weird behavior! Merging it