Skip to content

Commit b132b67

Browse files
committed
OTA: Add periodic display of OTA firmware update state
1 parent 359c305 commit b132b67

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Firmware/RTK_Everywhere/menuFirmware.ino

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,17 @@ void otaUpdate()
922922
break;
923923
}
924924
}
925+
926+
// Periodically display the state
927+
if (PERIODIC_DISPLAY(PD_OTA_STATE))
928+
{
929+
char line[30];
930+
const char * state;
931+
932+
PERIODIC_CLEAR(PD_OTA_STATE);
933+
state = otaStateNameGet(otaState, line);
934+
systemPrintf("OTA Firmware Update state: %s\r\n", state);
935+
}
925936
}
926937

927938
//----------------------------------------

Firmware/RTK_Everywhere/menuSystem.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,9 @@ void menuPeriodicPrint()
12321232
systemPrint("59) WebServer state: ");
12331233
systemPrintf("%s\r\n", PERIODIC_SETTING(PD_WEB_SERVER_STATE) ? "Enabled" : "Disabled");
12341234

1235+
systemPrint("60) OTA firmware update state: ");
1236+
systemPrintf("%s\r\n", PERIODIC_SETTING(PD_OTA_STATE) ? "Enabled" : "Disabled");
1237+
12351238
systemPrintln("------- Tasks ------");
12361239
systemPrint("70) btReadTask state: ");
12371240
systemPrintf("%s\r\n", PERIODIC_SETTING(PD_TASK_BLUETOOTH_READ) ? "Enabled" : "Disabled");
@@ -1339,6 +1342,8 @@ void menuPeriodicPrint()
13391342
PERIODIC_TOGGLE(PD_UDP_SERVER_BROADCAST_DATA);
13401343
else if (incoming == 59)
13411344
PERIODIC_TOGGLE(PD_WEB_SERVER_STATE);
1345+
else if (incoming == 60)
1346+
PERIODIC_TOGGLE(PD_OTA_STATE);
13421347

13431348
else if (incoming == 70)
13441349
PERIODIC_TOGGLE(PD_TASK_BLUETOOTH_READ);

Firmware/RTK_Everywhere/settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ enum PeriodDisplayValues
332332
PD_GNSS_DATA_RX_BYTE_COUNT, // 38
333333

334334
PD_WEB_SERVER_STATE, // 39
335+
336+
PD_OTA_STATE, // 40
335337
// Add new values before this line
336338
};
337339

0 commit comments

Comments
 (0)