Skip to content

Commit

Permalink
pybricks.hubs: Make ThisHub importable.
Browse files Browse the repository at this point in the history
This is convenient for generic hub tests. Its use will not be encouraged in examples and documentation.
  • Loading branch information
laurensvalk committed May 26, 2021
1 parent 6ea10b9 commit 1450ee0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pybricks/hubs/pb_module_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pb_hubs_Hub_reset_reason_obj, pb_hubs_Hub_reset_reason

STATIC const mp_rom_map_elem_t hubs_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hubs) },
{ MP_ROM_QSTR(MP_QSTR_ThisHub), MP_ROM_PTR(&pb_type_ThisHub) },
{ MP_ROM_QSTR(PYBRICKS_HUB_CLASS_NAME), MP_ROM_PTR(&pb_type_ThisHub) },
#ifdef PYBRICKS_HUB_CLASS_NAME_ALIAS
{ MP_ROM_QSTR(PYBRICKS_HUB_CLASS_NAME_ALIAS), MP_ROM_PTR(&pb_type_ThisHub) },
Expand Down

0 comments on commit 1450ee0

Please sign in to comment.