Missing Sleep mode setting at start

Missing Sleep mode setting at start
This commit is contained in:
luc 2015-05-14 15:07:14 +08:00
parent cd96d84a1c
commit 70919d0dbd

View File

@ -76,7 +76,9 @@ bool WIFI_CONFIG::Setup()
int wstatus;
IPAddress currentIP;
byte bflag=0;
//set the sleep mode
if (!CONFIG::read_byte(EP_SLEEP_MODE, &bflag ))return false;
wifi_set_sleep_type ((sleep_type)bflag);
//AP or client ?
if (!CONFIG::read_byte(EP_WIFI_MODE, &bflag ) || !CONFIG::read_string(EP_SSID, sbuf , MAX_SSID_LENGH) ||!CONFIG::read_string(EP_PASSWORD, pwd , MAX_PASSWORD_LENGH)) return false;
//disconnect if connected