Skip to content

Commit ce06bce

Browse files
committed
pls compile brotato✌️
1 parent 84d940f commit ce06bce

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

pybricks/experimental/odometry.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
// SPDX-License-Identifier: MIT
2-
#include "py/mpconfig.h"
3-
4-
#if PYBRICKS_PY_EXPERIMENTAL
5-
6-
#include "py/mphal.h"
7-
#include "py/runtime.h"
8-
#include <math.h>
9-
102
#include <pybricks/common.h>
113
#include <pbio/servo.h>
124
#include <pbio/control.h>
135
#include "pybricks/experimental/odometry.h"
146
#include "pybricks/experimental/platform_math.h"
157

16-
// Internal Pybricks motor structures
17-
#include "pybricks/pupdevices/pb_type_pupdevices_motor.h"
8+
// --- THE FIX: Forward declare the Motor Object structure ---
9+
// This replaces the #include "pybricks/pupdevices/pb_type_pupdevices_motor.h"
10+
typedef struct _pb_type_pupdevices_Motor_obj_t {
11+
mp_obj_base_t base;
12+
pbio_servo_t *srv; // In some versions this is 'servo'
13+
} pb_type_pupdevices_Motor_obj_t;
14+
// -----------------------------------------------------------
1815

1916
// Hardware Pointers
2017
static pbio_servo_t *left_servo_ptr = NULL;

0 commit comments

Comments
 (0)