Skip to content

Commit 8b35da3

Browse files
committed
pybricks: adjust include path for modules
This changes the form #include "parameters/parameters.h" to #include <pybricks/parameters.h> for all modules. This makes it clearer what is included, and makes it easier to group includes by type.
1 parent 0aa9969 commit 8b35da3

File tree

80 files changed

+293
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+293
-293
lines changed

bricks/ev3dev/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ INC += -I../../lib/libfixmath/libfixmath
6868
INC += -I../../lib/pbio
6969
INC += -I../../lib/pbio/include
7070
INC += -I../../lib/pbio/platform/ev3dev_stretch
71-
INC += -I../../pybricks
71+
INC += -I../..
7272
INC += -I$(TOP)/ports/unix
7373

7474
# compiler settings

bricks/ev3dev/pb_type_ev3dev_image.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
#include "pb_ev3dev_types.h"
2424

25-
#include "parameters/parameters.h"
26-
#include "util_mp/pb_kwarg_helper.h"
27-
#include "util_mp/pb_obj_helper.h"
25+
#include <pybricks/parameters.h>
26+
#include <pybricks/util_mp/pb_kwarg_helper.h>
27+
#include <pybricks/util_mp/pb_obj_helper.h>
2828

2929
typedef struct _ev3dev_Image_obj_t {
3030
mp_obj_base_t base;

bricks/ev3dev/pb_type_ev3dev_speaker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#include "py/runtime.h"
3131

3232
#include "pb_ev3dev_types.h"
33-
#include "util_mp/pb_kwarg_helper.h"
34-
#include "util_mp/pb_obj_helper.h"
33+
#include <pybricks/util_mp/pb_kwarg_helper.h>
34+
#include <pybricks/util_mp/pb_obj_helper.h>
3535

3636
#define EV3DEV_EV3_INPUT_DEV_PATH "/dev/input/by-path/platform-sound-event"
3737

bricks/ev3dev/pbdevice.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
#include "py/mphal.h"
55

6-
#include "util_pb/pb_error.h"
7-
#include "util_pb/pb_device.h"
6+
#include <pybricks/util_pb/pb_error.h>
7+
#include <pybricks/util_pb/pb_device.h>
88

99

1010
#include <dirent.h>

bricks/nxt/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ INC += -Inxt-firmware-drivers
5656
INC += -I../../lib/pbio/include
5757
INC += -I../../lib/pbio/platform/$(PBIO_PLATFORM)
5858
INC += -I../../lib/pbio
59-
INC += -I../../pybricks
59+
INC += -I../..
6060
INC += -I$(BUILD)
6161

6262
COPT += -DFIXMATH_NO_CTYPE

bricks/nxt/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <pbio/light.h>
1313
#include <pbsys/sys.h>
1414

15-
#include "util_mp/pb_obj_helper.h"
15+
#include <pybricks/util_mp/pb_obj_helper.h>
1616

1717
#include "py/compile.h"
1818
#include "py/runtime.h"

bricks/stm32/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <pbio/light.h>
1111
#include <pbsys/sys.h>
1212

13-
#include "util_mp/pb_obj_helper.h"
13+
#include <pybricks/util_mp/pb_obj_helper.h>
1414

1515
#include "py/compile.h"
1616
#include "py/runtime.h"

bricks/stm32/stm32.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ifeq ($(PB_LIB_STM32_USB_DEVICE),1)
8585
INC += -I$(PBTOP)/lib/STM32_USB_Device_Library/Class/CDC/Inc/
8686
INC += -I$(PBTOP)/lib/STM32_USB_Device_Library/Core/Inc/
8787
endif
88-
INC += -I$(PBTOP)/pybricks
88+
INC += -I$(PBTOP)
8989
INC += -I$(BUILD)
9090

9191
GIT = git

pybricks/common/common.h renamed to pybricks/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if PYBRICKS_PY_COMMON
1010

11-
#include "util_pb/pb_device.h"
11+
#include <pybricks/util_pb/pb_device.h>
1212

1313
#include "py/obj.h"
1414

pybricks/common/pb_type_battery.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
#include <pbio/button.h>
1111

12-
#include "common/common.h"
13-
#include "parameters/parameters.h"
14-
#include "util_pb/pb_error.h"
12+
#include <pybricks/common.h>
13+
#include <pybricks/parameters.h>
14+
#include <pybricks/util_pb/pb_error.h>
1515

1616
// TODO: battery is currently a module due to the legacy C API, but should be
1717
// an instance of a Battery type. That would make it consistent with the other
1818
// C types and the high level Python API.
1919

20-
#include "util_pb/pb_error.h"
20+
#include <pybricks/util_pb/pb_error.h>
2121
#include <pbdrv/battery.h>
2222

2323
STATIC mp_obj_t battery_voltage(void) {

0 commit comments

Comments
 (0)