Skip to content

Commit 2af5d05

Browse files
committed
Add date to firmware version. Add firmware version output to boot and settings file.
1 parent 995908c commit 2af5d05

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void beginBoard()
3131
pin_batteryLevel_alert = 36;
3232

3333
strcpy(platformFilePrefix, "SFE_Surveyor");
34-
strcpy(platformBluetoothPrefix, "Surveyor");
34+
strcpy(platformPrefix, "Surveyor");
3535
}
3636
else if (productVariant == RTK_EXPRESS)
3737
{
@@ -57,7 +57,7 @@ void beginBoard()
5757
setMuxport(settings.dataPortChannel); //Set mux to user's choice: NMEA, I2C, PPS, or DAC
5858

5959
strcpy(platformFilePrefix, "SFE_Express");
60-
strcpy(platformBluetoothPrefix, "Express");
60+
strcpy(platformPrefix, "Express");
6161
}
6262
else if (productVariant == RTK_FACET)
6363
{
@@ -84,10 +84,10 @@ void beginBoard()
8484
setMuxport(settings.dataPortChannel); //Set mux to user's choice: NMEA, I2C, PPS, or DAC
8585

8686
strcpy(platformFilePrefix, "SFE_Facet");
87-
strcpy(platformBluetoothPrefix, "Facet");
87+
strcpy(platformPrefix, "Facet");
8888
}
8989

90-
Serial.printf("RTK Variant: %s\n\r", platformFilePrefix);
90+
Serial.printf("SparkFun RTK %s v%d.%d-%s\r\n", platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
9191

9292
//For all boards, check reset reason. If reset was do to wdt or panic, append last log
9393
if (esp_reset_reason() == ESP_RST_POWERON)

Firmware/RTK_Surveyor/NVM.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ void recordSystemSettingsToFile()
8888

8989
settingsFile.println("sizeOfSettings=" + (String)settings.sizeOfSettings);
9090
settingsFile.println("rtkIdentifier=" + (String)settings.rtkIdentifier);
91+
92+
char firmwareVersion[30]; //v1.3 December 31 2021
93+
sprintf(firmwareVersion, "v%d.%d-%s", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
94+
settingsFile.println("rtkFirmwareVersion=" + (String)firmwareVersion);
95+
9196
settingsFile.println("printDebugMessages=" + (String)settings.printDebugMessages);
9297
settingsFile.println("enableSD=" + (String)settings.enableSD);
9398
settingsFile.println("enableDisplay=" + (String)settings.enableDisplay);
@@ -368,7 +373,7 @@ bool parseLine(char* str) {
368373
strcat(settingsFileName, "_Settings.txt");
369374
sd.remove(settingsFileName);
370375

371-
Serial.printf("RTK %s has been factory reset via settings file. Freezing. Please restart and open terminal at 115200bps.\n\r", platformBluetoothPrefix);
376+
Serial.printf("RTK %s has been factory reset via settings file. Freezing. Please restart and open terminal at 115200bps.\n\r", platformPrefix);
372377

373378
while (1)
374379
delay(1); //Prevent CPU freakout

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,13 @@ float battChangeRate = 0.0;
183183

184184
//Hardware serial and BT buffers
185185
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
186+
//We use a local copy of the BluetoothSerial library so that we can increase the RX buffer. See issue: https://github.com/sparkfun/SparkFun_RTK_Surveyor/issues/18
186187
#include "src/BluetoothSerial/BluetoothSerial.h"
187188
BluetoothSerial SerialBT;
188189
#include "esp_bt.h" //Core access is needed for BT stop. See customBTstop() for more info.
189190
#include "esp_gap_bt_api.h" //Needed for setting of pin. See issue: https://github.com/sparkfun/SparkFun_RTK_Surveyor/issues/5
190191

191-
char platformBluetoothPrefix[40] = "Surveyor"; //Sets the prefix for broadcast names
192+
char platformPrefix[40] = "Surveyor"; //Sets the prefix for broadcast names
192193

193194
HardwareSerial serialGNSS(2);
194195
#define RXD2 16

Firmware/RTK_Surveyor/System.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ bool startBluetooth()
1313
else
1414
strcpy(stateName, "Base");
1515

16-
sprintf(deviceName, "%s %s-%02X%02X", platformBluetoothPrefix, stateName, unitMACAddress[4], unitMACAddress[5]); //Base mode
16+
sprintf(deviceName, "%s %s-%02X%02X", platformPrefix, stateName, unitMACAddress[4], unitMACAddress[5]); //Base mode
1717

1818
if (SerialBT.begin(deviceName) == false)
1919
{

Firmware/RTK_Surveyor/menuMain.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void menuMain()
77
while (1)
88
{
99
Serial.println();
10-
Serial.printf("SparkFun RTK Surveyor v%d.%d\r\n", FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR);
10+
Serial.printf("SparkFun RTK %s v%d.%d-%s\r\n", platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
1111

1212
Serial.print(F("** Bluetooth broadcasting as: "));
1313
Serial.print(deviceName);

0 commit comments

Comments
 (0)