disable all automatic restarts when OTA has started
This commit is contained in:
@@ -9,7 +9,6 @@ W5500Device::W5500Device(const String &hostname, Preferences* preferences)
|
||||
_preferences(preferences)
|
||||
{
|
||||
initializeMacAddress(_mac);
|
||||
_restartOnDisconnect = _preferences->getBool(preference_restart_on_disconnect);
|
||||
|
||||
Serial.print("MAC Adress: ");
|
||||
for(int i=0; i < 6; i++)
|
||||
@@ -47,10 +46,7 @@ void W5500Device::initialize()
|
||||
|
||||
bool W5500Device::reconnect()
|
||||
{
|
||||
if(_restartOnDisconnect && millis() > 60000)
|
||||
{
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
|
||||
_hasDHCPAddress = false;
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ private:
|
||||
|
||||
int _maintainResult = 0;
|
||||
bool _hasDHCPAddress = false;
|
||||
bool _restartOnDisconnect = false;
|
||||
|
||||
byte _mac[6];
|
||||
};
|
||||
Reference in New Issue
Block a user