fix #issue668

This commit is contained in:
Klaus K Wilting 2020-11-01 13:45:17 +01:00
parent 44758161dc
commit 8a0a3949fd
5 changed files with 23 additions and 9 deletions

View File

@ -4,6 +4,10 @@
#include "cyclic.h" #include "cyclic.h"
#include "qrcode.h" #include "qrcode.h"
#if (COUNT_ENS)
#include "corona.h"
#endif
#if (HAS_DISPLAY) == 1 #if (HAS_DISPLAY) == 1
#include <OneBitDisplay.h> #include <OneBitDisplay.h>
#elif (HAS_DISPLAY) == 2 #elif (HAS_DISPLAY) == 2

View File

@ -10,6 +10,10 @@
#include "cyclic.h" #include "cyclic.h"
#include "led.h" #include "led.h"
#if (COUNT_ENS)
#include "corona.h"
#endif
#define MAC_SNIFF_WIFI 0 #define MAC_SNIFF_WIFI 0
#define MAC_SNIFF_BLE 1 #define MAC_SNIFF_BLE 1
#define MAC_SNIFF_BLE_CWA 2 #define MAC_SNIFF_BLE_CWA 2

View File

@ -8,7 +8,10 @@
#include "lorawan.h" #include "lorawan.h"
#include "display.h" #include "display.h"
#include "sdcard.h" #include "sdcard.h"
#if (COUNT_ENS)
#include "corona.h" #include "corona.h"
#endif
extern Ticker sendTimer; extern Ticker sendTimer;

View File

@ -67,7 +67,7 @@ void dp_setup(int contrast) {
MY_DISPLAY_INVERT, USE_HW_I2C, MY_DISPLAY_SDA, MY_DISPLAY_INVERT, USE_HW_I2C, MY_DISPLAY_SDA,
MY_DISPLAY_SCL, MY_DISPLAY_RST, MY_DISPLAY_SCL, MY_DISPLAY_RST,
OLED_FREQUENCY); // use standard I2C bus at 400Khz OLED_FREQUENCY); // use standard I2C bus at 400Khz
_ASSERT (rc != OLED_NOT_FOUND); _ASSERT(rc != OLED_NOT_FOUND);
// set display buffer // set display buffer
obdSetBackBuffer(&ssoled, displaybuf); obdSetBackBuffer(&ssoled, displaybuf);
@ -265,10 +265,12 @@ void dp_drawPage(time_t t, bool nextpage) {
else else
dp_printf("WIFI:off"); dp_printf("WIFI:off");
if (cfg.blescan) if (cfg.blescan)
if (!cfg.enscount) #if (COUNT_ENS)
dp_printf("BLTH:%-5d", macs_ble); if (cfg.enscount)
else
dp_printf(" CWA:%-5d", cwa_report()); dp_printf(" CWA:%-5d", cwa_report());
else
#endif
dp_printf("BLTH:%-5d", macs_ble);
else else
dp_printf(" BLTH:off"); dp_printf(" BLTH:off");
#elif ((WIFICOUNTER) && (!BLECOUNTER)) #elif ((WIFICOUNTER) && (!BLECOUNTER))
@ -277,11 +279,13 @@ void dp_drawPage(time_t t, bool nextpage) {
else else
dp_printf("WIFI:off"); dp_printf("WIFI:off");
#elif ((!WIFICOUNTER) && (BLECOUNTER)) #elif ((!WIFICOUNTER) && (BLECOUNTER))
if (cfg.blescan) { if (cfg.blescan)
dp_printf("BLTH:%-5d", macs_ble); dp_printf("BLTH:%-5d", macs_ble);
if (cfg.enscount) #if (COUNT_ENS)
dp_printf("(CWA:%d)", cwa_report()); if (cfg.enscount)
} else dp_printf("(CWA:%d)", cwa_report());
else
#endif
dp_printf("BLTH:off"); dp_printf("BLTH:off");
#else #else
dp_printf("Sniffer disabled"); dp_printf("Sniffer disabled");

View File

@ -6,7 +6,6 @@
#include "payload.h" #include "payload.h"
#include "corona.h" #include "corona.h"
#include "macsniff.h" #include "macsniff.h"
extern PayloadConvert payload; extern PayloadConvert payload;
#endif #endif