Skip to content

Commit f1ca3d8

Browse files
committed
Add developer guards
1 parent bd245d6 commit f1ca3d8

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ void beginBoard()
128128
case ESP_RST_SDIO : Serial.println(F("ESP_RST_SDIO")); break;
129129
default : Serial.println(F("Unknown"));
130130
}
131+
132+
#ifdef ENABLE_DEVELOPER
133+
Serial.println("System reset");
134+
displayError("WDT RST"); //Freeze with displayed error
135+
while (1);
136+
#endif
137+
131138
}
132139
}
133140

Firmware/RTK_Surveyor/Buttons.ino

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
//Let's make sure they continue to press for two seconds
44
void powerOnCheck()
55
{
6-
#ifndef COMPILE_WIFI
7-
return;
8-
#endif
9-
#ifndef COMPILE_BT
6+
#ifdef ENABLE_DEVELOPER
107
return;
118
#endif
129

Firmware/RTK_Surveyor/Display.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ void displaySplash()
142142

143143
yPos = yPos + fontHeight + 7;
144144
char unitFirmware[50];
145+
#ifdef ENABLE_DEVELOPER
146+
sprintf(unitFirmware, "v%d.%d-DEV", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
147+
#else
145148
sprintf(unitFirmware, "v%d.%d", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
149+
#endif
146150
printTextCenter(unitFirmware, yPos, 0, 1, false);
147151

148152
oled.display();
@@ -1362,9 +1366,9 @@ void getAngles()
13621366
{
13631367
while (accel.available() == false) delay(1);
13641368

1365-
float accelX;
1366-
float accelZ;
1367-
float accelY;
1369+
float accelX = 0;
1370+
float accelY = 0;
1371+
float accelZ = 0;
13681372

13691373
//Express Accel orientation is different from Facet
13701374
if (productVariant == RTK_EXPRESS || productVariant == RTK_EXPRESS_PLUS)

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
const int FIRMWARE_VERSION_MAJOR = 1;
4242
const int FIRMWARE_VERSION_MINOR = 5;
4343

44-
#define COMPILE_WIFI 1 //Comment out to remove all WiFi functionality
45-
#define COMPILE_BT 1 //Comment out to disable all Bluetooth
44+
//#define COMPILE_WIFI 1 //Comment out to remove all WiFi functionality
45+
//#define COMPILE_BT 1 //Comment out to disable all Bluetooth
46+
#define ENABLE_DEVELOPER //Uncomment this line to enable special developer modes (don't check power button at startup)
4647

4748
//Define the RTK board identifier:
4849
// This is an int which is unique to this variant of the RTK Surveyor hardware which allows us

0 commit comments

Comments
 (0)