Wifi/BLE counter display logic improved

This commit is contained in:
Verkehrsrot 2019-11-11 15:23:41 +01:00
parent f2821fe3b4
commit c826240d94

View File

@ -218,12 +218,27 @@ void draw_page(time_t t, uint8_t page) {
case 0: case 0:
// line 3: wifi + bluetooth counters // line 3: wifi + bluetooth counters
dp_printf(0, 3, FONT_SMALL, 0, "WIFI:%-5d", macs_wifi); #if ((WIFICOUNTER) && (BLECOUNTER))
#if (BLECOUNTER) if (cfg.wifiscan)
dp_printf(0, 3, FONT_SMALL, 0, "WIFI:%-5d", macs_wifi);
else
dp_printf(0, 3, FONT_SMALL, 0, "%s", "WIFI:off");
if (cfg.blescan) if (cfg.blescan)
dp_printf(66, 3, FONT_SMALL, 0, "BLTH:%-5d", macs_ble); dp_printf(66, 3, FONT_SMALL, 0, "BLTH:%-5d", macs_ble);
else else
dp_printf(66, 3, FONT_SMALL, 0, "%s", "BLTH:off"); dp_printf(66, 3, FONT_SMALL, 0, "%s", "BLTH:off");
#elif ((WIFICOUNTER) && (!BLECOUNTER))
if (cfg.wifiscan)
dp_printf(0, 3, FONT_SMALL, 0, "WIFI:%-5d", macs_wifi);
else
dp_printf(0, 3, FONT_SMALL, 0, "%s", "WIFI:off");
#elif ((!WIFICOUNTER) && (BLECOUNTER))
if (cfg.blescan)
dp_printf(0, 3, FONT_SMALL, 0, "BLTH:%-5d", macs_ble);
else
dp_printf(0, 3, FONT_SMALL, 0, "%s", "BLTH:off");
#else
dp_printf(0, 3, FONT_SMALL, 0, "%s", "Sniffer disabled");
#endif #endif
// line 4: Battery + GPS status + Wifi channel // line 4: Battery + GPS status + Wifi channel