Skip to content

Commit

Permalink
pbio/drv/imu_lsm6ds3tr_c_stm32: Revert dropping block update.
Browse files Browse the repository at this point in the history
This occasionally leads to bad values on the Technic Hub.

This reverts commit 121c4db.

Fixes pybricks/support#1026
  • Loading branch information
laurensvalk committed Apr 4, 2023
1 parent 69bcafe commit 0080c97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## [Unreleased]

### Fixed
- Fixed gyro on Technic Hub occasionally giving a bad value, which made it
not calibrate properly ([support#1026]).

[support#1026]: https://github.com/pybricks/support/issues/1026

### Added
- Added `pybricks.geometry.cross(a, b)` to get a vector cross product.
- Added experimental implementation of `hub.imu.heading()` ([support#912]).
Expand Down
5 changes: 5 additions & 0 deletions lib/pbio/drv/imu/imu_lsm6ds3tr_c_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ static PT_THREAD(pbdrv_imu_lsm6ds3tr_c_stm32_init(struct pt *pt)) {
PT_SPAWN(pt, &child, lsm6ds3tr_c_reset_get(&child, ctx, &rst));
} while (rst);

/*
* Enable Block Data Update
*/
PT_SPAWN(pt, &child, lsm6ds3tr_c_block_data_update_set(&child, ctx, PROPERTY_ENABLE));

/*
* Set Output Data Rate
*/
Expand Down

0 comments on commit 0080c97

Please sign in to comment.