File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
ports/espressif/common-hal/wifi Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,12 @@ static bool wifi_ever_inited;
141
141
static bool wifi_user_initiated ;
142
142
143
143
void common_hal_wifi_init (bool user_initiated ) {
144
+ wifi_radio_obj_t * self = & common_hal_wifi_radio_obj ;
145
+
144
146
if (wifi_inited ) {
147
+ if (user_initiated && !wifi_user_initiated ) {
148
+ common_hal_wifi_radio_set_enabled (self , true);
149
+ }
145
150
return ;
146
151
}
147
152
wifi_inited = true;
@@ -154,7 +159,6 @@ void common_hal_wifi_init(bool user_initiated) {
154
159
}
155
160
wifi_ever_inited = true;
156
161
157
- wifi_radio_obj_t * self = & common_hal_wifi_radio_obj ;
158
162
self -> netif = esp_netif_create_default_wifi_sta ();
159
163
self -> ap_netif = esp_netif_create_default_wifi_ap ();
160
164
self -> started = false;
@@ -204,6 +208,7 @@ void common_hal_wifi_init(bool user_initiated) {
204
208
void wifi_user_reset (void ) {
205
209
if (wifi_user_initiated ) {
206
210
wifi_reset ();
211
+ wifi_user_initiated = false;
207
212
}
208
213
}
209
214
You can’t perform that action at this time.
0 commit comments