Skip to content

Commit

Permalink
type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Nguyen committed Jun 4, 2024
1 parent 8c89e55 commit 6fdc161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/device/xm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub mod conv {
///
/// Works in joint and multi-turn mode
pub fn radians_to_dxl_pos(rads: f64) -> i32 {
(4096.0 * (PI + rads) / (2.0 * PI)) as i16
(4096.0 * (PI + rads) / (2.0 * PI)) as i32
}

/// Dynamixel absolute speed to radians per second
Expand All @@ -92,7 +92,7 @@ pub mod conv {
/// Works for moving_speed in joint mode for instance
pub fn rad_per_sec_to_dxl_abs_speed(speed: f64) -> u32 {
let rpm = speed / 0.10472;
(rpm / 0.229) as u16
(rpm / 0.229) as u32
}
/// Dynamixel speed to radians per second
///
Expand Down

0 comments on commit 6fdc161

Please sign in to comment.