SimpleBLE icon indicating copy to clipboard operation
SimpleBLE copied to clipboard

Change Adapter::write_request interface

Open spikeyamk opened this issue 1 year ago • 1 comments

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.

spikeyamk avatar May 03 '24 18:05 spikeyamk

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.

kdewald avatar May 04 '24 05:05 kdewald