From accb1173279c6b481640fe6e6f4a3476b1c0c1cf Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 29 Oct 2024 14:30:48 +0100 Subject: [PATCH] pbio/imu: Reduce default gyro threshold to 2deg/s. Now that it is a bit less sensitive to outliers, we can reduce this value. See https://github.com/pybricks/support/issues/1105 --- lib/pbio/src/imu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pbio/src/imu.c b/lib/pbio/src/imu.c index 4c9dd0c95..3bc5bc281 100644 --- a/lib/pbio/src/imu.c +++ b/lib/pbio/src/imu.c @@ -200,7 +200,7 @@ static void pbio_imu_apply_pbdrv_settings(pbio_imu_persistent_settings_t *settin */ void pbio_imu_set_default_settings(pbio_imu_persistent_settings_t *settings) { settings->flags = 0; - settings->gyro_stationary_threshold = 3.0f; + settings->gyro_stationary_threshold = 2.0f; settings->accel_stationary_threshold = 2500.0f; settings->gravity_pos.x = settings->gravity_pos.y = settings->gravity_pos.z = standard_gravity; settings->gravity_neg.x = settings->gravity_neg.y = settings->gravity_neg.z = -standard_gravity;