diff --git a/Firmware/RTK_Surveyor/Begin.ino b/Firmware/RTK_Surveyor/Begin.ino index 5c848d704..4675a8eb8 100644 --- a/Firmware/RTK_Surveyor/Begin.ino +++ b/Firmware/RTK_Surveyor/Begin.ino @@ -172,9 +172,6 @@ void beginBoard() // Bug in ZED-F9P v1.13 firmware causes RTK LED to not light when RTK Floating with SBAS on. // The following changes the POR default but will be overwritten by settings in NVM or settings file settings.ubxConstellations[1].enabled = false; - - strncpy(platformFilePrefix, "SFE_Surveyor", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Surveyor", sizeof(platformPrefix) - 1); } else if (productVariant == RTK_EXPRESS || productVariant == RTK_EXPRESS_PLUS) { @@ -198,17 +195,6 @@ void beginBoard() pinMode(pin_setupButton, INPUT_PULLUP); setMuxport(settings.dataPortChannel); // Set mux to user's choice: NMEA, I2C, PPS, or DAC - - if (productVariant == RTK_EXPRESS) - { - strncpy(platformFilePrefix, "SFE_Express", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Express", sizeof(platformPrefix) - 1); - } - else if (productVariant == RTK_EXPRESS_PLUS) - { - strncpy(platformFilePrefix, "SFE_Express_Plus", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Express Plus", sizeof(platformPrefix) - 1); - } } else if (productVariant == RTK_FACET || productVariant == RTK_FACET_LBAND || productVariant == RTK_FACET_LBAND_DIRECT) @@ -247,21 +233,8 @@ void beginBoard() pinMode(pin_radio_cts, OUTPUT); digitalWrite(pin_radio_cts, LOW); - if (productVariant == RTK_FACET) + if (productVariant == RTK_FACET_LBAND_DIRECT) { - strncpy(platformFilePrefix, "SFE_Facet", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Facet", sizeof(platformPrefix) - 1); - } - else if (productVariant == RTK_FACET_LBAND) - { - strncpy(platformFilePrefix, "SFE_Facet_LBand", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Facet L-Band", sizeof(platformPrefix) - 1); - } - else if (productVariant == RTK_FACET_LBAND_DIRECT) - { - strncpy(platformFilePrefix, "SFE_Facet_LBand_Direct", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Facet L-Band Direct", sizeof(platformPrefix) - 1); - // Override the default setting if a user has not explicitly configured the setting if (settings.useI2cForLbandCorrectionsConfigured == false) settings.useI2cForLbandCorrections = false; @@ -272,9 +245,6 @@ void beginBoard() // No powerOnCheck settings.enablePrintBatteryMessages = false; // No pesky battery messages - - strncpy(platformFilePrefix, "SFE_Reference_Station", sizeof(platformFilePrefix) - 1); - strncpy(platformPrefix, "Reference Station", sizeof(platformPrefix) - 1); } char versionString[21]; diff --git a/Firmware/RTK_Surveyor/Display.ino b/Firmware/RTK_Surveyor/Display.ino index 6f7a1ea95..1f8a08d32 100644 --- a/Firmware/RTK_Surveyor/Display.ino +++ b/Firmware/RTK_Surveyor/Display.ino @@ -605,35 +605,7 @@ void displaySplash() printTextCenter("RTK", yPos, QW_FONT_8X16, 1, false); yPos = yPos + fontHeight + 5; - - if (productVariant == RTK_SURVEYOR) - { - printTextCenter("Surveyor", yPos, QW_FONT_8X16, 1, false); - } - else if (productVariant == RTK_EXPRESS) - { - printTextCenter("Express", yPos, QW_FONT_8X16, 1, false); - } - else if (productVariant == RTK_EXPRESS_PLUS) - { - printTextCenter("Express+", yPos, QW_FONT_8X16, 1, false); - } - else if (productVariant == RTK_FACET) - { - printTextCenter("Facet", yPos, QW_FONT_8X16, 1, false); - } - else if (productVariant == RTK_FACET_LBAND) - { - printTextCenter("Facet LB", yPos, QW_FONT_8X16, 1, false); - } - else if (productVariant == RTK_FACET_LBAND_DIRECT) - { - printTextCenter("Facet LB", yPos, QW_FONT_8X16, 1, false); //Same as L-Band at boot - } - else if (productVariant == REFERENCE_STATION) - { - printTextCenter("Ref Stn", yPos, QW_FONT_8X16, 1, false); - } + printTextCenter(productDisplayNames[productVariant], yPos, QW_FONT_8X16, 1, false); yPos = yPos + fontHeight + 7; char unitFirmware[50]; diff --git a/Firmware/RTK_Surveyor/RTK_Surveyor.ino b/Firmware/RTK_Surveyor/RTK_Surveyor.ino index bbb67c811..109da6707 100644 --- a/Firmware/RTK_Surveyor/RTK_Surveyor.ino +++ b/Firmware/RTK_Surveyor/RTK_Surveyor.ino @@ -155,7 +155,7 @@ SdFat *sd; #include "FileSdFatMMC.h" //Hybrid SdFat and SD_MMC file access -char platformFilePrefix[40] = "SFE_Surveyor"; // Sets the prefix for logs and settings files +#define platformFilePrefix platformFilePrefixTable[productVariant] // Sets the prefix for logs and settings files FileSdFatMMC *ubxFile; // File that all GNSS ubx messages sentences are written to unsigned long lastUBXLogSyncTime = 0; // Used to record to SD every half second @@ -419,7 +419,7 @@ float battChangeRate = 0.0; #include "bluetoothSelect.h" #endif // COMPILE_BT -char platformPrefix[55] = "Surveyor"; // Sets the prefix for broadcast names +#define platformPrefix platformPrefixTable[productVariant] // Sets the prefix for broadcast names #include //Required for uart_set_rx_full_threshold() on cores