Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions rootfs/usr/share/inputplumber/devices/50-msi_claw_a8_bz2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion rootfs/usr/share/inputplumber/devices/50-rog_ally.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion rootfs/usr/share/inputplumber/devices/50-rog_ally_x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/drivers/lego/go2_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
})))
}
}
Expand Down
Loading