Skip to content

Commit 9b03afc

Browse files
committed
Add set support for profileNumber
1 parent b45f39f commit 9b03afc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,8 @@ SettingValueResponse updateSettingWithValue(bool inCommands, const char *setting
13411341

13421342
ESP.restart();
13431343
}
1344+
1345+
//setProfile was used in the original Web Config interface
13441346
else if (strcmp(settingName, "setProfile") == 0)
13451347
{
13461348
// Change to new profile
@@ -1365,6 +1367,21 @@ SettingValueResponse updateSettingWithValue(bool inCommands, const char *setting
13651367
sendStringToWebsocket(settingsCSV);
13661368
knownSetting = true;
13671369
}
1370+
1371+
//profileNumber is used in the newer CLI with get/set capabilities
1372+
else if (strcmp(settingName, "profileNumber") == 0)
1373+
{
1374+
// Change to new profile
1375+
if (settings.debugCLI == true)
1376+
systemPrintf("Changing to profile number %d\r\n", settingValue);
1377+
changeProfileNumber(settingValue);
1378+
1379+
// Load new profile into system
1380+
loadSettings();
1381+
1382+
knownSetting = true;
1383+
}
1384+
13681385
else if (strcmp(settingName, "resetProfile") == 0)
13691386
{
13701387
settingsToDefaults(); // Overwrite our current settings with defaults

0 commit comments

Comments
 (0)