Browse Source

Using WIFI_NONE_SLEEP by default

rfm69
Xose Pérez 6 years ago
parent
commit
f7a62030b8
2 changed files with 6 additions and 8 deletions
  1. +5
    -5
      code/espurna/config/general.h
  2. +1
    -3
      code/espurna/wifi.ino

+ 5
- 5
code/espurna/config/general.h View File

@ -333,12 +333,12 @@ PROGMEM const char* const custom_reset_string[] = {
// WIFI // WIFI
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#define WIFI_CONNECT_TIMEOUT 60000 // Connecting timeout for WIFI in ms
#define WIFI_RECONNECT_INTERVAL 180000 // If could not connect to WIFI, retry after this time in ms
#define WIFI_MAX_NETWORKS 5 // Max number of WIFI connection configurations
#define WIFI_CONNECT_TIMEOUT 60000 // Connecting timeout for WIFI in ms
#define WIFI_RECONNECT_INTERVAL 180000 // If could not connect to WIFI, retry after this time in ms
#define WIFI_MAX_NETWORKS 5 // Max number of WIFI connection configurations
#define WIFI_AP_MODE AP_MODE_ALONE #define WIFI_AP_MODE AP_MODE_ALONE
#define WIFI_SLEEP_ENABLED 1 // Enable WiFi light sleep
#define WIFI_SCAN_NETWORKS 1 // Perform a network scan before connecting
#define WIFI_SLEEP_MODE WIFI_NONE_SLEEP // WIFI_NONE_SLEEP, WIFI_LIGHT_SLEEP or WIFI_MODEM_SLEEP
#define WIFI_SCAN_NETWORKS 1 // Perform a network scan before connecting
// Optional hardcoded configuration (up to 2 networks) // Optional hardcoded configuration (up to 2 networks)
#ifndef WIFI1_SSID #ifndef WIFI1_SSID


+ 1
- 3
code/espurna/wifi.ino View File

@ -405,9 +405,7 @@ void wifiRegister(wifi_callback_f callback) {
void wifiSetup() { void wifiSetup() {
#if WIFI_SLEEP_ENABLED
wifi_set_sleep_type(LIGHT_SLEEP_T);
#endif
WiFi.setSleepMode(WIFI_SLEEP_MODE);
_wifiInject(); _wifiInject();
_wifiConfigure(); _wifiConfigure();


Loading…
Cancel
Save