fix initialize network detection preferences
This commit is contained in:
2
Config.h
2
Config.h
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define NUKI_HUB_VERSION "8.2"
|
||||
#define NUKI_HUB_VERSION "8.3"
|
||||
|
||||
#define MQTT_QOS_LEVEL 1
|
||||
#define MQTT_CLEAN_SESSIONS false
|
||||
@@ -38,7 +38,7 @@ void Network::setupDevice()
|
||||
if(hardwareDetect == 0)
|
||||
{
|
||||
hardwareDetect = 2;
|
||||
_preferences->putInt(preference_network_hardware_gpio, hardwareDetect);
|
||||
_preferences->putInt(preference_network_hardware, hardwareDetect);
|
||||
}
|
||||
if(hardwareDetectGpio == 0)
|
||||
{
|
||||
@@ -65,7 +65,8 @@ void Network::setupDevice()
|
||||
Log->println(F(" for network device selection"));
|
||||
|
||||
pinMode(hardwareDetectGpio, INPUT_PULLUP);
|
||||
_networkDeviceType = digitalRead(hardwareDetectGpio) == HIGH ? NetworkDeviceType::WiFi : NetworkDeviceType::W5500;
|
||||
_networkDeviceType = NetworkDeviceType::W5500;
|
||||
// digitalRead(hardwareDetectGpio) == HIGH ? NetworkDeviceType::WiFi : NetworkDeviceType::W5500;
|
||||
}
|
||||
else if(hardwareDetect == 3)
|
||||
{
|
||||
|
||||
@@ -569,7 +569,7 @@ void WebCfgServer::buildOtaHtml(String &response)
|
||||
{
|
||||
buildHtmlHeader(response);
|
||||
|
||||
if(millis() < 20000)
|
||||
if(millis() < 60000)
|
||||
{
|
||||
response.concat("OTA functionality not ready. Please wait a moment and reload.");
|
||||
response.concat("</BODY></HTML>");
|
||||
|
||||
Reference in New Issue
Block a user