11// Once connected to the access point for WiFi Config, the ESP32 sends current setting values in one long string to websocket
22// After user clicks 'save', data is validated via main.js and a long string of values is returned.
33
4- static uint8_t bootProfileNumber;
5-
64// Start webserver in AP mode
75void startWebServer ()
86{
@@ -288,7 +286,7 @@ void createSettingsString(char* settingsCSV)
288286 // System Info
289287 stringRecord (settingsCSV, " platformPrefix" , platformPrefix);
290288
291- char apRtkFirmwareVersion[50 ];
289+ char apRtkFirmwareVersion[86 ];
292290 sprintf (apRtkFirmwareVersion, " RTK %s Firmware: v%d.%d-%s" , platformPrefix, FIRMWARE_VERSION_MAJOR, FIRMWARE_VERSION_MINOR, __DATE__);
293291 stringRecord (settingsCSV, " rtkFirmwareVersion" , apRtkFirmwareVersion);
294292
@@ -298,7 +296,7 @@ void createSettingsString(char* settingsCSV)
298296 else if (zedModuleType == PLATFORM_F9R)
299297 strcpy (apZedPlatform, " ZED-F9R" );
300298
301- char apZedFirmwareVersion[50 ];
299+ char apZedFirmwareVersion[80 ];
302300 sprintf (apZedFirmwareVersion, " %s Firmware: %s" , apZedPlatform, zedFirmwareVersion);
303301 stringRecord (settingsCSV, " zedFirmwareVersion" , apZedFirmwareVersion);
304302
@@ -418,8 +416,6 @@ void createSettingsString(char* settingsCSV)
418416 sprintf (nameText, " %d: %s" , index + 1 , profileNames[index]);
419417 stringRecord (settingsCSV, tagText, nameText);
420418 }
421- bootProfileNumber = profileNumber + 1 ;
422- stringRecord (settingsCSV, " bootProfileNumber" , bootProfileNumber);
423419 stringRecord (settingsCSV, " activeProfiles" , activeProfiles);
424420
425421 // New settings not yet integrated
@@ -517,14 +513,6 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
517513 recordProfileNumber (profileNumber);
518514 }
519515 }
520- else if (strcmp (settingName, " bootProfileNumber" ) == 0 )
521- {
522- if ((sscanf (settingValueStr, " %d" , &bootProfileNumber) != 1 )
523- || (bootProfileNumber < 1 )
524- || (bootProfileNumber > (MAX_PROFILE_COUNT + 1 )))
525- bootProfileNumber = 1 ;
526- Serial.printf (" bootProfileNumber: %d\r\n " , bootProfileNumber);
527- }
528516 else if (strcmp (settingName, " enableNtripServer" ) == 0 )
529517 settings.enableNtripServer = settingValueBool;
530518 else if (strcmp (settingName, " ntripServer_CasterHost" ) == 0 )
@@ -600,11 +588,6 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
600588 {
601589 if (newAPSettings == true ) recordSystemSettings (); // If we've recieved settings, record before restart
602590
603- // Determine which profile to boot
604- bootProfileNumber -= 1 ;
605- if (bootProfileNumber != profileNumber)
606- recordProfileNumber (bootProfileNumber);
607-
608591 // Reboot the machine
609592 ESP.restart ();
610593 }
@@ -726,7 +709,7 @@ void stringRecord(char* settingsCSV, const char *id, char* settingValue)
726709void stringRecord (char * settingsCSV, const char *id, uint64_t settingValue)
727710{
728711 char record[100 ];
729- sprintf (record, " %s,%ld ," , id, settingValue);
712+ sprintf (record, " %s,%lld ," , id, settingValue);
730713 strcat (settingsCSV, record);
731714}
732715
0 commit comments