Skip to content

Commit

Permalink
Disable JSON editing menu in production release
Browse files Browse the repository at this point in the history
  • Loading branch information
nseidle committed Mar 22, 2024
1 parent 0ea4f2a commit f92eefb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Firmware/RTK_Everywhere/menuFirmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void menuFirmware()
while (1)
{
systemPrintln();
systemPrintln("Menu: Update Firmware");
systemPrintln("Menu: Firmware Update");

if (btPrintEcho == true)
systemPrintln("Firmware update not available while configuration over Bluetooth is active");
Expand All @@ -66,8 +66,11 @@ void menuFirmware()
if (settings.enableAutoFirmwareUpdate)
systemPrintf("i) Automatic firmware check minutes: %d\r\n", settings.autoFirmwareCheckMinutes);

systemPrintf("r) Change RC Firmware JSON URL: %s\r\n", otaRcFirmwareJsonUrl);
systemPrintf("s) Change Firmware JSON URL: %s\r\n", otaFirmwareJsonUrl);
if (ENABLE_DEVELOPER)
{
systemPrintf("r) Change RC Firmware JSON URL: %s\r\n", otaRcFirmwareJsonUrl);
systemPrintf("s) Change Firmware JSON URL: %s\r\n", otaFirmwareJsonUrl);
}

if (newOTAFirmwareAvailable)
systemPrintf("u) Update to new firmware: v%s\r\n", reportedVersion);
Expand Down Expand Up @@ -178,17 +181,16 @@ void menuFirmware()
else if ((incoming == 'i') && settings.enableAutoFirmwareUpdate)
{

getNewSetting("Enter minutes before next firmware check", 1, 999999,
&settings.autoFirmwareCheckMinutes);
getNewSetting("Enter minutes before next firmware check", 1, 999999, &settings.autoFirmwareCheckMinutes);
}

else if (incoming == 'r')
else if ((incoming == 'r') && (ENABLE_DEVELOPER == true))
{
systemPrint("Enter RC Firmware JSON URL (empty to use default): ");
memset(otaRcFirmwareJsonUrl, 0, sizeof(otaRcFirmwareJsonUrl));
getUserInputString(otaRcFirmwareJsonUrl, sizeof(otaRcFirmwareJsonUrl) - 1);
}
else if (incoming == 's')
else if ((incoming == 's') && (ENABLE_DEVELOPER == true))
{
systemPrint("Enter Firmware JSON URL (empty to use default): ");
memset(otaFirmwareJsonUrl, 0, sizeof(otaFirmwareJsonUrl));
Expand Down

0 comments on commit f92eefb

Please sign in to comment.