Merge pull request #46 from cyberman54/development

Development
This commit is contained in:
Verkehrsrot 2018-04-16 22:48:56 +02:00 committed by GitHub
commit 9a035cde84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 12 deletions

View File

@ -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

View File

@ -139,7 +139,8 @@ 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
mac_add((uint8_t *) p->scan_rst.bda, p->scan_rst.rssi, MAC_SNIFF_BLE);
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;
skip:

View File

@ -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);
u8x8.printf("BLTH: %-4d", (int) bles.size());
}
if (cfg.blescan)
u8x8.printf("BLTH: %-4d", (int) bles.size());
else
u8x8.printf("%-16s", "BLTH: off");
#endif
// update wifi channel display (line 4)

View File

@ -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

View File

@ -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;
}
};