Skip to content

Commit

Permalink
fix idiocy
Browse files Browse the repository at this point in the history
  • Loading branch information
WT-MM committed Nov 11, 2024
1 parent 9475756 commit 5fa8c05
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions actuator/robstride/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ lazy_static! {
kp_max: 500.0,
kd_min: 0.0,
kd_max: 5.0,
t_min: 0.0,
t_min: -14.0,
t_max: 14.0,
zero_on_init: false,
can_timeout_command: 0x200b, // Unchecked
Expand All @@ -52,7 +52,7 @@ lazy_static! {
kp_max: 500.0,
kd_min: 0.0,
kd_max: 5.0,
t_min: 0.0,
t_min: -12.0,
t_max: 12.0,
zero_on_init: true, // Single encoder motor.
can_timeout_command: 0x200c,
Expand All @@ -70,7 +70,7 @@ lazy_static! {
kp_max: 500.0,
kd_min: 0.0,
kd_max: 5.0,
t_min: 0.0,
t_min: -12.0,
t_max: 12.0,
zero_on_init: false,
can_timeout_command: 0x200b, // Unchecked
Expand All @@ -88,7 +88,7 @@ lazy_static! {
kp_max: 5000.0,
kd_min: 0.0,
kd_max: 100.0,
t_min: 0.0,
t_min: -60.0,
t_max: 60.0,
zero_on_init: false,
can_timeout_command: 0x200b,
Expand All @@ -106,7 +106,7 @@ lazy_static! {
kp_max: 5000.0,
kd_min: 0.0,
kd_max: 100.0,
t_min: 0.0,
t_min: -120.0,
t_max: 120.0,
zero_on_init: false,
can_timeout_command: 0x200b,
Expand Down
22 changes: 11 additions & 11 deletions actuator/robstride/src/supervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@ impl MotorsSupervisor {
}
}

// {
// // Send updated sdo parameters to motors that need them.
// let mut motors_to_set_sdo = motors_to_set_sdo.lock().unwrap();
// if !motors_to_set_sdo.is_empty() {
// for (motor_id, params) in motors_to_set_sdo.iter_mut() {
// motors.set_torque_limit(*motor_id, params.torque_limit).unwrap();
// // Any other sdo parameters can be updated here.
// }
// motors_to_set_sdo.clear();
// }
// }
{
// Send updated sdo parameters to motors that need them.
let mut motors_to_set_sdo = motors_to_set_sdo.lock().unwrap();
if !motors_to_set_sdo.is_empty() {
for (motor_id, params) in motors_to_set_sdo.iter_mut() {
motors.set_torque_limit(*motor_id, params.torque_limit).unwrap();
// Any other sdo parameters can be updated here.
}
motors_to_set_sdo.clear();
}
}

{
let params_copy = {
Expand Down

0 comments on commit 5fa8c05

Please sign in to comment.