Skip to content

Commit

Permalink
pybricks.hubs.MoveHub: Increase resolution for imu.acceleration.
Browse files Browse the repository at this point in the history
  • Loading branch information
cschlack authored and laurensvalk committed Apr 1, 2022
1 parent 088fbfd commit 6b260a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
- Disabled `Motor.control` and `Motor.log` on Move Hub to save space.
- Changed LED color calibration on Prime hub to make yellow less green.
- Updated to upstream MicroPython v1.18.
- Changed MoveHub.imu.acceleration() units to mm/s/s ([pybricks-micropython#88]).

### Fixed
- Fixed color calibration on Powered Up remote control ([support#424]).
- Fixed 3x3 Light Matrix colors with hue > 255 not working correctly ([support#619]).


[pybricks-micropython#88]: https://github.com/pybricks/pybricks-micropython/issues/49
[support#424]: https://github.com/pybricks/support/issues/424
[support#619]: https://github.com/pybricks/support/issues/619

Expand Down
2 changes: 1 addition & 1 deletion pybricks/hubs/pb_type_movehub.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ STATIC mp_obj_t hubs_MoveHub_IMU_acceleration(mp_obj_t self_in) {
// Convert to appropriate units and return as tuple
mp_obj_t values[3];
for (uint8_t i = 0; i < 3; i++) {
values[i] = MP_OBJ_NEW_SMALL_INT((data[i] * 10) >> 6);
values[i] = MP_OBJ_NEW_SMALL_INT((data[i] * 158));
}
return mp_obj_new_tuple(3, values);
}
Expand Down

0 comments on commit 6b260a4

Please sign in to comment.