@@ -190,16 +190,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_deinit_obj, bleio_packet_bu
190
190
//| .. attribute:: incoming_packet_length
191
191
//|
192
192
//| Maximum length in bytes of a packet we are reading.
193
- //| If the packet is arriving from a remote service via notify or indicate,
194
- //| the maximum length is `Connection.max_packet_length`.
195
- //| Otherwise it is the ``max_length`` of the :py:class:`~_bleio.Characteristic`.
196
193
//|
197
194
STATIC mp_obj_t bleio_packet_buffer_get_incoming_packet_length (mp_obj_t self_in ) {
198
195
bleio_packet_buffer_obj_t * self = MP_OBJ_TO_PTR (self_in );
199
196
200
197
mp_int_t size = common_hal_bleio_packet_buffer_get_incoming_packet_length (self );
201
198
if (size < 0 ) {
202
- mp_raise_ValueError (translate ("No connection: size cannot be determined" ));
199
+ mp_raise_ValueError (translate ("No connection: length cannot be determined" ));
203
200
}
204
201
return MP_OBJ_NEW_SMALL_INT (size );
205
202
}
@@ -215,16 +212,13 @@ const mp_obj_property_t bleio_packet_buffer_incoming_packet_length_obj = {
215
212
//| .. attribute:: outgoing_packet_length
216
213
//|
217
214
//| Maximum length in bytes of a packet we are writing.
218
- //| If the packet is being sent via notify or indicate,
219
- //| the maximum length is `Connection.max_packet_length`.
220
- //| Otherwise it is the ``max_length`` of the :py:class:`~_bleio.Characteristic`.
221
215
//|
222
216
STATIC mp_obj_t bleio_packet_buffer_get_outgoing_packet_length (mp_obj_t self_in ) {
223
217
bleio_packet_buffer_obj_t * self = MP_OBJ_TO_PTR (self_in );
224
218
225
219
mp_int_t size = common_hal_bleio_packet_buffer_get_outgoing_packet_length (self );
226
220
if (size < 0 ) {
227
- mp_raise_ValueError (translate ("No connection: size cannot be determined" ));
221
+ mp_raise_ValueError (translate ("No connection: length cannot be determined" ));
228
222
}
229
223
return MP_OBJ_NEW_SMALL_INT (size );
230
224
}
0 commit comments