Disabled WiFi sleep mode.

This commit is contained in:
Kai Lauterbach 2024-08-13 10:22:09 +02:00
parent 0299cd72ab
commit 99711f6d76
2 changed files with 4 additions and 3 deletions

View file

@ -3,7 +3,7 @@
// config general setting and behavior of the weatherstation // config general setting and behavior of the weatherstation
#define VERSION_STRING "1.1.2" #define VERSION_STRING "1.1.3"
#define WIFI_AUTOCONNECT_TIMEOUT_S 60 #define WIFI_AUTOCONNECT_TIMEOUT_S 60
#define WIFI_CONFIG_PORTAL_TIMEOUT_S 120 #define WIFI_CONFIG_PORTAL_TIMEOUT_S 120

View file

@ -378,6 +378,7 @@ void wifiConnect() {
WiFi.begin(WIFI_SSID, WIFI_PASSWD); WiFi.begin(WIFI_SSID, WIFI_PASSWD);
WiFi.setAutoReconnect(true); WiFi.setAutoReconnect(true);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
debug("Connecting to WLAN"); debug("Connecting to WLAN");
@ -449,7 +450,7 @@ void _fsm_loop()
{ {
// send the data to the server // send the data to the server
debug("Sending weather json data to http webserver"); debug("Sending weather json data to http webserver");
//debug(String(0) + "=" + String(currentSensorData[0])); //debug(">>>" + String(0) + "=" + String(currentSensorData[0]));
//debug(String(SENSOR_TEMPERATURE) + "=" + String(currentSensorData[SENSOR_TEMPERATURE])); //debug(String(SENSOR_TEMPERATURE) + "=" + String(currentSensorData[SENSOR_TEMPERATURE]));
http_call_send_json_data_cnt = millis(); http_call_send_json_data_cnt = millis();
http_call_send_json_data(); http_call_send_json_data();
@ -764,7 +765,7 @@ void logToSerial(float sensorValues[]) {
String getJsonData() String getJsonData()
{ {
debug(String(SENSOR_TEMPERATURE) + "=" + String(currentSensorData[SENSOR_TEMPERATURE])); //debug(String(SENSOR_TEMPERATURE) + "=" + String(currentSensorData[SENSOR_TEMPERATURE]));
String msg = hb_ws_msg_start + String msg = hb_ws_msg_start +
hb_ws_msg_temp + hb_ws_msg_temp +
String(currentSensorData[SENSOR_TEMPERATURE], 2) + String(currentSensorData[SENSOR_TEMPERATURE], 2) +