Pass desktop BLE identity to transport before startup
This commit is contained in:
1 parent
df23626c47
commit
4eefe43053
3 files changed
+17
-1
No files matched your search
@@ -45,6 +45,10 @@ void DesktopBle::apply(int flags, const char* name) {
|
||||
}
|
||||
ble_config config{};
|
||||
config.node_id = m_nodeId; config.company_id = 0xffff; config.arg = this;
|
||||
if (flags & 2) {
|
||||
memcpy(config.initial_advertisement, bytes, size_t(length));
|
||||
config.initial_advertisement_size = size_t(length);
|
||||
}
|
||||
config.callbacks.status = [](void* arg, ble_state state, const char* reason) {
|
||||
auto* self = static_cast<DesktopBle*>(arg);
|
||||
self->m_snapshot.state = state; self->m_snapshot.reason = QString::fromUtf8(reason);
|
||||
|
||||
Reference in new issue
Block a user