Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/peripheral-explorer-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ noble.on('discover', async (peripheral) => {
console.log();

await explore(peripheral);
} else {
console.log(`Peripheral with ID ${peripheral.id} and name ${peripheral.advertisement?.localName} ignored`);
}
});

Expand Down
4 changes: 2 additions & 2 deletions lib/win/src/ble_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ bool BLEManager::Connect(const std::string& uuid)

// Add to device map
mDeviceMap.emplace(std::make_pair(uuid, std::move(peripheral)));
} catch (const std::exception& e) {
} catch (const std::exception&) {
mEmit.Connected(uuid, "invalid device address format");
return false;
}
Expand Down Expand Up @@ -413,7 +413,7 @@ void BLEManager::OnConnectionStatusChanged(BluetoothLEDevice device,
return;
}
PeripheralWinrt& peripheral = mDeviceMap[uuid];
if(peripheral.device.has_value() && &(peripheral.device.value()) == &device )
if (peripheral.device.has_value() && peripheral.device.value() == device)
{
peripheral.Disconnect();
mNotifyMap.Remove(uuid);
Expand Down
2 changes: 1 addition & 1 deletion lib/win/src/noble_winrt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Napi::Value NobleWinrt::AddressToId(const Napi::CallbackInfo& info)
}

return Napi::String::New(info.Env(), cleanUuid.c_str());
} catch (const std::exception& e) {
} catch (const std::exception&) {
return info.Env().Null();
}
}
Expand Down
Loading