Skip to content

Commit 8eb02a1

Browse files
committed
Make OTA use network consumers
1 parent 104ed2f commit 8eb02a1

File tree

5 files changed

+129
-106
lines changed

5 files changed

+129
-106
lines changed

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void discardUdpServerBytes(RING_BUFFER_OFFSET previousTail, RING_BUFFER_OFFSET n
113113
#ifndef COMPILE_OTA_AUTO
114114

115115
void otaAutoUpdate() {}
116-
void otaAutoUpdateStop() {}
116+
void otaUpdateStop() {}
117117
void otaVerifyTables() {}
118118

119119
#endif // COMPILE_OTA_AUTO

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ char otaRcFirmwareJsonUrl[OTA_FIRMWARE_JSON_URL_LENGTH];
334334
bool apConfigFirmwareUpdateInProcess; // Goes true once WiFi is connected and OTA pull begins
335335
unsigned int binBytesSent; // Tracks firmware bytes sent over WiFi OTA update via AP config.
336336

337+
bool otaRequestFirmwareVersionCheck = false;
338+
bool otaRequestFirmwareUpdate = false;
339+
337340
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
338341
// Connection settings to NTRIP Caster
339342
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -1251,7 +1254,7 @@ void loop()
12511254
printReports(); // Periodically print GNSS coordinates and accuracy if enabled
12521255

12531256
DMW_c("otaAutoUpdate");
1254-
otaAutoUpdate();
1257+
otaUpdate(); // Initiate firmware version checks, scheduled automatic updates, or requested firmware over-the-air updates
12551258

12561259
DMW_c("correctionUpdateSource");
12571260
correctionUpdateSource(); // Retire expired sources

Firmware/RTK_Everywhere/menuCommands.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ SettingValueResponse updateSettingWithValue(bool inCommands, const char *setting
13551355
sendStringToWebsocket((char *)"gettingNewFirmware,1,");
13561356

13571357
apConfigFirmwareUpdateInProcess = true;
1358-
otaUpdate(); // otaUpdate will call wifiConnect if needed. Also does previouslyConnected check
1358+
otaForcedUpdate(); // otaForcedUpdate will call wifiConnect if needed. Also does previouslyConnected check
13591359

13601360
// We get here if WiFi failed to connect
13611361
sendStringToWebsocket((char *)"gettingNewFirmware,ERROR,");

0 commit comments

Comments
 (0)