mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
parent
d473d8068a
commit
8c2ff7237e
@ -1000,7 +1000,9 @@ void ArduinoOTAInit(void)
|
|||||||
{
|
{
|
||||||
ArduinoOTA.setPort(8266);
|
ArduinoOTA.setPort(8266);
|
||||||
ArduinoOTA.setHostname(my_hostname);
|
ArduinoOTA.setHostname(my_hostname);
|
||||||
if (strlen(SettingsText(SET_WEBPWD))) { ArduinoOTA.setPassword(SettingsText(SET_WEBPWD)); }
|
if (strlen(SettingsText(SET_WEBPWD))) {
|
||||||
|
ArduinoOTA.setPassword(SettingsText(SET_WEBPWD));
|
||||||
|
}
|
||||||
|
|
||||||
ArduinoOTA.onStart([]()
|
ArduinoOTA.onStart([]()
|
||||||
{
|
{
|
||||||
@ -1059,6 +1061,14 @@ void ArduinoOTAInit(void)
|
|||||||
ArduinoOTA.begin();
|
ArduinoOTA.begin();
|
||||||
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_UPLOAD "Arduino OTA " D_ENABLED " " D_PORT " 8266"));
|
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_UPLOAD "Arduino OTA " D_ENABLED " " D_PORT " 8266"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ArduinoOtaLoop(void)
|
||||||
|
{
|
||||||
|
MDNS.update();
|
||||||
|
ArduinoOTA.handle();
|
||||||
|
// Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails)
|
||||||
|
while (arduino_ota_triggered) { ArduinoOTA.handle(); }
|
||||||
|
}
|
||||||
#endif // USE_ARDUINO_OTA
|
#endif // USE_ARDUINO_OTA
|
||||||
|
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
|
@ -405,10 +405,7 @@ void loop(void)
|
|||||||
if (!serial_local) { SerialInput(); }
|
if (!serial_local) { SerialInput(); }
|
||||||
|
|
||||||
#ifdef USE_ARDUINO_OTA
|
#ifdef USE_ARDUINO_OTA
|
||||||
MDNS.update();
|
ArduinoOtaLoop();
|
||||||
ArduinoOTA.handle();
|
|
||||||
// Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails)
|
|
||||||
while (arduino_ota_triggered) ArduinoOTA.handle();
|
|
||||||
#endif // USE_ARDUINO_OTA
|
#endif // USE_ARDUINO_OTA
|
||||||
|
|
||||||
uint32_t my_activity = millis() - my_sleep;
|
uint32_t my_activity = millis() - my_sleep;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user