fix clipped ssid/ip label #75

This commit is contained in:
sharandac
2020-08-27 12:53:59 +02:00
parent daea3e145c
commit 467e5cf0e6
8 changed files with 32 additions and 9 deletions

View File

@@ -115,10 +115,8 @@ void wifictl_setup( void ) {
wifictl_save_config();
}
wifictl_clear_event( WIFICTL_OFF_REQUEST | WIFICTL_ON_REQUEST | WIFICTL_SCAN | WIFICTL_WPS_REQUEST );
String label( wifiname );
label.concat(' ');
label.concat( WiFi.localIP().toString() );
wifictl_send_event_cb( WIFICTL_CONNECT, (char *)label.c_str() );
wifictl_send_event_cb( WIFICTL_CONNECT, (char*)WiFi.SSID().c_str() );
wifictl_send_event_cb( WIFICTL_CONNECT_IP, (char*)WiFi.localIP().toString().c_str() );
if ( wifictl_config.webserver ) {
asyncwebserver_start();
}

View File

@@ -54,7 +54,8 @@
} wifictl_event_t;
#define WIFICTL_CONNECT _BV(0)
#define WIFICTL_DISCONNECT _BV(1)
#define WIFICTL_CONNECT_IP _BV(1)
#define WIFICTL_DISCONNECT _BV(2)
#define WIFICTL_ON _BV(3)
#define WIFICTL_OFF _BV(4)
#define WIFICTL_ACTIVE _BV(5)