Skip to content

Commit 12bf3f6

Browse files
committed
Updated if statement
1 parent 54b33f4 commit 12bf3f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

E15-drukknop-long-press/drukknop-long-press.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ void readButtonState() {
7777

7878
// Als er geen meting loopt voor het bepalen of de knop lang is ingedrukt EN
7979
// Als de tijd dat de knop is ingedrukt kleiner is dan de minimale tijd die nodig is voor een lang ingedrukte knop
80-
if (!buttonStateLongPress && buttonPressDuration < minButtonLongPressDuration) {
80+
// Note: In de video staat:
81+
// if (!buttonStateLongPress && buttonPressDuration < minButtonLongPressDuration) {
82+
// omdat buttonStateLongPress op regel 75 op FALSE wordt gezet, is !buttonStateLongPress altijd TRUE
83+
// dit kan dus worden weggehaald.
84+
if (buttonPressDuration < minButtonLongPressDuration) {
8185
Serial.println("Knop kort ingedrukt");
8286
}
8387
}

0 commit comments

Comments
 (0)