From 903183284e9b6b63c7234554c06bbf48228c0f13 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 26 Apr 2018 18:04:18 +0200 Subject: [PATCH] Check if LED at compile time --- src/macsniff.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/macsniff.cpp b/src/macsniff.cpp index 45747b27..da69ba22 100644 --- a/src/macsniff.cpp +++ b/src/macsniff.cpp @@ -57,15 +57,17 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) { // increment counter and one blink led if (sniff_type == MAC_SNIFF_WIFI ) { macs_wifi++; // increment Wifi MACs counter - if (joinstate) - blink_LED(COLOR_GREEN, 50, 0); - } + #if (HAS_LED != NOT_A_PIN) || defined (HAS_RGB_LED) + blink_LED(COLOR_GREEN, 50); + #endif + } #ifdef BLECOUNTER else if (sniff_type == MAC_SNIFF_BLE ) { macs_ble++; // increment BLE Macs counter - if (joinstate) - blink_LED(COLOR_MAGENTA, 50, 0); - } + #if (HAS_LED != NOT_A_PIN) || defined (HAS_RGB_LED) + blink_LED(COLOR_MAGENTA, 50); + #endif + } #endif }