Skip to content

Commit 0015f25

Browse files
committed
Allow shutdown while in serial menu
1 parent 82f2fc9 commit 0015f25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Firmware/RTK_Surveyor/Tasks.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ void ButtonCheckTask(void *e)
504504
{
505505
forceSystemStateUpdate = true;
506506
requestChangeState(STATE_SHUTDOWN);
507+
508+
if(inMainMenu) powerDown(true); //State machine is not updated while in menu system so go straight to power down as needed
507509
}
508510
else if ((setupBtn != NULL && setupBtn->pressedFor(500)) &&
509511
(powerBtn != NULL && powerBtn->pressedFor(500)))
@@ -625,6 +627,8 @@ void ButtonCheckTask(void *e)
625627
{
626628
forceSystemStateUpdate = true;
627629
requestChangeState(STATE_SHUTDOWN);
630+
631+
if(inMainMenu) powerDown(true); //State machine is not updated while in menu system so go straight to power down as needed
628632
}
629633
else if (powerBtn != NULL && systemState == STATE_ROVER_NOT_STARTED && firstRoverStart == true && powerBtn->pressedFor(500))
630634
{

0 commit comments

Comments
 (0)