Skip to content

Commit e54b388

Browse files
committed
fix: remove preprocessor guards and force module registration
1 parent c67c00d commit e54b388

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

pybricks/experimental/pb_module_experimental.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#include "py/mpconfig.h"
22
#include "py/obj.h"
33
#include "py/runtime.h"
4-
5-
#if PYBRICKS_PY_EXPERIMENTAL
6-
74
#include "pybricks/experimental/odometry.h"
85

96
static mp_obj_t experimental_odometry_benchmark(size_t n_args, const mp_obj_t *args) {
@@ -18,7 +15,6 @@ static mp_obj_t experimental_odometry_benchmark(size_t n_args, const mp_obj_t *a
1815
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(experimental_odometry_benchmark_obj, 5, 5, experimental_odometry_benchmark);
1916

2017
const mp_rom_map_elem_t pb_module_experimental_globals_table[] = {
21-
// This line allows Python to identify the module name during import
2218
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_experimental) },
2319
{ MP_ROM_QSTR(MP_QSTR_odometry_benchmark), MP_ROM_PTR(&experimental_odometry_benchmark_obj) },
2420
};
@@ -27,6 +23,4 @@ MP_DEFINE_CONST_DICT(pb_module_experimental_globals, pb_module_experimental_glob
2723
const mp_obj_module_t pb_module_experimental = {
2824
.base = { &mp_type_module },
2925
.globals = (mp_obj_dict_t *)&pb_module_experimental_globals,
30-
};
31-
32-
#endif // PYBRICKS_PY_EXPERIMENTAL
26+
};

0 commit comments

Comments
 (0)