mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-15 00:46:31 +02:00
Correct OTA update process show message on display
This commit is contained in:
@ -381,6 +381,31 @@ void OledDisplay::showNewFirmwareFailed(void) {
|
||||
DISP()->setFont(u8g2_font_t0_16_tf);
|
||||
setCentralText(20, "Firmware Update");
|
||||
setCentralText(40, "Failed");
|
||||
setCentralText(60, String("Retry after 24h"));
|
||||
} while (DISP()->nextPage());
|
||||
}
|
||||
|
||||
void OledDisplay::showNewFirmwareSkipped(void) {
|
||||
if (isDisplayOff) {
|
||||
return;
|
||||
}
|
||||
|
||||
DISP()->firstPage();
|
||||
do {
|
||||
DISP()->setFont(u8g2_font_t0_16_tf);
|
||||
setCentralText(20, "Firmware Update");
|
||||
setCentralText(40, "skipped");
|
||||
} while (DISP()->nextPage());
|
||||
}
|
||||
|
||||
void OledDisplay::showNewFirmwareUpToDate(void) {
|
||||
if (isDisplayOff) {
|
||||
return;
|
||||
}
|
||||
|
||||
DISP()->firstPage();
|
||||
do {
|
||||
DISP()->setFont(u8g2_font_t0_16_tf);
|
||||
setCentralText(20, "Firmware Update");
|
||||
setCentralText(40, "up to date");
|
||||
} while (DISP()->nextPage());
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ public:
|
||||
void showNewFirmwareUpdating(String percent);
|
||||
void showNewFirmwareSuccess(String count);
|
||||
void showNewFirmwareFailed(void);
|
||||
void showNewFirmwareSkipped(void);
|
||||
void showNewFirmwareUpToDate(void);
|
||||
};
|
||||
|
||||
#endif /** _AG_OLED_DISPLAY_H_ */
|
||||
|
Reference in New Issue
Block a user