Skip to content

Commit

Permalink
pybricks.common.IMU: Fix failing to raise on bad axes.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensvalk committed Oct 21, 2024
1 parent f00e345 commit 60273d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
### Fixed
- Fixed `DriveBase.angle()` getting an incorrectly rounded gyro value, which
could cause `turn(360)` to be off by a degree ([support#1844]).
- Fixed `hub` silently ignoring non-orthogonal base axis when it should raise.

[support#943]: https://github.com/pybricks/support/issues/943
[support#1886]: https://github.com/pybricks/support/issues/1886
Expand Down
2 changes: 1 addition & 1 deletion pybricks/common/pb_type_imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ mp_obj_t pb_type_IMU_obj_new(mp_obj_t hub_in, mp_obj_t top_side_axis_in, mp_obj_
pbio_geometry_xyz_t top_side_axis;
pb_type_imu_extract_axis(top_side_axis_in, &top_side_axis);

pbio_imu_set_base_orientation(&front_side_axis, &top_side_axis);
pb_assert(pbio_imu_set_base_orientation(&front_side_axis, &top_side_axis));

// Return singleton instance.
singleton_imu_obj.hub = hub_in;
Expand Down

0 comments on commit 60273d6

Please sign in to comment.