Skip to content

Commit

Permalink
fix: gap central adv data copy mistake 3 (#503)
Browse files Browse the repository at this point in the history
* Fix GapCentral adv data copy mistake

* Fix GapCentral adv data copy mistake 2

* fix assigning boundedvector again
  • Loading branch information
oguzcanoguz authored Feb 5, 2025
1 parent a214847 commit 2eff208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hal_st/middlewares/ble_middleware/GapCentralSt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,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);
std::copy(advertisementData, advertisementData + advertisingReport.Length_Data, discoveredDevice.data.begin());
discoveredDevice.data.assign(advertisementData, advertisementData + advertisingReport.Length_Data);
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 2eff208

Please sign in to comment.