fix initialize network detection preferences

This commit is contained in:
technyon
2023-02-03 21:38:33 +01:00
parent 80bddffce7
commit 339e71131e
3 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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)
{

View File

@@ -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>");