Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions pybricks/ev3devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@

extern const mp_obj_type_t pb_type_ev3devices_TouchSensor;
extern const mp_obj_type_t pb_type_ev3devices_ColorSensor;

#endif // PYBRICKS_PY_EV3DEVICES

#if PYBRICKS_PY_EV3DEVDEVICES

extern const mp_obj_type_t pb_type_ev3devices_InfraredSensor;
extern const mp_obj_type_t pb_type_ev3devices_GyroSensor;
extern const mp_obj_type_t pb_type_ev3devices_UltrasonicSensor;
extern const mp_obj_type_t pb_type_ev3devices_GyroSensor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing the order?


#endif // PYBRICKS_PY_EV3DEVDEVICES
#endif // PYBRICKS_PY_EV3DEVICES

#endif // PYBRICKS_INCLUDED_PYBRICKS_EV3DEVICES_H
2 changes: 0 additions & 2 deletions pybricks/ev3devices/pb_module_ev3devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ static const mp_rom_map_elem_t ev3devices_globals_table[] = {
#endif
{ MP_ROM_QSTR(MP_QSTR_TouchSensor), MP_ROM_PTR(&pb_type_ev3devices_TouchSensor) },
{ MP_ROM_QSTR(MP_QSTR_ColorSensor), MP_ROM_PTR(&pb_type_ev3devices_ColorSensor) },
#if PYBRICKS_PY_EV3DEVDEVICES
{ MP_ROM_QSTR(MP_QSTR_InfraredSensor), MP_ROM_PTR(&pb_type_ev3devices_InfraredSensor) },
{ MP_ROM_QSTR(MP_QSTR_UltrasonicSensor), MP_ROM_PTR(&pb_type_ev3devices_UltrasonicSensor)},
{ MP_ROM_QSTR(MP_QSTR_GyroSensor), MP_ROM_PTR(&pb_type_ev3devices_GyroSensor) },
#endif
};
static MP_DEFINE_CONST_DICT(pb_module_ev3devices_globals, ev3devices_globals_table);

Expand Down
4 changes: 2 additions & 2 deletions pybricks/ev3devices/pb_type_ev3devices_gyrosensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "py/mpconfig.h"

#if PYBRICKS_PY_EV3DEVDEVICES
#if PYBRICKS_PY_EV3DEVICES

#include <pybricks/common.h>
#include <pybricks/ev3devices.h>
Expand Down Expand Up @@ -103,4 +103,4 @@ MP_DEFINE_CONST_OBJ_TYPE(pb_type_ev3devices_GyroSensor,
make_new, ev3devices_GyroSensor_make_new,
locals_dict, &ev3devices_GyroSensor_locals_dict);

#endif // PYBRICKS_PY_EV3DEVDEVICES
#endif // PYBRICKS_PY_EV3DEVICES
4 changes: 2 additions & 2 deletions pybricks/ev3devices/pb_type_ev3devices_infraredsensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "py/mpconfig.h"

#if PYBRICKS_PY_EV3DEVDEVICES
#if PYBRICKS_PY_EV3DEVICES

#include <pybricks/common.h>
#include <pybricks/ev3devices.h>
Expand Down Expand Up @@ -181,4 +181,4 @@ MP_DEFINE_CONST_OBJ_TYPE(pb_type_ev3devices_InfraredSensor,
make_new, ev3devices_InfraredSensor_make_new,
locals_dict, &ev3devices_InfraredSensor_locals_dict);

#endif // PYBRICKS_PY_EV3DEVDEVICES
#endif // PYBRICKS_PY_EV3DEVICES
4 changes: 2 additions & 2 deletions pybricks/ev3devices/pb_type_ev3devices_ultrasonicsensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "py/mpconfig.h"

#if PYBRICKS_PY_EV3DEVDEVICES
#if PYBRICKS_PY_EV3DEVICES

#include <pybricks/common.h>
#include <pybricks/ev3devices.h>
Expand Down Expand Up @@ -63,4 +63,4 @@ MP_DEFINE_CONST_OBJ_TYPE(pb_type_ev3devices_UltrasonicSensor,
make_new, ev3devices_UltrasonicSensor_make_new,
locals_dict, &ev3devices_UltrasonicSensor_locals_dict);

#endif // PYBRICKS_PY_EV3DEVDEVICES
#endif // PYBRICKS_PY_EV3DEVICES