diff --git a/rootfs/usr/share/inputplumber/devices/50-msi_claw_a8_bz2e.yaml b/rootfs/usr/share/inputplumber/devices/50-msi_claw_a8_bz2e.yaml index 5b6ab87d..f3076c3c 100644 --- a/rootfs/usr/share/inputplumber/devices/50-msi_claw_a8_bz2e.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-msi_claw_a8_bz2e.yaml @@ -130,15 +130,22 @@ source_devices: - Keyboard:KeyLeftBrace - Keyboard:KeyRightBrace + ## TODO: Fix in refactor, unit scale is wrong and this provides sub 0.1deg/sec of motion. # IMU - group: imu iio: name: gyro_3d mount_matrix: - # TODO: Verify x: [0, 1, 0] - y: [-1, 0, 0] - z: [0, 0, -1] + y: [1, 0, 0] + z: [0, 0, 1] + - group: imu + iio: + name: accel_3d + mount_matrix: + x: [0, 1, 0] + y: [1, 0, 0] + z: [0, 0, 1] # Optional configuration for the composite device options: diff --git a/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml b/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml index d4cf3338..2c4bee7f 100644 --- a/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-onexplayer_onexfly.yaml @@ -53,6 +53,10 @@ source_devices: - group: imu iio: name: "{i2c-BMI0160:00,bmi260}" + mount_matrix: + x: [0, -1, 0] + y: [1, 0, 0] + z: [0, 0, -1] # Optional configuration for the composite device options: diff --git a/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml b/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml index 64e9ac13..09712f0c 100644 --- a/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml @@ -44,7 +44,7 @@ source_devices: name: bmi323-imu mount_matrix: x: [1, 0, 0] - y: [0, -1, 0] + y: [0, 1, 0] z: [0, 0, -1] - group: led udev: diff --git a/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml b/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml index a4b15a52..5d5028af 100644 --- a/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml +++ b/rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml @@ -43,7 +43,7 @@ source_devices: name: bmi323-imu mount_matrix: x: [1, 0, 0] - y: [0, -1, 0] + y: [0, 1, 0] z: [0, 0, -1] - group: led udev: diff --git a/src/drivers/lego/go2_driver.rs b/src/drivers/lego/go2_driver.rs index 7fa1b912..0c7faab1 100644 --- a/src/drivers/lego/go2_driver.rs +++ b/src/drivers/lego/go2_driver.rs @@ -448,7 +448,7 @@ impl Driver { events.push(Event::Axis(AxisEvent::MultiAccel(ImuAxisInput { pitch: -(state.left_accel_x + state.right_accel_x) / 2, roll: (state.left_accel_y + state.right_accel_y) / 2, - yaw: (state.left_accel_z + state.right_accel_z) / 2, + yaw: -(state.left_accel_z + state.right_accel_z) / 2, }))) } if !self @@ -491,7 +491,7 @@ impl Driver { events.push(Event::Axis(AxisEvent::MultiGyro(ImuAxisInput { pitch: -(state.left_gyro_x + state.right_gyro_x) / 2, roll: (state.left_gyro_y + state.right_gyro_y) / 2, - yaw: (state.left_gyro_z + state.right_gyro_z) / 2, + yaw: -(state.left_gyro_z + state.right_gyro_z) / 2, }))) } }