new led management (part 2)

This commit is contained in:
Klaus K Wilting committed 2018-04-17 23:05:12 +02:00
1 parent 758a960371
commit bf6a21f44f
3 files changed
+8 -5

No files matched your search

+2 -2
View File
@@ -53,12 +53,12 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
// Insert only if it was not found on global count
if (added) {
if (sniff_type == MAC_SNIFF_WIFI ) {
set_LED(COLOR_GREEN, 20, 0, 1);
set_LED(COLOR_GREEN, 50, 0, 1);
wifis.insert(hashedmac); // add hashed MAC to wifi container
}
#ifdef BLECOUNTER
else if (sniff_type == MAC_SNIFF_BLE ) {
set_LED(COLOR_MAGENTA, 20, 0, 1);
set_LED(COLOR_MAGENTA, 50, 0, 1);
bles.insert(hashedmac); // add hashed MAC to BLE container
}
#endif
+4 -1
View File
@@ -424,7 +424,10 @@ uint64_t uptime() {
#endif
#ifdef HAS_RGB_LED
rgb_set_color(color);
if (LEDState)
rgb_set_color(color); // LED on
else
rgb_set_color(COLOR_NONE); // LED off
#endif
previousLEDState = LEDState;
LEDcount--; // decrement blink counter