From ba95bd84baca1b10d97b8c370cbf6bca5be71e08 Mon Sep 17 00:00:00 2001 From: Henry Bennett <51417209+henrylcs@users.noreply.github.com> Date: Thu, 23 Mar 2023 14:52:15 -0700 Subject: [PATCH] Update USAGE.md Fix some minor typos in lambda's with multiple parameters --- USAGE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/USAGE.md b/USAGE.md index c914b471..2a479d49 100644 --- a/USAGE.md +++ b/USAGE.md @@ -138,7 +138,7 @@ writeCharacteristic(someCharacteristic, someData, BluetoothGattCharacteristic.WR // .split() with no parameters uses the default MTU splitter. // Kotlin projects can use .splitWithProgressAsFlow(customSplitter) to get the progress as Flow. .before(device -> { /* called when the request is about to be executed */ }) - .with(device, data -> { /* called when the request has been executed */ }) + .with( (device, data) -> { /* called when the request has been executed */ }) .done(device -> { /* called when the request has completed successfully */ }) .fail(device, status -> { /* called when the request has failed */ }) .invalid({ /* called when the request was invalid, i.e. the target device or given characteristic was null */ }) @@ -157,7 +157,7 @@ readCharacteristic(someCharacteristic) // Complete, merged packets can also be filtered. .filterPacket(packetFilter) // [...] - .with(device, data -> { /* called when the data have been received */ }) + .with( (device, data) -> { /* called when the data have been received */ }) // [...] // Once again, remember to enqueue each request! .enqueue() @@ -241,4 +241,4 @@ val response: MyResponse = readCharacteristic(someCharacteristic) To validate the received value use `suspendForValidResponse()` with a type extending `ProfileReadResponse`. See an example [here](https://github.com/NordicSemiconductor/Android-nRF-Blinky/blob/8352e92ce2dd12af5a05a60643a64187473adbc0/blinky/ble/src/main/java/no/nordicsemi/android/blinky/ble/data/LedCallback.kt#L7). - \ No newline at end of file +