@@ -190,16 +190,13 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_packet_buffer_deinit_obj, bleio_packet_bu
190190//| .. attribute:: incoming_packet_length
191191//|
192192//| 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`.
196193//|
197194STATIC mp_obj_t bleio_packet_buffer_get_incoming_packet_length (mp_obj_t self_in ) {
198195 bleio_packet_buffer_obj_t * self = MP_OBJ_TO_PTR (self_in );
199196
200197 mp_int_t size = common_hal_bleio_packet_buffer_get_incoming_packet_length (self );
201198 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" ));
203200 }
204201 return MP_OBJ_NEW_SMALL_INT (size );
205202}
@@ -215,16 +212,13 @@ const mp_obj_property_t bleio_packet_buffer_incoming_packet_length_obj = {
215212//| .. attribute:: outgoing_packet_length
216213//|
217214//| 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`.
221215//|
222216STATIC mp_obj_t bleio_packet_buffer_get_outgoing_packet_length (mp_obj_t self_in ) {
223217 bleio_packet_buffer_obj_t * self = MP_OBJ_TO_PTR (self_in );
224218
225219 mp_int_t size = common_hal_bleio_packet_buffer_get_outgoing_packet_length (self );
226220 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" ));
228222 }
229223 return MP_OBJ_NEW_SMALL_INT (size );
230224}
0 commit comments