File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,11 @@ bool startFixedBase()
137137 int32_t majorAlt = settings.fixedAltitude * 100 ;
138138 int32_t minorAlt = ((settings.fixedAltitude * 100 ) - majorAlt) * 100 ;
139139
140- // Serial.printf("fixedLat (should be -105.184774720): %0.09f\n", settings.fixedLat );
140+ // Serial.printf("fixedLong (should be -105.184774720): %0.09f\n", settings.fixedLong );
141141 // Serial.printf("major (should be -1051847747): %lld\n", majorLat);
142142 // Serial.printf("minor (should be -20): %lld\n", minorLat);
143143 //
144- // Serial.printf("fixedLong (should be 40.090335429): %0.09f\n", settings.fixedLong );
144+ // Serial.printf("fixedLat (should be 40.090335429): %0.09f\n", settings.fixedLat );
145145 // Serial.printf("major (should be 400903354): %lld\n", majorLong);
146146 // Serial.printf("minor (should be 29): %lld\n", minorLong);
147147 //
Original file line number Diff line number Diff line change @@ -117,15 +117,15 @@ void menuBase()
117117 {
118118 Serial.println (F (" Enter the fixed Lat/Long/Altitude coordinates that will be used in Base mode:" ));
119119
120- Serial.print (F (" Lat in degrees (ex: -105.184774720 ): " ));
120+ Serial.print (F (" Lat in degrees (ex: 40.090335429 ): " ));
121121 double fixedLat = getDouble (menuTimeout); // Timeout after x seconds
122122
123123 // Progress with additional prompts only if the user enters valid data
124124 if (fixedLat != STATUS_GETNUMBER_TIMEOUT && fixedLat != STATUS_PRESSED_X)
125125 {
126126 settings.fixedLat = fixedLat;
127127
128- Serial.print (F (" \n Long in degrees (ex: 40.090335429 ): " ));
128+ Serial.print (F (" \n Long in degrees (ex: -105.184774720 ): " ));
129129 double fixedLong = getDouble (menuTimeout);
130130 if (fixedLong != STATUS_GETNUMBER_TIMEOUT && fixedLong != STATUS_PRESSED_X)
131131 {
Original file line number Diff line number Diff line change @@ -95,9 +95,16 @@ void recordSystemSettingsToFile()
9595 settingsFile.println (" fixedEcefX=" + (String)settings.fixedEcefX );
9696 settingsFile.println (" fixedEcefY=" + (String)settings.fixedEcefY );
9797 settingsFile.println (" fixedEcefZ=" + (String)settings.fixedEcefZ );
98- settingsFile.println (" fixedLat=" + (String)settings.fixedLat );
99- settingsFile.println (" fixedLong=" + (String)settings.fixedLong );
100- settingsFile.println (" fixedAltitude=" + (String)settings.fixedAltitude );
98+
99+ // Print Lat/Long doubles with 9 decimals
100+ char longPrint[20 ]; // -105.123456789
101+ sprintf (longPrint, " %0.9f" , settings.fixedLat );
102+ settingsFile.println (" fixedLat=" + (String)longPrint);
103+ sprintf (longPrint, " %0.9f" , settings.fixedLong );
104+ settingsFile.println (" fixedLong=" + (String)longPrint);
105+ sprintf (longPrint, " %0.4f" , settings.fixedAltitude );
106+ settingsFile.println (" fixedAltitude=" + (String)longPrint);
107+
101108 settingsFile.println (" dataPortBaud=" + (String)settings.dataPortBaud );
102109 settingsFile.println (" radioPortBaud=" + (String)settings.radioPortBaud );
103110 settingsFile.println (" enableSBAS=" + (String)settings.enableSBAS );
You can’t perform that action at this time.
0 commit comments