File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,12 @@ bool MySensor::isValidFirmware() {
95
95
96
96
#ifdef WITH_LEDS_BLINKING
97
97
void MySensor::handleLedsBlinking () {
98
- static unsigned long next_time = hw_millis () + ledBlinkPeriod;
99
-
100
98
// Just return if it is not the time...
101
99
// http://playground.arduino.cc/Code/TimingRollover
102
- if ((long )(hw_millis () - next_time ) < 0 )
100
+ if ((long )(hw_millis () - blink_next_time ) < 0 )
103
101
return ;
104
102
else
105
- next_time = hw_millis () + ledBlinkPeriod;
103
+ blink_next_time = hw_millis () + ledBlinkPeriod;
106
104
107
105
// do the actual blinking
108
106
if (countRx && countRx != 255 ) {
Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ class MySensor
361
361
362
362
unsigned long ledBlinkPeriod;
363
363
void handleLedsBlinking (); // do the actual blinking
364
+ unsigned long blink_next_time;
364
365
#endif
365
366
366
367
MyTransport& radio;
You can’t perform that action at this time.
0 commit comments