bugfixes in bluetooth on/off (still not fixed)
This commit is contained in:
parent
791f4e4555
commit
e69c911586
@ -11,10 +11,10 @@
|
||||
|
||||
; ---> SELECT TARGET PLATFORM HERE! <---
|
||||
[platformio]
|
||||
;env_default = heltec_wifi_lora_32
|
||||
env_default = heltec_wifi_lora_32
|
||||
;env_default = ttgov1
|
||||
;env_default = ttgov2
|
||||
env_default = lopy
|
||||
;env_default = lopy
|
||||
;env_default = lopy4
|
||||
;env_default = lolin32lite_lora
|
||||
;env_default = lolin32_lora
|
||||
|
@ -139,6 +139,7 @@ static void gap_callback_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_pa
|
||||
#endif
|
||||
|
||||
// add this device and show new count total if it was not previously added
|
||||
if (cfg.blescan) // count only if BLE scan is enabled
|
||||
mac_add((uint8_t *) p->scan_rst.bda, p->scan_rst.rssi, MAC_SNIFF_BLE);
|
||||
break;
|
||||
|
||||
|
@ -536,10 +536,11 @@ void loop() {
|
||||
u8x8.setCursor(0,4);
|
||||
u8x8.printf("WIFI: %-4d", (int) wifis.size());
|
||||
#ifdef BLECOUNTER
|
||||
if (cfg.blescan) {
|
||||
u8x8.setCursor(0,3);
|
||||
if (cfg.blescan)
|
||||
u8x8.printf("BLTH: %-4d", (int) bles.size());
|
||||
}
|
||||
else
|
||||
u8x8.printf("%-16s", "BLTH: off");
|
||||
#endif
|
||||
|
||||
// update wifi channel display (line 4)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// program version - note: increment version after modifications to configData_t struct!!
|
||||
#define PROGVERSION "1.3.0" // use max 10 chars here!
|
||||
#define PROGVERSION "1.3.01" // use max 10 chars here!
|
||||
#define PROGNAME "PAXCNT"
|
||||
|
||||
// Verbose enables serial output
|
||||
|
@ -150,10 +150,14 @@ void set_loraadr(int val) {
|
||||
void set_blescan(int val) {
|
||||
ESP_LOGI(TAG, "Remote command: set BLE scan mode to %s", val ? "on" : "off");
|
||||
switch (val) {
|
||||
case 1: cfg.blescan = val; break;
|
||||
default:
|
||||
case 0:
|
||||
cfg.blescan = 0;
|
||||
btStop();
|
||||
#ifdef BLECOUNTER
|
||||
bles.clear(); // clear BLE macs container
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
cfg.blescan = 1;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user