mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 04:27:12 +03:00
Fix: don't delete AP details when connect fails.
This commit is contained in:
@@ -298,7 +298,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h2>Firmware URL:</h2>
|
<h2>Firmware URL:</h2>
|
||||||
<textarea id="fwurl" maxlength="120"></textarea>
|
<textarea id="fwurl" maxlength="350"></textarea>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<input type="button" id="flash" class="btn btn-danger" value="Flash!" /><span id="flash-status"></span>
|
<input type="button" id="flash" class="btn btn-danger" value="Flash!" /><span id="flash-status"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1279,12 +1279,12 @@ void wifi_manager( void * pvParameters ){
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* erase configuration */
|
/* erase configuration */
|
||||||
// if(wifi_manager_config_sta){
|
if(wifi_manager_config_sta){
|
||||||
// ESP_LOGI(TAG, "Erasing WiFi Configuration.");
|
ESP_LOGI(TAG, "Erasing WiFi Configuration.");
|
||||||
// memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
||||||
// /* save NVS memory */
|
/* save NVS memory */
|
||||||
// wifi_manager_save_sta_config();
|
wifi_manager_save_sta_config();
|
||||||
// }
|
}
|
||||||
/* start SoftAP */
|
/* start SoftAP */
|
||||||
ESP_LOGD(TAG, "Disconnect processing complete. Ordering an AP start.");
|
ESP_LOGD(TAG, "Disconnect processing complete. Ordering an AP start.");
|
||||||
wifi_manager_send_message(ORDER_START_AP, NULL);
|
wifi_manager_send_message(ORDER_START_AP, NULL);
|
||||||
@@ -1311,12 +1311,12 @@ void wifi_manager( void * pvParameters ){
|
|||||||
xEventGroupClearBits(wifi_manager_event_group, WIFI_MANAGER_REQUEST_RESTORE_STA_BIT);
|
xEventGroupClearBits(wifi_manager_event_group, WIFI_MANAGER_REQUEST_RESTORE_STA_BIT);
|
||||||
|
|
||||||
/* erase configuration that could not be used to connect */
|
/* erase configuration that could not be used to connect */
|
||||||
if(wifi_manager_config_sta){
|
// if(wifi_manager_config_sta){
|
||||||
ESP_LOGW(TAG, "Erasing wifi manager config.");
|
// ESP_LOGW(TAG, "Erasing wifi manager config.");
|
||||||
memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
// memset(wifi_manager_config_sta, 0x00, sizeof(wifi_config_t));
|
||||||
/* save empty connection info in NVS memory */
|
// /* save empty connection info in NVS memory */
|
||||||
wifi_manager_save_sta_config();
|
// wifi_manager_save_sta_config();
|
||||||
}
|
// }
|
||||||
ESP_LOGD(TAG, "Issuing ORDER_START_AP to trigger AP start.");
|
ESP_LOGD(TAG, "Issuing ORDER_START_AP to trigger AP start.");
|
||||||
/* start SoftAP */
|
/* start SoftAP */
|
||||||
wifi_manager_send_message(ORDER_START_AP, NULL);
|
wifi_manager_send_message(ORDER_START_AP, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user