OpenBluetoothToolbox / SimpleBLE

SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android.
https://www.simpleble.org
Other
616 stars 103 forks source link

Change Adapter::write_request interface #303

Open spikeyamk opened 2 months ago

spikeyamk commented 2 months ago

Hello current function signature is this:

bool write_request(BluetoothUUID const& service, BluetoothUUID const& characteristic, ByteArray const& data) noexcept;

Could this be changed to

bool write_request(Service const& service, Characteristic const& characteristic, ByteArray const& data) noexcept;

I spent a long time today troubleshooting because I put the service and characteristic argument backwards. The strong type system is something you can rely on.

kdewald commented 2 months ago

Hey! This is not a bad idea! This requires a bit of care to ensure we don't break all existing use cases, but I'll definitely take it into consideration.