Skip to content

Commit 8b8d334

Browse files
committed
Add savePossibleSettings
We need to ensure that - until we know what Flex GNSS is present - we save ALL possible settings. We'll save the reduced actual settings once the GNSS is known.
1 parent 8a3df93 commit 8b8d334

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

Firmware/RTK_Everywhere/NVM.ino

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,21 @@ void recordSystemSettingsToFile(File *settingsFile)
227227
for (int i = 0; i < numRtkSettingsEntries; i++)
228228
{
229229
// Do not record this setting if it is not supported by the current platform
230-
if (settingAvailableOnPlatform(i) == false)
231-
continue;
230+
// But oh what a tangled web we weave...
231+
// Thanks to Facet Flex, initially we should be saving all possible settings.
232+
// Later, once we know what Flex GNSS is present, we save only the available
233+
// settings for that platform. Passing usePossibleSettings in as a parameter
234+
// would be messy. So, we'll use a global flag which is updated by commandIndexFill
235+
if (savePossibleSettings)
236+
{
237+
if (settingPossibleOnPlatform(i) == false)
238+
continue;
239+
}
240+
else
241+
{
242+
if (settingAvailableOnPlatform(i) == false)
243+
continue;
244+
}
232245

233246
switch (rtkSettingsEntries[i].type)
234247
{

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,9 @@ const int sdSizeCheckStackSize = 3000;
390390
bool sdSizeCheckTaskComplete;
391391

392392
char logFileName[sizeof("SFE_Reference_Station_230101_120101.ubx_plusExtraSpace")] = {0};
393+
394+
bool savePossibleSettings = true; // Save possible vs. available settings. See recordSystemSettingsToFile for details
395+
393396
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
394397

395398
// WiFi support
@@ -1589,12 +1592,14 @@ void logUpdate()
15891592
{
15901593
if (logTimeExceeded())
15911594
{
1592-
systemPrintln("Log file: maximum logging time reached");
1595+
if (!inMainMenu)
1596+
systemPrintln("Log file: maximum logging time reached");
15931597
endSD(false, true); // Close down SD.
15941598
}
15951599
else
15961600
{
1597-
systemPrintln("Log file: log length reached");
1601+
if (!inMainMenu)
1602+
systemPrintln("Log file: log length reached");
15981603
endLogging(false, true); //(gotSemaphore, releaseSemaphore) Close file. Reset parser stats.
15991604
beginLogging(); // Create new file based on current RTC.
16001605
setLoggingType(); // Determine if we are standard, PPP, or custom. Changes logging icon accordingly.
@@ -1610,7 +1615,7 @@ void logUpdate()
16101615
{
16111616
lastFileReport = millis();
16121617

1613-
if (settings.enablePrintLogFileStatus)
1618+
if ((settings.enablePrintLogFileStatus) && (!inMainMenu))
16141619
{
16151620
systemPrintf("Log file size: %lld", logFileSize);
16161621

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3548,6 +3548,8 @@ bool commandIndexFillActual()
35483548
}
35493549
bool commandIndexFill(bool usePossibleSettings)
35503550
{
3551+
savePossibleSettings = usePossibleSettings; // Update savePossibleSettings
3552+
35513553
int i;
35523554
const char *iCommandName;
35533555
int j;

0 commit comments

Comments
 (0)