Added wifi signal strength info (RSSI)
This commit is contained in:
parent
eecde895e4
commit
1596394b60
@ -9,7 +9,7 @@ SAB sab;
|
||||
unsigned long currentMs = 0, batteryMs = 0, buttonMs = 0;
|
||||
View1Packet v1p = {sab.getRtcManager().getDateTime(), sab.getSdCardManager().getSize(GBYTE), sab.getPowerInfo(),0};
|
||||
ViewAPPacket vap = {sab.getConnectivityManager().softAPmacAddress(), sab.getConnectivityManager().softAPSSID(), sab.getConnectivityManager().softAPIP(), sab.getConnectivityManager().softAPgetStationNum()};
|
||||
ViewSTAPacket vstap = {sab.getConnectivityManager().macAddress(), sab.getConnectivityManager().localIP()};
|
||||
ViewSTAPacket vstap = {sab.getConnectivityManager().macAddress(), sab.getConnectivityManager().localIP(), sab.getConnectivityManager().RSSI()};
|
||||
|
||||
void setup()
|
||||
{
|
||||
@ -41,6 +41,7 @@ void loop()
|
||||
vap.nbOfCon = sab.getConnectivityManager().softAPgetStationNum();
|
||||
vstap.macAddr = sab.getConnectivityManager().macAddress();
|
||||
vstap.ipAddr = sab.getConnectivityManager().localIP();
|
||||
vstap.sigStrength = sab.getConnectivityManager().RSSI();
|
||||
|
||||
sab.getScreenManager().displayView();
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ boolean view_3(Adafruit_SSD1306 &display, void *pData)
|
||||
|
||||
ViewSTAPacket *p = (ViewSTAPacket *) pData;
|
||||
|
||||
sprintf(conn_str,"Ip addr : %u.%u.%u.%u\nMac addr : \n%s\n",p->ipAddr[0], p->ipAddr[1], p->ipAddr[2], p->ipAddr[3], p->macAddr.c_str());
|
||||
sprintf(conn_str,"Ip addr : %u.%u.%u.%u\nMac addr : \n%s\nSignal : %d dB\n",p->ipAddr[0], p->ipAddr[1], p->ipAddr[2], p->ipAddr[3], p->macAddr.c_str(), p->sigStrength);
|
||||
display.println(conn_str);
|
||||
|
||||
display.setCursor(0,56);
|
||||
|
@ -29,6 +29,7 @@ typedef struct viewSTAPacket
|
||||
{
|
||||
String macAddr;
|
||||
IPAddress ipAddr;
|
||||
int sigStrength;
|
||||
} ViewSTAPacket;
|
||||
|
||||
//STA info
|
||||
|
Loading…
Reference in New Issue
Block a user