Skip to content

Commit bcddbf6

Browse files
committed
pbio/sys/storage_settings: Reduce default gyro threshold.
See pybricks/support#1105
1 parent f298a37 commit bcddbf6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
light. See ([support#1716]) and ([pybricks-micropython#261]).
3838
- Allow gyro calibration only while all motors are coasting ([support#1840]) to
3939
prevent recalibration during very steady moves.
40+
- Reduced default angular velocity stationary threshold from an undocumented
41+
5 deg/s to 3 deg/s to reduce unwanted calibration while moving ([support#1105]).
4042

4143
### Fixed
4244
- Fixed not able to connect to new Technic Move hub with `LWP3Device()`.
@@ -52,6 +54,7 @@
5254
[pybricks-micropython#253]: https://github.com/pybricks/pybricks-micropython/pull/253
5355
[pybricks-micropython#254]: https://github.com/pybricks/pybricks-micropython/pull/254
5456
[pybricks-micropython#261]: https://github.com/pybricks/pybricks-micropython/pull/261
57+
[support#1105]: https://github.com/pybricks/support/issues/1105
5558
[support#1429]: https://github.com/pybricks/support/issues/1429
5659
[support#1460]: https://github.com/pybricks/support/issues/1460
5760
[support#1615]: https://github.com/pybricks/support/issues/1615

lib/pbio/sys/storage_settings.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ void pbsys_storage_settings_set_defaults(pbsys_storage_settings_t *settings) {
2929
settings->flags |= PBSYS_STORAGE_SETTINGS_FLAGS_BLUETOOTH_ENABLED;
3030
#endif
3131
#if PBIO_CONFIG_IMU
32-
settings->gyro_stationary_threshold = 5;
33-
settings->accel_stationary_threshold = 2500;
32+
settings->gyro_stationary_threshold = 3.0f;
33+
settings->accel_stationary_threshold = 2500.0f;
3434
settings->heading_correction = 360.0f;
3535
#endif // PBIO_CONFIG_IMU
3636
}

0 commit comments

Comments
 (0)