Displayed state of the AP and/or STA (is it enabled or not)
This commit is contained in:
parent
49a37a34f3
commit
e36fca5326
@ -40,7 +40,11 @@ boolean view_2(Adafruit_SSD1306 &display, void *pData)
|
|||||||
|
|
||||||
ViewAPPacket *p = (ViewAPPacket *) pData;
|
ViewAPPacket *p = (ViewAPPacket *) pData;
|
||||||
|
|
||||||
sprintf(conn_str,"Ip addr : %u.%u.%u.%u\nMac addr : \n%s\nConns : %u\nSSID : %s\n" ,p->ipAddr[0], p->ipAddr[1], p->ipAddr[2], p->ipAddr[3], p->macAddr.c_str(), p->nbOfCon, p->ssid.c_str());
|
if(p->enabled)
|
||||||
|
sprintf(conn_str,"Ip addr : %u.%u.%u.%u\nMac addr : \n%s\nConns : %u\nSSID : %s\n" ,p->ipAddr[0], p->ipAddr[1], p->ipAddr[2], p->ipAddr[3], p->macAddr.c_str(), p->nbOfCon, p->ssid.c_str());
|
||||||
|
else
|
||||||
|
sprintf(conn_str,"AP connectivity\nis not enabled\nCheck the cfg file\n");
|
||||||
|
|
||||||
display.println(conn_str);
|
display.println(conn_str);
|
||||||
|
|
||||||
display.setCursor(0,56);
|
display.setCursor(0,56);
|
||||||
@ -55,7 +59,11 @@ boolean view_3(Adafruit_SSD1306 &display, void *pData)
|
|||||||
|
|
||||||
ViewSTAPacket *p = (ViewSTAPacket *) pData;
|
ViewSTAPacket *p = (ViewSTAPacket *) pData;
|
||||||
|
|
||||||
sprintf(conn_str,"Ip addr : %u.%u.%u.%u\nMac addr : \n%s\nSignal : %d dBm\n", p->ipAddr[0], p->ipAddr[1], p->ipAddr[2], p->ipAddr[3], p->macAddr.c_str(), p->sigStrength);
|
if(p->enabled)
|
||||||
|
sprintf(conn_str,"Ip addr : %u.%u.%u.%u\nMac addr : \n%s\nSignal : %d dBm\n", p->ipAddr[0], p->ipAddr[1], p->ipAddr[2], p->ipAddr[3], p->macAddr.c_str(), p->sigStrength);
|
||||||
|
else
|
||||||
|
sprintf(conn_str,"STA connectivity\nis not enabled\nCheck the cfg file\n");
|
||||||
|
|
||||||
display.println(conn_str);
|
display.println(conn_str);
|
||||||
|
|
||||||
display.setCursor(0,56);
|
display.setCursor(0,56);
|
||||||
|
@ -22,6 +22,7 @@ typedef struct viewAPPacket
|
|||||||
String ssid;
|
String ssid;
|
||||||
IPAddress ipAddr;
|
IPAddress ipAddr;
|
||||||
uint8_t nbOfCon;
|
uint8_t nbOfCon;
|
||||||
|
boolean enabled;
|
||||||
} ViewAPPacket;
|
} ViewAPPacket;
|
||||||
|
|
||||||
//AP info
|
//AP info
|
||||||
@ -32,6 +33,7 @@ typedef struct viewSTAPacket
|
|||||||
String macAddr;
|
String macAddr;
|
||||||
IPAddress ipAddr;
|
IPAddress ipAddr;
|
||||||
int sigStrength;
|
int sigStrength;
|
||||||
|
boolean enabled;
|
||||||
} ViewSTAPacket;
|
} ViewSTAPacket;
|
||||||
|
|
||||||
//STA info
|
//STA info
|
||||||
|
Loading…
Reference in New Issue
Block a user