repair memory display
This commit is contained in:
parent
19b9e4d721
commit
996f94d401
@ -27,7 +27,7 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
|
|||||||
bool added = false;
|
bool added = false;
|
||||||
uint32_t addr2int, vendor2int; // temporary buffer for MAC and Vendor OUI
|
uint32_t addr2int, vendor2int; // temporary buffer for MAC and Vendor OUI
|
||||||
uint16_t hashedmac; // temporary buffer for generated hash value
|
uint16_t hashedmac; // temporary buffer for generated hash value
|
||||||
float memlevel; // % of used heap mem
|
uint8_t memlevel; // % of used heap mem
|
||||||
|
|
||||||
// only last 3 MAC Address bytes are used for MAC address anonymization
|
// only last 3 MAC Address bytes are used for MAC address anonymization
|
||||||
// but since it's uint32 we take 4 bytes to avoid 1st value to be 0
|
// but since it's uint32 we take 4 bytes to avoid 1st value to be 0
|
||||||
@ -53,7 +53,7 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
|
|||||||
if (added) {
|
if (added) {
|
||||||
// Display heap memory left
|
// Display heap memory left
|
||||||
memlevel = ESP.getFreeHeap() / heapmem * 100;
|
memlevel = ESP.getFreeHeap() / heapmem * 100;
|
||||||
sprintf(display_mem, "%d%%", memlevel);
|
sprintf(display_mem, "%i%%", memlevel);
|
||||||
// increment counter and one blink led
|
// increment counter and one blink led
|
||||||
if (sniff_type == MAC_SNIFF_WIFI ) {
|
if (sniff_type == MAC_SNIFF_WIFI ) {
|
||||||
macs_wifi++; // increment Wifi MACs counter
|
macs_wifi++; // increment Wifi MACs counter
|
||||||
|
@ -54,7 +54,7 @@ uint16_t LEDBlinkDuration = 0; // How long the blink need to be
|
|||||||
uint16_t LEDColor = COLOR_NONE; // state machine variable to set RGB LED color
|
uint16_t LEDColor = COLOR_NONE; // state machine variable to set RGB LED color
|
||||||
bool joinstate = false; // LoRa network joined? global flag
|
bool joinstate = false; // LoRa network joined? global flag
|
||||||
bool blinkdone = true; // flag for state machine for blinking LED once
|
bool blinkdone = true; // flag for state machine for blinking LED once
|
||||||
const uint32_t heapmem = ESP.getFreeHeap(); // free heap memory after start (:= 100%)
|
const uint32_t heapmem = ESP.getFreeHeap(); // free heap memory after start (:= 100%)
|
||||||
|
|
||||||
std::set<uint16_t> macs; // associative container holds total of unique MAC adress hashes (Wifi + BLE)
|
std::set<uint16_t> macs; // associative container holds total of unique MAC adress hashes (Wifi + BLE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user