Skip to content

Commit d3ef76c

Browse files
committed
OTA: Support WiFi setup and firmware update as one change
Always display the update button and menu item, remove the requirement check for new firmware qualification. When the settings are written back to to the GNSS device the system is able to establish the connection to the remote access point using the newly specified WIFI SSID and password and then perform the OTA firmware update. Note: Due to the WiFi restart the connection is broken between the browser and the GNSS device. As a result, the browser does not receive the status update message for the progress bar and reset. Prior to this change the user would need to check for new firmware before performing the firmware update: 1. Use a browser to connect to 192.168.4.1 2. Click on the "WiFi Configuration" button 3. Specify the WiFi SSID and Password 4. Click on the "Save Configuration" button 5. Reconnect the browser to 192.168.4.1 6. Click on the "System Configuration" button 7. Click on the "Check for New Firmware" button 8. If new firmware is available, click on the "Update to vXX.YY" button While it is possible to change the WiFi SSID and password and then hit the "Check for New Firmware" button the response gets lost because of the WiFi restart. When the browser is reconnected the "Update to vXX.YY" button is still disabled because the page got reloaded and the browser does not have the new firmware version. As such, the "Check for New Firmware" button needs to be pressed again to get the new firmware version and enable the "Update to vXX.YY" button.
1 parent 6d351ae commit d3ef76c

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

Firmware/RTK_Everywhere/AP-Config/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,13 +1982,13 @@
19821982
</div>
19831983
<br>
19841984

1985-
<div align="center" id="divGetNewFirmware" style="display:none">
1985+
<div align="center" id="divGetNewFirmware">
19861986
<button type="button" id="btnGetNewFirmware" class="btn btn-primary box-margin20"
1987-
onClick="getNewFirmware()">Update to v3.14.15</button>
1987+
onClick="getNewFirmware()">Update to lastest firmware</button>
19881988

1989-
<center><progress id="firmwareUpdateProgressBar" value="12" max="100"
1989+
<center><progress id="firmwareUpdateProgressBar" value="0" max="100"
19901990
style="width:300px;"></progress>
1991-
<p id="firmwareUpdateProgressMsg" class="inlineSuccess">37%</p>
1991+
<p id="firmwareUpdateProgressMsg" class="inlineSuccess">0%</p>
19921992
</center>
19931993
</div>
19941994
</div>
@@ -2511,4 +2511,4 @@
25112511
</script>
25122512
</body>
25132513

2514-
</html>
2514+
</html>

Firmware/RTK_Everywhere/menuFirmware.ino

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -630,15 +630,11 @@ void otaMenuDisplay(char *currentVersion)
630630
systemPrintf("s) Change Firmware JSON URL: %s\r\n", otaFirmwareJsonUrl);
631631
}
632632

633-
if (firmwareVersionIsReportedNewer(otaReportedVersion, &currentVersion[1]) == true ||
634-
settings.debugFirmwareUpdate == true)
635-
{
636-
systemPrintf("u) Update to new firmware: v%s - ", otaReportedVersion);
637-
if (otaRequestFirmwareUpdate == true)
638-
systemPrintln("Requested");
639-
else
640-
systemPrintln("Not requested");
641-
}
633+
systemPrintf("u) Update to new firmware: v%s - ", otaReportedVersion);
634+
if (otaRequestFirmwareUpdate == true)
635+
systemPrintln("Requested");
636+
else
637+
systemPrintln("Not requested");
642638
}
643639

644640
//----------------------------------------
@@ -675,7 +671,7 @@ bool otaMenuProcessInput(byte incoming)
675671
getUserInputString(otaFirmwareJsonUrl, sizeof(otaFirmwareJsonUrl) - 1);
676672
}
677673

678-
else if ((incoming == 'u') && (newOTAFirmwareAvailable || settings.debugFirmwareUpdate == true))
674+
else if (incoming == 'u')
679675
otaRequestFirmwareUpdate ^= 1; // Tell network we need access, and otaUpdate() that we want to update
680676

681677
// Input not associated with OTA menu items

0 commit comments

Comments
 (0)