updated positional traits to public, so its not upset about dead code.

This commit is contained in:
2026-05-23 18:43:27 -05:00
parent b7393971e2
commit a72efcfead
2 changed files with 22 additions and 4 deletions
+18
View File
@@ -11,7 +11,25 @@ pub struct MotorDriverShaftSpeed {
}
impl MotorDriverShaftSpeed {
pub fn speed_as_rpm(&self) -> f32 {
match self.shaft_speed {
Some(mut speed) => {
match self.unit {
Unit::Radians => {speed /= core::f32::consts::PI * 2.0;}
_ => {}
}
match self.time_scale {
TimeScale::PerSecond => {speed *= 60.0;}
_ => {}
}
speed
}
None => {
0.0
}
}
}
}
impl Display for MotorDriverShaftSpeed {