Skip to content

Commit 585c826

Browse files
author
Steve Nguyen
committed
fix mA conversion
1 parent cdc5817 commit 585c826

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/device/xl330.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ pub mod conv {
115115
///
116116
/// Works for present_current instance
117117
pub fn dxl_current_to_ma(current: i16) -> f32 {
118-
current as f32 * 2.69
118+
current as f32 * 1.0
119119
}
120120
/// Current (mA) to dynamixel current
121121
///
122122
/// It should be in [-current_limit, +current_limit] with an absolute max at 1193 (3209.17mA)
123123
/// Works for goal_current for instance
124124
pub fn ma_to_dxl_current(current: f32) -> i16 {
125-
(current / 2.69) as i16
125+
(current / 1.0) as i16
126126
}
127127

128128
/// Dxl Temperature (°C)

0 commit comments

Comments
 (0)