Fix unintended function overload

Fix unintended function overload of WifiState
This commit is contained in:
Theo Arends 2018-10-31 11:27:40 +01:00
parent cb4c2764fd
commit 7d4312f346
2 changed files with 6 additions and 5 deletions

View File

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

View File

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