You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.cpp
+1-7Lines changed: 1 addition & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,7 @@
10
10
11
11
voidinterruptDoorFunction() // Interrupt Function for DoorSwitch
12
12
{
13
-
long diff = millis() - oldTime;
14
-
if (diff < 0) //The millis() function will overflow (go back to zero), after approximately 50 days. (Max value = 4.294.967.295)
15
-
{
16
-
diff=debounceTime;
17
-
}
18
-
19
-
if (millis() - oldTime >= debounceTime) // Debouncing/Entprellung Switch
13
+
if (millis() - oldTime > debounceTime) // Debouncing/Entprellung Switch - The millis() function will overflow (go back to zero), after approximately 50 days. (Max value = 4.294.967.295)
20
14
{
21
15
door_state = 0;
22
16
watchdog = 0; // Real Alarm // Watchdog/Heartbeat, Differentiation between watchdog and real alarm. 1=WatchDogSignal 0=Real DoorAlarm
0 commit comments