File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,8 @@ void beginSystemState()
478478 else if (productVariant == RTK_FACET)
479479 {
480480 systemState = settings.lastState ; // Return to system state previous to power down.
481+ if (systemState == STATE_ROVER_NOT_STARTED)
482+ firstRoverStart = true ; // Allow user to enter test screen during first rover start
481483
482484 powerBtn = new Button (pin_powerSenseAndControl); // Create the button in memory
483485 }
Original file line number Diff line number Diff line change 11// User has pressed the power button to turn on the system
22// Was it an accidental bump or do they really want to turn on?
3- // Let's make sure they continue to press for two seconds
3+ // Let's make sure they continue to press for 500ms
44void powerOnCheck ()
55{
66#ifdef ENABLE_DEVELOPER
@@ -10,7 +10,7 @@ void powerOnCheck()
1010 powerPressedStartTime = millis ();
1111 while (digitalRead (pin_powerSenseAndControl) == LOW)
1212 {
13- delay (100 ); // Wait for user to stop pressing button.
13+ delay (10 );
1414
1515 if (millis () - powerPressedStartTime > 500 )
1616 break ;
Original file line number Diff line number Diff line change 4444const int FIRMWARE_VERSION_MAJOR = 1 ;
4545const int FIRMWARE_VERSION_MINOR = 9 ;
4646
47- #define COMPILE_WIFI // Comment out to remove all WiFi functionality
48- #define COMPILE_BT // Comment out to disable all Bluetooth
47+ // #define COMPILE_WIFI //Comment out to remove all WiFi functionality
48+ // #define COMPILE_BT //Comment out to disable all Bluetooth
4949#define ENABLE_DEVELOPER // Uncomment this line to enable special developer modes (don't check power button at startup)
5050
5151// Define the RTK board identifier:
@@ -352,6 +352,8 @@ float svinMeanAccuracy = 0;
352352
353353uint32_t lastSetupMenuChange = 0 ; // Auto-selects the setup menu option after 1500ms
354354uint32_t lastTestMenuChange = 0 ; // Avoids exiting the test menu for at least 1 second
355+
356+ bool firstRoverStart = false ; // Used to detect if user is toggling power button at POR to enter test menu
355357// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
356358
357359void setup ()
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ void updateSystemState()
5959 displayRoverSuccess (500 );
6060
6161 changeState (STATE_ROVER_NO_FIX);
62+ firstRoverStart = false ; // Do not allow entry into test menu again
6263 }
6364 break ;
6465
Original file line number Diff line number Diff line change @@ -292,13 +292,13 @@ void ButtonCheckTask(void *e)
292292 forceSystemStateUpdate = true ;
293293 requestChangeState (STATE_SHUTDOWN);
294294 }
295- // else if ((setupBtn != NULL && setupBtn ->pressedFor(500)) &&
296- // (powerBtn != NULL && powerBtn->pressedFor(500)))
297- // {
298- // forceSystemStateUpdate = true ;
299- // requestChangeState(STATE_TEST);
300- // }
301- else if (powerBtn != NULL && powerBtn->wasReleased ())
295+ else if (powerBtn != NULL && systemState == STATE_ROVER_NOT_STARTED && firstRoverStart == true && powerBtn ->pressedFor (500 ))
296+ {
297+ forceSystemStateUpdate = true ;
298+ requestChangeState (STATE_TEST) ;
299+ lastTestMenuChange = millis (); // Avoid exiting test menu for 1s
300+ }
301+ else if (powerBtn != NULL && powerBtn->wasReleased () && firstRoverStart == false )
302302 {
303303 switch (systemState)
304304 {
You can’t perform that action at this time.
0 commit comments