Skip to content

Commit dbcf941

Browse files
committed
Add commandIndexFillPossible and commandIndexFillActual
1 parent a909dd2 commit dbcf941

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,8 +1189,8 @@ void setup()
11891189
DMW_b("identifyBoard");
11901190
identifyBoard(); // Determine what hardware platform we are running on.
11911191

1192-
DMW_b("commandIndexFill");
1193-
if (!commandIndexFill(true)) // Initialize the command table index using possible settings
1192+
DMW_b("commandIndexFillPossible");
1193+
if (!commandIndexFillPossible()) // Initialize the command table index using possible settings
11941194
reportFatalError("Failed to allocate and fill the commandIndex!");
11951195

11961196
DMW_b("beginBoard");
@@ -1253,10 +1253,9 @@ void setup()
12531253
DMW_b("gnssDetectReceiverType");
12541254
gnssDetectReceiverType(); // If we don't know the receiver from the platform, auto-detect it. Uses settings.
12551255

1256-
DMW_b("commandIndexFill (2)");
1257-
commandIndexFill(false); // Shrink the commandIndex table now we're certain what GNSS we have
1258-
loadSettings();
1259-
recordSystemSettings();
1256+
DMW_b("commandIndexFillActual");
1257+
commandIndexFillActual(); // Shrink the commandIndex table now we're certain what GNSS we have
1258+
recordSystemSettings(); // Save the reduced settings now we're certain what GNSS we have
12601259

12611260
DMW_b("beginGnssUart");
12621261
beginGnssUart(); // Requires settings. Start the UART connected to the GNSS receiver on core 0. Start before

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,6 +3462,14 @@ bool settingPossibleOnPlatform(int i)
34623462
}
34633463

34643464
// Allocate and fill the commandIndex table
3465+
bool commandIndexFillPossible()
3466+
{
3467+
return commandIndexFill(true);
3468+
}
3469+
bool commandIndexFillActual()
3470+
{
3471+
return commandIndexFill(false);
3472+
}
34653473
bool commandIndexFill(bool usePossibleSettings)
34663474
{
34673475
int i;

0 commit comments

Comments
 (0)