imu: no -0.0 in published values
/ crosscheck (push) Successful in 1s
Rust (L4T) / Clippy, test, build, glibc (push) Successful in 14s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-14 00:25:31 +09:00
parent acb47b48ef
commit 90d011f3a4
+1 -1
View File
@@ -69,7 +69,7 @@ fn units() -> HashMap<String, String> {
fn signals(m: &Motion) -> [(&'static str, Value); 5] { fn signals(m: &Motion) -> [(&'static str, Value); 5] {
let r = |v: f64, places: i32| { let r = |v: f64, places: i32| {
let f = 10f64.powi(places); let f = 10f64.powi(places);
json!((v * f).round() / f) json!((v * f).round() / f + 0.0) // + 0.0 turns -0.0 into 0.0
}; };
[ [
("imu_roll_deg", r(m.roll_deg, 1)), ("imu_roll_deg", r(m.roll_deg, 1)),