From f0e15a1fd7af6990199d16143585c1f359693eae Mon Sep 17 00:00:00 2001 From: Kevin Santo Cappuccio Date: Sun, 18 Feb 2024 17:52:28 -0800 Subject: [PATCH] add a double button press timer --- JumperlessNano/src/Probing.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/JumperlessNano/src/Probing.cpp b/JumperlessNano/src/Probing.cpp index 1ae748a..9aa34c2 100644 --- a/JumperlessNano/src/Probing.cpp +++ b/JumperlessNano/src/Probing.cpp @@ -149,12 +149,13 @@ restartProbing: row[0] = scanRows(ADC0_PIN); - if (row[0] == -18 && (millis() - probingTimer > 500) && checkProbeButton() == 1 && millis() - probeButtonTimer > 1500) + if (row[0] == -18 && (millis() - probingTimer > 500) && checkProbeButton() == 1 && millis() - probeButtonTimer > 1000) { - if (longShortPress(1000) == 1) + if (longShortPress(750) == 1) { setOrClear = !setOrClear; probingTimer = millis(); + probeButtonTimer = millis(); goto restartProbing; break; } @@ -218,7 +219,8 @@ restartProbing: node1or2++; probingTimer = millis(); - // showLEDsCore2 = 1; + probeButtonTimer = millis(); + showLEDsCore2 = 2; delay(30); } else if (connectedRowsIndex == 1)