Skip to content

Commit e21580b

Browse files
committed
PacketBuffer.packet_size was returning bool instead of int
1 parent 7c11a5a commit e21580b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

shared-bindings/_bleio/Characteristic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
//| as part of remote Services.
5050
//|
5151

52-
//| .. method:: add_to_service(service, uuid, *, properties=0, read_perm=`Attribute.OPEN`, write_perm=`Attribute.OPEN`, max_length=20, fixed_length=False, initial_value=None)
52+
//| .. method:: add_to_service(service, uuid, *, properties=0, read_perm=Attribute.OPEN, write_perm=Attribute.OPEN, max_length=20, fixed_length=False, initial_value=None)
5353
//|
5454
//| Create a new Characteristic object, and add it to this Service.
5555
//|

shared-bindings/_bleio/PacketBuffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_deinit_obj, bleio_packet_bu
163163

164164
//| .. attribute:: packet_size
165165
//|
166-
//| Maximum size of each packet in bytes. This is the minimum of the Characterstic length and
166+
//| Maximum size of each packet in bytes. This is the minimum of the Characteristic length and
167167
//| the negotiated Maximum Transfer Unit (MTU).
168168
//|
169169
STATIC mp_obj_t bleio_packet_buffer_get_packet_size(mp_obj_t self_in) {
170170
bleio_packet_buffer_obj_t *self = MP_OBJ_TO_PTR(self_in);
171171

172-
return mp_obj_new_bool(common_hal_bleio_packet_buffer_get_packet_size(self));
172+
return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_packet_buffer_get_packet_size(self));
173173
}
174174
STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_get_packet_size_obj, bleio_packet_buffer_get_packet_size);
175175

0 commit comments

Comments
 (0)