@@ -306,11 +306,21 @@ void createSettingsString(char* settingsCSV)
306306 stringRecord (settingsCSV, " baseTypeFixed" , settings.fixedBase );
307307 stringRecord (settingsCSV, " observationSeconds" , settings.observationSeconds );
308308 stringRecord (settingsCSV, " observationPositionAccuracy" , settings.observationPositionAccuracy , 2 );
309- stringRecord (settingsCSV, " fixedBaseCoordinateTypeECEF" , !settings.fixedBaseCoordinateType ); // COORD_TYPE_ECEF = 0
309+
310+ if (settings.fixedBaseCoordinateType == COORD_TYPE_ECEF)
311+ {
312+ stringRecord (settingsCSV, " fixedBaseCoordinateTypeECEF" , true );
313+ stringRecord (settingsCSV, " fixedBaseCoordinateTypeGeo" , false );
314+ }
315+ else
316+ {
317+ stringRecord (settingsCSV, " fixedBaseCoordinateTypeECEF" , false );
318+ stringRecord (settingsCSV, " fixedBaseCoordinateTypeGeo" , true );
319+ }
320+
310321 stringRecord (settingsCSV, " fixedEcefX" , settings.fixedEcefX , 3 );
311322 stringRecord (settingsCSV, " fixedEcefY" , settings.fixedEcefY , 3 );
312323 stringRecord (settingsCSV, " fixedEcefZ" , settings.fixedEcefZ , 3 );
313- stringRecord (settingsCSV, " fixedBaseCoordinateTypeGeo" , settings.fixedBaseCoordinateType );
314324 stringRecord (settingsCSV, " fixedLat" , settings.fixedLat , 9 );
315325 stringRecord (settingsCSV, " fixedLong" , settings.fixedLong , 9 );
316326 stringRecord (settingsCSV, " fixedAltitude" , settings.fixedAltitude , 4 );
@@ -363,10 +373,6 @@ void createSettingsString(char* settingsCSV)
363373 strcat (settingsCSV, " \0 " );
364374 Serial.printf (" settingsCSV len: %d\n\r " , strlen (settingsCSV));
365375
366- // Upon AP load, Survey In is always checked.
367- // Sometimes, (perhaps if fixed should be checked) fixed area is left enabled. Check main.js for correct disable of baseTypeFixed if fixedBase = false
368-
369-
370376 // Is baseTypeSurveyIn 1 or 0
371377 Serial.printf (" settingsCSV: %s\n\r " , settingsCSV);
372378}
@@ -396,7 +402,7 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
396402 else if (strcmp (settingName, " observationPositionAccuracy" ) == 0 )
397403 settings.observationPositionAccuracy = settingValue;
398404 else if (strcmp (settingName, " fixedBaseCoordinateTypeECEF" ) == 0 )
399- settings.fixedBaseCoordinateType = settingValueBool;
405+ settings.fixedBaseCoordinateType = ! settingValueBool; // When ECEF is true, fixedBaseCoordinateType = 0 (COORD_TYPE_ECEF)
400406 else if (strcmp (settingName, " fixedEcefX" ) == 0 )
401407 settings.fixedEcefX = settingValue;
402408 else if (strcmp (settingName, " fixedEcefY" ) == 0 )
@@ -469,7 +475,7 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
469475 factoryReset ();
470476 else if (strcmp (settingName, " exitAndReset" ) == 0 )
471477 {
472- if (newAPSettings == true ) recordSystemSettings (); // If we've recieved settings, record before restart
478+ if (newAPSettings == true ) recordSystemSettings (); // If we've recieved settings, record before restart
473479
474480 ESP.restart ();
475481 }
@@ -597,7 +603,7 @@ bool parseIncomingSettings()
597603 headPtr = commaPtr + 1 ;
598604 }
599605
600- // Serial.printf("settingName: %s value: %s\n\r", settingName, valueStr);
606+ Serial.printf (" settingName: %s value: %s\n\r " , settingName, valueStr);
601607
602608 // Ignore zero length values (measurementRateSec) received from browser
603609 if (strlen (valueStr) > 0 )
0 commit comments