Skip to content

Commit 9332bc3

Browse files
committed
Allow button presses on non-display platforms
1 parent fae0216 commit 9332bc3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Firmware/RTK_Everywhere/Tasks.ino

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,9 +1575,11 @@ void buttonCheckTask(void *e)
15751575
if ((previousButtonRelease > 0) && (thisButtonRelease > 0) &&
15761576
((thisButtonRelease - previousButtonRelease) <= doubleTapInterval)) // Do we have a double tap?
15771577
{
1578-
// Do not register button taps until the system is displaying the menu
1579-
if (systemState == STATE_DISPLAY_SETUP)
1578+
// Do not register button tap until the system is displaying the menu
1579+
// If this platform doesn't have a display, then register the button tap
1580+
if (systemState == STATE_DISPLAY_SETUP || present.display_type == DISPLAY_MAX_NONE)
15801581
{
1582+
Serial.println("Double tap");
15811583
doubleTap = true;
15821584
singleTap = false;
15831585
previousButtonRelease = 0;
@@ -1587,8 +1589,9 @@ void buttonCheckTask(void *e)
15871589
else if ((thisButtonRelease > 0) &&
15881590
((millis() - thisButtonRelease) > doubleTapInterval)) // Do we have a single tap?
15891591
{
1590-
// Do not register button taps until the system is displaying the menu
1591-
if (systemState == STATE_DISPLAY_SETUP)
1592+
// Do not register button tap until the system is displaying the menu
1593+
// If this platform doesn't have a display, then register the button tap
1594+
if (systemState == STATE_DISPLAY_SETUP || present.display_type == DISPLAY_MAX_NONE)
15921595
{
15931596
previousButtonRelease = 0;
15941597
thisButtonRelease = 0;

0 commit comments

Comments
 (0)