Blink RGB Led on BLE device seen

This commit is contained in:
Charles 2018-04-03 11:23:39 +02:00
parent 3c590a2c3d
commit 6739a226c3

View File

@ -83,11 +83,14 @@ class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
void onResult(BLEAdvertisedDevice advertisedDevice) { void onResult(BLEAdvertisedDevice advertisedDevice) {
uint8_t *p = (uint8_t *) advertisedDevice.getAddress().getNative(); uint8_t *p = (uint8_t *) advertisedDevice.getAddress().getNative();
rgb_set_color(COLOR_MAGENTA);
// Current devices seen on this scan session // Current devices seen on this scan session
currentScanDevice++; currentScanDevice++;
mac_add(p, advertisedDevice.getRSSI(), MAC_SNIFF_BLE); mac_add(p, advertisedDevice.getRSSI(), MAC_SNIFF_BLE);
u8x8.setCursor(12,3); u8x8.setCursor(12,3);
u8x8.printf("%d", currentScanDevice); u8x8.printf("%d", currentScanDevice);
rgb_set_color(COLOR_NONE);
} }
}; };