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()
478
478
else if (productVariant == RTK_FACET)
479
479
{
480
480
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
481
483
482
484
powerBtn = new Button (pin_powerSenseAndControl); // Create the button in memory
483
485
}
Original file line number Diff line number Diff line change 1
1
// User has pressed the power button to turn on the system
2
2
// 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
4
4
void powerOnCheck ()
5
5
{
6
6
#ifdef ENABLE_DEVELOPER
@@ -10,7 +10,7 @@ void powerOnCheck()
10
10
powerPressedStartTime = millis ();
11
11
while (digitalRead (pin_powerSenseAndControl) == LOW)
12
12
{
13
- delay (100 ); // Wait for user to stop pressing button.
13
+ delay (10 );
14
14
15
15
if (millis () - powerPressedStartTime > 500 )
16
16
break ;
Original file line number Diff line number Diff line change 44
44
const int FIRMWARE_VERSION_MAJOR = 1 ;
45
45
const int FIRMWARE_VERSION_MINOR = 9 ;
46
46
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
49
49
#define ENABLE_DEVELOPER // Uncomment this line to enable special developer modes (don't check power button at startup)
50
50
51
51
// Define the RTK board identifier:
@@ -352,6 +352,8 @@ float svinMeanAccuracy = 0;
352
352
353
353
uint32_t lastSetupMenuChange = 0 ; // Auto-selects the setup menu option after 1500ms
354
354
uint32_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
355
357
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
356
358
357
359
void setup ()
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ void updateSystemState()
59
59
displayRoverSuccess (500 );
60
60
61
61
changeState (STATE_ROVER_NO_FIX);
62
+ firstRoverStart = false ; // Do not allow entry into test menu again
62
63
}
63
64
break ;
64
65
Original file line number Diff line number Diff line change @@ -292,13 +292,13 @@ void ButtonCheckTask(void *e)
292
292
forceSystemStateUpdate = true ;
293
293
requestChangeState (STATE_SHUTDOWN);
294
294
}
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 )
302
302
{
303
303
switch (systemState)
304
304
{
You can’t perform that action at this time.
0 commit comments