Skip to content

Commit

Permalink
chore: Adapt to Gap.hpp changes (#490)
Browse files Browse the repository at this point in the history
Adapt to Gap.hpp changes
  • Loading branch information
oguzcanoguz authored Jan 27, 2025
1 parent d06c345 commit 1757a74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hal_st/middlewares/ble_middleware/GapCentralSt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "hal_st/middlewares/ble_middleware/GapCentralSt.hpp"
#include "ble_defs.h"
#include "infra/event/EventDispatcherWithWeakPtr.hpp"
#include <algorithm>
#include <chrono>
#include <cmath>

Expand Down Expand Up @@ -294,7 +295,7 @@ namespace hal
std::copy_n(std::begin(advertisingReport.Address), discoveredDevice.address.size(), std::begin(discoveredDevice.address));
discoveredDevice.eventType = ToAdvertisingEventType(advertisingReport.Event_Type);
discoveredDevice.addressType = ToAdvertisingAddressType(advertisingReport.Address_Type);
discoveredDevice.data = infra::MemoryRange(advertisementData, advertisementData + advertisingReport.Length_Data);
std::copy(discoveredDevice.data.begin(), discoveredDevice.data.begin() + advertisingReport.Length_Data, advertisementData);
discoveredDevice.rssi = static_cast<int8_t>(*const_cast<uint8_t*>(advertisementData + advertisingReport.Length_Data));

infra::Subject<services::GapCentralObserver>::NotifyObservers([&discoveredDevice](auto& observer)
Expand Down

0 comments on commit 1757a74

Please sign in to comment.