Skip to content

Commit 818d53e

Browse files
committed
Fix entry into test menu
1 parent feb3214 commit 818d53e

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void updateDisplay()
8686
displayWiFiConfig(); //Display SSID and IP
8787
break;
8888
case (STATE_TEST):
89-
//Do nothing
89+
paintSystemTest();
9090
break;
9191
case (STATE_TESTING):
9292
paintSystemTest();

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
This firmware runs the core of the SparkFun RTK Surveyor product. It runs on an ESP32
77
and communicates with the ZED-F9P.
88
9+
Compiled with Arduino v1.8.13 with ESP32 core v1.0.6.
10+
911
Select the ESP32 Dev Module from the boards list. This maps the same pins to the ESP32-WROOM module.
1012
Select 'Minimal SPIFFS (1.9MB App)' from the partition list. This will enable SD firmware updates.
1113
@@ -349,6 +351,7 @@ uint16_t svinObservationTime = 0; //Use globals so we don't have to request thes
349351
float svinMeanAccuracy = 0;
350352

351353
uint32_t lastSetupMenuChange = 0;
354+
uint32_t lastTestMenuChange = 0; //Avoids exiting the test menu for at least 1 second
352355
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
353356

354357
void setup()

Firmware/RTK_Surveyor/States.ino

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -636,13 +636,17 @@ void updateSystemState()
636636
//Setup device for testing
637637
case (STATE_TEST):
638638
{
639-
//Enable RTCM 1230. This is the GLONASS bias sentence and is transmitted
640-
//even if there is no GPS fix. We use it to test serial output.
641-
i2cGNSS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_UART2, 1); //Enable message every second
639+
//Don't enter testing
640+
if (millis() - lastTestMenuChange > 500)
641+
{
642+
//Enable RTCM 1230. This is the GLONASS bias sentence and is transmitted
643+
//even if there is no GPS fix. We use it to test serial output.
644+
i2cGNSS.enableRTCMmessage(UBX_RTCM_1230, COM_PORT_UART2, 1); //Enable message every second
642645

643-
inTestMode = true; //Reroutes bluetooth bytes
646+
inTestMode = true; //Reroutes bluetooth bytes
644647

645-
changeState(STATE_TESTING);
648+
changeState(STATE_TESTING);
649+
}
646650
}
647651
break;
648652

Firmware/RTK_Surveyor/Tasks.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ void ButtonCheckTask(void *e)
219219
{
220220
forceSystemStateUpdate = true;
221221
requestChangeState(STATE_TEST);
222+
lastTestMenuChange = millis(); //Avoid exiting test menu for 1s
222223
}
223224
else if (setupBtn != NULL && setupBtn->wasReleased())
224225
{

0 commit comments

Comments
 (0)