Skip to content

Commit d02ab36

Browse files
committed
Add debugSettings to debug menu
1 parent 9003230 commit d02ab36

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

Firmware/RTK_Everywhere/Begin.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,12 @@ void beginFS()
11061106
{
11071107
systemPrintln("LittleFS Started");
11081108
online.fs = true;
1109+
1110+
if (settings.debugSettings)
1111+
{
1112+
systemPrintf("LittleFS total bytes: %d\r\n", LittleFS.totalBytes());
1113+
systemPrintf("LittleFS used bytes: %d\r\n", LittleFS.usedBytes());
1114+
}
11091115
}
11101116
}
11111117
}

Firmware/RTK_Everywhere/NVM.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ void recordSystemSettingsToFileLFS(char *fileName)
216216
{
217217
recordSystemSettingsToFile(&settingsFile); // Record all the settings via strings to file
218218
settingsFile.close();
219-
log_d("Settings recorded to LittleFS: %s", fileName);
219+
if (settings.debugSettings)
220+
systemPrintf("Settings recorded to LittleFS: %s\r\n", fileName);
220221
}
221222
}
222223
}

Firmware/RTK_Everywhere/menuSystem.ino

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ void menuDebugHardware()
457457
if (present.radio_lora)
458458
systemPrintln("17) STM32 direct connect");
459459

460+
systemPrintln("18) Display littleFS stats");
461+
460462
systemPrintln("e) Erase LittleFS");
461463

462464
systemPrintln("t) Test Screen");
@@ -544,6 +546,11 @@ void menuDebugHardware()
544546
ESP.restart();
545547
}
546548
}
549+
else if (incoming == 18)
550+
{
551+
systemPrintf("LittleFS total bytes: %d\r\n", LittleFS.totalBytes());
552+
systemPrintf("LittleFS used bytes: %d\r\n", LittleFS.usedBytes());
553+
}
547554

548555
else if (incoming == 'e')
549556
{
@@ -722,7 +729,7 @@ void menuDebugSoftware()
722729

723730
systemPrintf("3) WiFi Connect Timeout (ms): %d\r\n", settings.wifiConnectTimeoutMs);
724731

725-
// Ring buffer - ZED Tx
732+
// Ring buffer
726733
systemPrint("10) Print ring buffer offsets: ");
727734
systemPrintf("%s\r\n", settings.enablePrintRingBufferOffsets ? "Enabled" : "Disabled");
728735

@@ -767,6 +774,10 @@ void menuDebugSoftware()
767774

768775
systemPrintf("34) Print partition table: %s\r\n", settings.printPartitionTable ? "Enabled" : "Disabled");
769776

777+
// Debug
778+
779+
systemPrintf("40) Print LittleFS and settings management: %s\r\n", settings.debugSettings ? "Enabled" : "Disabled");
780+
770781
// Tasks
771782
systemPrint("50) Task Highwater Reporting: ");
772783
if (settings.enableTaskReports == true)
@@ -850,6 +861,9 @@ void menuDebugSoftware()
850861
else if (incoming == 34)
851862
settings.printPartitionTable ^= 1;
852863

864+
else if (incoming == 40)
865+
settings.debugSettings ^= 1;
866+
853867
else if (incoming == 50)
854868
settings.enableTaskReports ^= 1;
855869
else if (incoming == 51)

0 commit comments

Comments
 (0)