Skip to content

Commit

Permalink
* WIP.. : petite erreur de signe..
Browse files Browse the repository at this point in the history
* NOTE : in the previous commit a new special method for emergency stop was created in speed_controller
  • Loading branch information
goldo31337 committed Apr 14, 2024
1 parent 78ba4ee commit 2d1ab5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/goldo_propulsion/src/speed_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void SpeedController::setRequestedSpeed(float speed) {
void SpeedController::setFinalSpeed(float final_speed) { m_final_speed = final_speed; }

void SpeedController::setAccelerationLimits(float accel, float deccel) {
/* foolproof.. */
accel = fabsf(accel);
deccel = fabsf(deccel);
m_acceleration_limit = accel;
m_decceleration_limit = deccel;
}
Expand Down Expand Up @@ -119,11 +122,11 @@ bool SpeedController::not_feasible(float dist, float speed, float final_speed, f

if (dist >= 0)
{
return (d_c > 0);
return (d_c < 0);
}
else
{
return (d_c < 0);
return (d_c > 0);
}
}

Expand Down

0 comments on commit 2d1ab5e

Please sign in to comment.