mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 00:26:13 +01:00
Compare commits
No commits in common. "c8e3488bee1a20efac0cbff03c32e2e4614755bd" and "60616bb395f33c41d608ec31538cd1cd781d7584" have entirely different histories.
c8e3488bee
...
60616bb395
|
@ -163,32 +163,6 @@ void loop()
|
|||
// Initialise OTA if not already done
|
||||
if (!otaInitialised) {
|
||||
ArduinoOTA.setHostname(WIFI_HOSTNAME);
|
||||
// Prevent locos from moving during OTA
|
||||
ArduinoOTA.onStart([]() {
|
||||
// Emergency stop all locos
|
||||
DCC::setThrottle(0,1,1);
|
||||
// Disable tracks power
|
||||
TrackManager::setMainPower(POWERMODE::OFF);
|
||||
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
|
||||
ArduinoOTA.setPassword(OTA_AUTH);
|
||||
|
|
Loading…
Reference in New Issue
Block a user