From 242b40e917c353fea8d5136e8fc4ca7edc092d82 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Sun, 12 Mar 2017 14:25:49 +0100 Subject: [PATCH] nrf5/modules/ubluepy: Activate Scanner and ScanEntry objects if MICROPY_PY_UBLUPY_CENTRAL is set. --- nrf5/modules/ubluepy/modubluepy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nrf5/modules/ubluepy/modubluepy.c b/nrf5/modules/ubluepy/modubluepy.c index ea1b93c6ca..6835e9ef7c 100644 --- a/nrf5/modules/ubluepy/modubluepy.c +++ b/nrf5/modules/ubluepy/modubluepy.c @@ -34,19 +34,19 @@ extern const mp_obj_type_t ubluepy_uuid_type; extern const mp_obj_type_t ubluepy_characteristic_type; extern const mp_obj_type_t ubluepy_delegate_type; extern const mp_obj_type_t ubluepy_constants_type; +extern const mp_obj_type_t ubluepy_scanner_type; +extern const mp_obj_type_t ubluepy_scan_entry_type; STATIC const mp_map_elem_t mp_module_ubluepy_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_ubluepy) }, #if MICROPY_PY_UBLUEPY_PERIPHERAL { MP_OBJ_NEW_QSTR(MP_QSTR_Peripheral), (mp_obj_t)&ubluepy_peripheral_type }, #endif -#if MICROPY_PY_UBLUEPY_CENTRAL +#if 0 // MICROPY_PY_UBLUEPY_CENTRAL { MP_OBJ_NEW_QSTR(MP_QSTR_Central), (mp_obj_t)&ubluepy_central_type }, #endif -#if MICROPY_PY_UBLUEPY_SCANNER - { MP_OBJ_NEW_QSTR(MP_QSTR_Scanner), (mp_obj_t)&ubluepy_scanner_type }, -#endif #if MICROPY_PY_UBLUEPY_CENTRAL + { MP_OBJ_NEW_QSTR(MP_QSTR_Scanner), (mp_obj_t)&ubluepy_scanner_type }, { MP_OBJ_NEW_QSTR(MP_QSTR_ScanEntry), (mp_obj_t)&ubluepy_scan_entry_type }, #endif { MP_OBJ_NEW_QSTR(MP_QSTR_DefaultDelegate), (mp_obj_t)&ubluepy_delegate_type },