forked from h2zero/esp-nimble-cpp
Update remote characteristic value from a notification
* Add NimBLERemoteCharacteristic::getValue(time_t *timestamp = nullptr) to get the latest remote characteristic and (optionally) it's timestamp. * Added a timestamp to NimBLEAdvertisedDevice for the moment a device was scanned
This commit is contained in:
@@ -143,6 +143,7 @@ NimBLEScan::NimBLEScan() {
|
||||
advertisedDevice->parseAdvertisement(&fields);
|
||||
advertisedDevice->setScan(pScan);
|
||||
advertisedDevice->setAdvertisementResult(event->disc.data, event->disc.length_data);
|
||||
advertisedDevice->m_timestamp = time(nullptr);
|
||||
|
||||
if (pScan->m_pAdvertisedDeviceCallbacks) {
|
||||
// If not active scanning report the result to the listener.
|
||||
|
||||
Reference in New Issue
Block a user