From 95d776211aae23b45ce1f543779c331733323057 Mon Sep 17 00:00:00 2001 From: elpekenin Date: Tue, 20 Aug 2024 20:24:40 +0200 Subject: [PATCH 1/2] fix `Characteristic.add_to_service` --- shared-bindings/_bleio/Characteristic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 6b32e39ff434..ddb6627df24c 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -24,8 +24,9 @@ //| as part of remote Services.""" //| ... +//| @classmethod //| def add_to_service( -//| self, +//| cls, //| service: Service, //| uuid: UUID, //| *, From 0ebbb39460820f02c526707854418d0b2b8e490f Mon Sep 17 00:00:00 2001 From: elpekenin Date: Tue, 20 Aug 2024 22:40:42 +0200 Subject: [PATCH 2/2] fix `CharacteristicBuffer.timeout` --- shared-bindings/_bleio/CharacteristicBuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/_bleio/CharacteristicBuffer.c b/shared-bindings/_bleio/CharacteristicBuffer.c index 7ef3575e3c23..a8ae04fd1208 100644 --- a/shared-bindings/_bleio/CharacteristicBuffer.c +++ b/shared-bindings/_bleio/CharacteristicBuffer.c @@ -25,7 +25,7 @@ static void raise_error_if_not_connected(bleio_characteristic_buffer_obj_t *self //| """Accumulates a Characteristic's incoming values in a FIFO buffer.""" //| //| def __init__( -//| self, characteristic: Characteristic, *, timeout: int = 1, buffer_size: int = 64 +//| self, characteristic: Characteristic, *, timeout: float = 1.0, buffer_size: int = 64 //| ) -> None: //| """Monitor the given Characteristic. Each time a new value is written to the Characteristic //| add the newly-written bytes to a FIFO buffer. @@ -33,7 +33,7 @@ static void raise_error_if_not_connected(bleio_characteristic_buffer_obj_t *self //| :param Characteristic characteristic: The Characteristic to monitor. //| It may be a local Characteristic provided by a Peripheral Service, or a remote Characteristic //| in a remote Service that a Central has connected to. -//| :param int timeout: the timeout in seconds to wait for the first character and between subsequent characters. +//| :param float timeout: the timeout in seconds to wait for the first character and between subsequent characters. //| :param int buffer_size: Size of ring buffer that stores incoming data coming from client. //| Must be >= 1.""" //| ...