prevent wifictl crash and some icon updates
This commit is contained in:
@@ -446,7 +446,7 @@ void wifictl_on( void ) {
|
||||
while( wifictl_get_event( WIFICTL_OFF_REQUEST | WIFICTL_ON_REQUEST ) ) {
|
||||
yield();
|
||||
}
|
||||
wifictl_set_event( WIFICTL_ON_REQUEST );
|
||||
wifictl_set_event( WIFICTL_ON_REQUEST | WIFICTL_FIRST_RUN );
|
||||
vTaskResume( _wifictl_Task );
|
||||
}
|
||||
|
||||
@@ -462,8 +462,8 @@ void wifictl_off( void ) {
|
||||
yield();
|
||||
}
|
||||
|
||||
if ( !wifictl_get_event( WIFICTL_ACTIVE | WIFICTL_SCAN | WIFICTL_WPS_REQUEST | WIFICTL_CONNECT ) ) {
|
||||
log_i("wifictl not active");
|
||||
if ( !wifictl_get_event( WIFICTL_FIRST_RUN ) ) {
|
||||
log_i("wifictl not active, prevent first run crash");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#define WIFICTL_WPS_SUCCESS _BV(9)
|
||||
#define WIFICTL_WPS_FAILED _BV(10)
|
||||
#define WIFICTL_SCAN _BV(11)
|
||||
#define WIFICTL_FIRST_RUN _BV(12)
|
||||
|
||||
/*
|
||||
* @brief setup wifi controller routine
|
||||
|
||||
Reference in New Issue
Block a user