From 275f90c8dbd2247454ede6f4dba9ed7a72813fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sun, 9 Jun 2024 16:12:27 -0400 Subject: [PATCH] Add manufacturer data --- BLE/Protocol.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BLE/Protocol.cpp b/BLE/Protocol.cpp index 2d9a473..8d3cd1d 100644 --- a/BLE/Protocol.cpp +++ b/BLE/Protocol.cpp @@ -243,6 +243,12 @@ void ble_scan_protocol::scan_services() auto param = svc_node.create_parameter(ossia::val_type::STRING); param->set_value(service.data()); } + for(auto [id, data] : m_peripheral.manufacturer_data()) + { + auto& data_node = ossia::net::find_or_create_node(prp_node, std::to_string(id)); + auto param = data_node.create_parameter(ossia::val_type::STRING); + param->set_value(data); + } } }