diff --git a/platforms/kbot/Cargo.toml b/platforms/kbot/Cargo.toml index e5859e4..caf9d60 100644 --- a/platforms/kbot/Cargo.toml +++ b/platforms/kbot/Cargo.toml @@ -12,7 +12,7 @@ kos_core = { version = "0.1.1", path = "../../kos_core" } eyre = "0.6" tracing = "0.1" async-trait = "0.1" -robstride = "0.2.8" +robstride = "0.2.9" [target.'cfg(target_os = "linux")'.dependencies] -imu = "0.1.4" +imu = "0.1.6" diff --git a/platforms/kbot/src/hexmove.rs b/platforms/kbot/src/hexmove.rs index 362a5ec..5be1887 100644 --- a/platforms/kbot/src/hexmove.rs +++ b/platforms/kbot/src/hexmove.rs @@ -121,7 +121,14 @@ impl IMU for KBotIMU { } async fn get_quaternion(&self) -> Result { - error!("Quaternion operation not implemented"); - Err(eyre::eyre!("Not implemented")) + debug!("Reading quaternion"); + let data = self.imu.get_data(); + Ok(QuaternionResponse { + w: data.qw as f64, + x: data.qx as f64, + y: data.qy as f64, + z: data.qz as f64, + error: None, + }) } }