diff --git a/src/macsniff.cpp b/src/macsniff.cpp index a377d01b..6084d6be 100644 --- a/src/macsniff.cpp +++ b/src/macsniff.cpp @@ -50,22 +50,14 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) { // Insert only if it was not found on global count if (added) { - //char buff[16]; - //snprintf(buff, sizeof(buff), "PAX:%-4d", (int) macs.size()); // convert 16-bit MAC counter to decimal counter value - //u8x8.draw2x2String(0, 0, buff); // display number on unique macs total Wifi + BLE - if (sniff_type == MAC_SNIFF_WIFI ) { rgb_set_color(COLOR_GREEN); wifis.insert(hashedmac); // add hashed MAC to wifi container - //u8x8.setCursor(0,4); - //u8x8.printf("WIFI: %-4d", (int) wifis.size()); - } + } #ifdef BLECOUNTER - else if (sniff_type == MAC_SNIFF_BLE ) { - rgb_set_color(COLOR_MAGENTA); - bles.insert(hashedmac); // add hashed MAC to BLE container - //u8x8.setCursor(0,3); - //u8x8.printf("BLTH: %-4d", (int) bles.size()); + else if (sniff_type == MAC_SNIFF_BLE ) { + rgb_set_color(COLOR_MAGENTA); + bles.insert(hashedmac); // add hashed MAC to BLE container } #endif diff --git a/src/main.cpp b/src/main.cpp index 73ebc35f..c3dd607c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -272,15 +272,7 @@ void sniffer_loop(void * pvParameters) { channel = (channel % WIFI_CHANNEL_MAX) + 1; // rotates variable channel 1..WIFI_CHANNEL_MAX wifi_sniffer_set_channel(channel); ESP_LOGD(TAG, "Wifi set channel %d", channel); -/* - snprintf(buff, sizeof(buff), "PAX:%d", (int) macs.size()); // convert 16-bit MAC counter to decimal counter value - u8x8.draw2x2String(0, 0, buff); // display number on unique macs total - - u8x8.setCursor(11,4); - u8x8.printf("ch:%02i", channel); - u8x8.setCursor(0,5); - u8x8.printf(!cfg.rssilimit ? "RLIM: off" : "RLIM: %-3d", cfg.rssilimit); -*/ + // duration of one wifi scan loop reached? then send data and begin new scan cycle if ( nloop >= ( (100 / cfg.wifichancycle) * (cfg.wifiscancycle * 2)) +1 ) { u8x8.setPowerSave(!cfg.screenon); // set display on if enabled @@ -538,8 +530,10 @@ void loop() { u8x8.draw2x2String(0, 0, buff); // display number on unique macs total Wifi + BLE u8x8.setCursor(0,4); u8x8.printf("WIFI: %-4d", (int) wifis.size()); - u8x8.setCursor(0,3); - u8x8.printf("BLTH: %-4d", (int) bles.size()); + #ifdef BLECOUNTER + u8x8.setCursor(0,3); + u8x8.printf("BLTH: %-4d", (int) bles.size()); + #endif // display actual wifi channel (line 4) u8x8.setCursor(11,4); u8x8.printf("ch:%02i", channel);