Skip to content

Commit a126897

Browse files
committed
bleio: Fix incorrect role detection
1 parent 6545aa9 commit a126897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-bindings/bleio/Device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_device_start_advertising_obj, 0, bleio_d
299299
STATIC mp_obj_t bleio_device_stop_advertising(mp_obj_t self_in) {
300300
bleio_device_obj_t *self = MP_OBJ_TO_PTR(self_in);
301301

302-
if (self->is_peripheral) {
302+
if (!self->is_peripheral) {
303303
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
304304
"Can't advertise in Central mode"));
305305
}

0 commit comments

Comments
 (0)