prevent wifictl crash and some icon updates

This commit is contained in:
sharandac
2020-08-25 19:59:07 +02:00
parent 423f74785e
commit bb61be50d7
9 changed files with 489 additions and 32 deletions

View File

@@ -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;
}

View File

@@ -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