diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index eab55e9bc..648b1faad 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,6 +1,7 @@ /* 6.3.0.1 20181031 * Add wifi status to Tuya (#4221) * Add default sleep 1 to sonoff-basic to lower enrgy consumption (#4217) + * Fix unintended function overload of WifiState * * 6.3.0 20181030 * Release of v6.3.0 diff --git a/sonoff/support.ino b/sonoff/support.ino index 8831473fa..dcaa64274 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -1412,7 +1412,7 @@ void WifiBegin(uint8_t flag) AddLog(LOG_LEVEL_INFO); } -void WifiState(uint8_t state) +void WifiSetState(uint8_t state) { if (state == global_state.wifi_down) { if (state) { @@ -1427,7 +1427,7 @@ void WifiState(uint8_t state) void WifiCheckIp() { if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0)) { - WifiState(1); + WifiSetState(1); wifi_counter = WIFI_CHECK_SEC; wifi_retry = wifi_retry_init; AddLog_P((wifi_status != WL_CONNECTED) ? LOG_LEVEL_INFO : LOG_LEVEL_DEBUG_MORE, S_LOG_WIFI, PSTR(D_CONNECTED)); @@ -1439,7 +1439,7 @@ void WifiCheckIp() } wifi_status = WL_CONNECTED; } else { - WifiState(0); + WifiSetState(0); uint8_t wifi_config_tool = Settings.sta_config; wifi_status = WiFi.status(); switch (wifi_status) { @@ -1550,7 +1550,7 @@ void WifiCheck(uint8_t param) WifiCheckIp(); } if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0) && !wifi_config_type) { - WifiState(1); + WifiSetState(1); #ifdef BE_MINIMAL if (1 == RtcSettings.ota_loader) { RtcSettings.ota_loader = 0; @@ -1598,7 +1598,7 @@ void WifiCheck(uint8_t param) #endif // USE_KNX } else { - WifiState(0); + WifiSetState(0); #if defined(USE_WEBSERVER) && defined(USE_EMULATION) UdpDisconnect(); #endif // USE_EMULATION