From fec52e8468f81a9770c3b300cc5a312ca3166f48 Mon Sep 17 00:00:00 2001 From: Lucidiot Date: Fri, 25 Jun 2021 17:25:10 +0200 Subject: [PATCH] Remove the hidden column --- src/main.ino | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/main.ino b/src/main.ino index a70d107..b45b696 100644 --- a/src/main.ino +++ b/src/main.ino @@ -9,7 +9,14 @@ void setup() { WiFi.mode(WIFI_STA); WiFi.disconnect(); - Serial.printf("ssid%schannel%ssignal%sencryption%sbssid%shidden%s", COLUMN_SEPARATOR, COLUMN_SEPARATOR, COLUMN_SEPARATOR, COLUMN_SEPARATOR, COLUMN_SEPARATOR, ROW_SEPARATOR); + Serial.printf( + "ssid%schannel%ssignal%sencryption%sbssid%s", + COLUMN_SEPARATOR, + COLUMN_SEPARATOR, + COLUMN_SEPARATOR, + COLUMN_SEPARATOR, + ROW_SEPARATOR + ); } void loop() { @@ -19,14 +26,14 @@ void loop() { String ssid; uint8_t encryptionType; - int32_t RSSI; - uint8_t* BSSID; + int32_t rssi; + uint8_t* bssid; int32_t channel; bool isHidden; String encryptionText; for (int i = 0; i < count; i++) { - WiFi.getNetworkInfo(i, ssid, encryptionType, RSSI, BSSID, channel, isHidden); + WiFi.getNetworkInfo(i, ssid, encryptionType, rssi, bssid, channel, isHidden); switch (encryptionType) { case ENC_TYPE_WEP: @@ -52,7 +59,19 @@ void loop() { encryptionText = String(encryptionType); } - Serial.printf("%s%s%d%s%d%s%s%s%s%s%u%s", ssid.c_str(), COLUMN_SEPARATOR, channel, COLUMN_SEPARATOR, RSSI, COLUMN_SEPARATOR, encryptionText.c_str(), COLUMN_SEPARATOR, WiFi.BSSIDstr(i).c_str(), COLUMN_SEPARATOR, isHidden, ROW_SEPARATOR); + Serial.printf( + "%s%s%d%s%d%s%s%s%s%s", + ssid.c_str(), + COLUMN_SEPARATOR, + channel, + COLUMN_SEPARATOR, + rssi, + COLUMN_SEPARATOR, + encryptionText.c_str(), + COLUMN_SEPARATOR, + WiFi.BSSIDstr(i).c_str(), + ROW_SEPARATOR + ); } delay(1000);