@@ -1367,7 +1367,7 @@ void buttonCheckTask(void *e)
1367
1367
previousButtonRelease = thisButtonRelease;
1368
1368
thisButtonRelease = millis ();
1369
1369
1370
- // If we are not currently showing the menu, immediately display it
1370
+ // If we are not currently showing the menu, immediately display it
1371
1371
if (showMenu == false && systemState != STATE_DISPLAY_SETUP)
1372
1372
showMenu = true ;
1373
1373
}
@@ -1383,10 +1383,18 @@ void buttonCheckTask(void *e)
1383
1383
else if ((thisButtonRelease > 0 ) &&
1384
1384
((millis () - thisButtonRelease) > doubleTapInterval)) // Do we have a single tap?
1385
1385
{
1386
- doubleTap = false ;
1387
- singleTap = true ;
1388
- previousButtonRelease = 0 ;
1389
- thisButtonRelease = 0 ;
1386
+ // Discard the first button press as it was used to display the menu
1387
+ if (showMenu == true )
1388
+ {
1389
+ showMenu = false ;
1390
+ }
1391
+ else
1392
+ {
1393
+ doubleTap = false ;
1394
+ singleTap = true ;
1395
+ previousButtonRelease = 0 ;
1396
+ thisButtonRelease = 0 ;
1397
+ }
1390
1398
}
1391
1399
1392
1400
// else // if ((previousButtonRelease == 0) && (thisButtonRelease > 0)) // Tap in progress?
@@ -1488,14 +1496,12 @@ void buttonCheckTask(void *e)
1488
1496
forceSystemStateUpdate = true ;
1489
1497
requestChangeState (STATE_TEST);
1490
1498
}
1491
-
1499
+
1492
1500
// If the button is disabled, do nothing
1493
1501
// If we detect a singleTap, move through menus
1494
1502
// If the button was pressed to initially show the menu, then allow immediate entry and show the menu
1495
1503
else if ((settings.disableSetupButton == false ) && ((singleTap && firstRoverStart == false ) || showMenu))
1496
1504
{
1497
- showMenu = false ;
1498
-
1499
1505
switch (systemState)
1500
1506
{
1501
1507
// If we are in any running state, change to STATE_DISPLAY_SETUP
@@ -1522,6 +1528,7 @@ void buttonCheckTask(void *e)
1522
1528
requestChangeState (STATE_DISPLAY_SETUP);
1523
1529
lastSetupMenuChange = millis ();
1524
1530
setupSelectedButton = 0 ; // Highlight the first button
1531
+ forceDisplayUpdate = true ; // User is interacting so repaint display quickly
1525
1532
break ;
1526
1533
1527
1534
case STATE_DISPLAY_SETUP:
@@ -1585,8 +1592,6 @@ void buttonCheckTask(void *e)
1585
1592
} // End singleTap
1586
1593
else if (doubleTap && (firstRoverStart == false ) && (settings.disableSetupButton == false ))
1587
1594
{
1588
- showMenu = false ;
1589
-
1590
1595
switch (systemState)
1591
1596
{
1592
1597
case STATE_DISPLAY_SETUP: {
0 commit comments