From c8e3488bee1a20efac0cbff03c32e2e4614755bd Mon Sep 17 00:00:00 2001 From: Sen Morgan Date: Wed, 7 Feb 2024 00:07:42 +0100 Subject: [PATCH] feat: OTA update display messages --- CommandStation-EX.ino | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CommandStation-EX.ino b/CommandStation-EX.ino index 020fc58..cd3caf1 100644 --- a/CommandStation-EX.ino +++ b/CommandStation-EX.ino @@ -172,6 +172,22 @@ void loop() TrackManager::setProgPower(POWERMODE::OFF); // Broadcast power status CommandDistributor::broadcastPower(); + DISPLAY_START ( + LCD(0,F("OTA update")); + LCD(1,F("In progress...")); + ); + }); + ArduinoOTA.onEnd([]() { + DISPLAY_START ( + LCD(0,F("OTA update")); + LCD(1,F("Complete")); + ); + }); + ArduinoOTA.onError([](ota_error_t error) { + DISPLAY_START ( + LCD(0,F("OTA update")); + LCD(1,F("Error: %d"), error); + ); }); // Set OTA password if defined #ifdef OTA_AUTH