Skip to content

Commit f112d9f

Browse files
committed
pybricks.common: Require float where needed.
1 parent baf7047 commit f112d9f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pybricks/common/pb_type_motor_model.c

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

44
#include "py/mpconfig.h"
55

6-
#if PYBRICKS_PY_COMMON_MOTOR_MODEL
6+
#if PYBRICKS_PY_COMMON_MOTOR_MODEL && MICROPY_PY_BUILTINS_FLOAT
77

88
#include <pbio/observer.h>
99

@@ -99,4 +99,4 @@ MP_DEFINE_CONST_OBJ_TYPE(pb_type_MotorModel,
9999
MP_TYPE_FLAG_NONE,
100100
locals_dict, &pb_type_MotorModel_locals_dict);
101101

102-
#endif // PYBRICKS_PY_COMMON_MOTOR_MODEL
102+
#endif // PYBRICKS_PY_COMMON_MOTOR_MODEL && MICROPY_PY_BUILTINS_FLOAT

pybricks/common/pb_type_speaker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include "py/mpconfig.h"
1212

13-
#if PYBRICKS_PY_COMMON_SPEAKER
13+
#if PYBRICKS_PY_COMMON_SPEAKER && MICROPY_PY_BUILTINS_FLOAT
1414

1515
#include <math.h>
1616
#include <pbdrv/sound.h>
@@ -399,4 +399,4 @@ MP_DEFINE_CONST_OBJ_TYPE(pb_type_Speaker,
399399
make_new, pb_type_Speaker_make_new,
400400
locals_dict, &pb_type_Speaker_locals_dict);
401401

402-
#endif // PYBRICKS_PY_COMMON_SPEAKER
402+
#endif // PYBRICKS_PY_COMMON_SPEAKER && MICROPY_PY_BUILTINS_FLOAT

0 commit comments

Comments
 (0)