mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-01-27 12:50:49 +03:00
fix power save boot loop in IDF v4.0 - release
Disabled power save none, as this causes a boot loop under the latest esp-idf v4.0 release
This commit is contained in:
@@ -272,18 +272,18 @@ void wifi_manager_init_wifi(){
|
||||
ESP_LOGD(TAG, "Initializing wifi. Setting WiFi mode to WIFI_MODE_NULL");
|
||||
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_NULL) );
|
||||
ESP_LOGD(TAG, "Initializing wifi. Starting wifi");
|
||||
char * disable_ps = config_alloc_get_default(NVS_TYPE_STR, "disable_ps", "n", 0);
|
||||
// char * disable_ps = config_alloc_get_default(NVS_TYPE_STR, "disable_ps", "n", 0);
|
||||
|
||||
if (gpio36_39_used || (disable_ps && strcasecmp(disable_ps,"y")==0)) {
|
||||
if(gpio36_39_used){
|
||||
ESP_LOGW(TAG, "GPIO 36 or 39 are in use, need to disable WiFi PowerSave!");
|
||||
}
|
||||
else {
|
||||
ESP_LOGW(TAG, "wifi powersave config is disabled. Disabling WiFi PowerSave!");
|
||||
}
|
||||
esp_wifi_set_ps(WIFI_PS_NONE);
|
||||
}
|
||||
FREE_AND_NULL(disable_ps);
|
||||
// if (gpio36_39_used || (disable_ps && strcasecmp(disable_ps,"y")==0)) {
|
||||
// if(gpio36_39_used){
|
||||
// ESP_LOGW(TAG, "GPIO 36 or 39 are in use, need to disable WiFi PowerSave!");
|
||||
// }
|
||||
// else {
|
||||
// ESP_LOGW(TAG, "wifi powersave config is disabled. Disabling WiFi PowerSave!");
|
||||
// }
|
||||
// esp_wifi_set_ps(WIFI_PS_NONE);
|
||||
// }
|
||||
// FREE_AND_NULL(disable_ps);
|
||||
ESP_ERROR_CHECK( esp_wifi_start() );
|
||||
|
||||
taskYIELD();
|
||||
|
||||
@@ -145,7 +145,7 @@ extern "C" {
|
||||
* Value: WIFI_PS_MODEM for power save (wifi modem sleep periodically)
|
||||
* Note: Power save is only effective when in STA only mode
|
||||
*/
|
||||
#define DEFAULT_STA_POWER_SAVE WIFI_PS_NONE
|
||||
#define DEFAULT_STA_POWER_SAVE WIFI_PS_MIN_MODEM
|
||||
|
||||
/**
|
||||
* @brief Defines the maximum length in bytes of a JSON representation of an access point.
|
||||
|
||||
Reference in New Issue
Block a user