v1.2.91: enhanced RGB LED blink

This commit is contained in:
Klaus K Wilting committed 2018-04-03 21:26:51 +02:00
1 parent 42cb206789
commit dc7f4ca90e
3 files changed
+6 -4

No files matched your search

+4 -3
View File
@@ -53,11 +53,15 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
added = newmac.second; // true if hashed MAC is unique in container
if (sniff_type == MAC_SNIFF_WIFI ) {
rgb_set_color(COLOR_GREEN);
newmac = wifis.insert(hashedmac); // add hashed MAC to wifi container if new unique
strcpy(typebuff, "WiFi");
rgb_set_color(COLOR_NONE);
} else if (sniff_type == MAC_SNIFF_BLE ) {
rgb_set_color(COLOR_MAGENTA);
newmac = bles.insert(hashedmac); // add hashed MAC to BLE container if new unique
strcpy(typebuff, "BLE ");
rgb_set_color(COLOR_NONE);
}
if (added) { // first time seen this WIFI or BLE MAC
@@ -85,14 +89,11 @@ class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
void onResult(BLEAdvertisedDevice advertisedDevice) {
uint8_t *p = (uint8_t *) advertisedDevice.getAddress().getNative();
rgb_set_color(COLOR_MAGENTA);
// Current devices seen on this scan session
currentScanDevice++;
mac_add(p, advertisedDevice.getRSSI(), MAC_SNIFF_BLE);
u8x8.setCursor(12,3);
u8x8.printf("%d", currentScanDevice);
rgb_set_color(COLOR_NONE);
}
};
+1 -1
View File
@@ -1,5 +1,5 @@
// program version - note: increment version after modifications to configData_t struct!!
#define PROGVERSION "1.2.9" // use max 10 chars here!
#define PROGVERSION "1.2.91" // use max 10 chars here!
#define PROGNAME "PAXCNT"
// Verbose enables serial output