mirror of https://github.com/commaai/panda.git
angle safety: add comment about rate limits at 0 (#1389)
* up when 0
* Revert "up when 0"
This reverts commit fc9b459651
.
* add comment
* whoops
This commit is contained in:
parent
14cfb78ab2
commit
69ad3dd8e8
|
@ -623,6 +623,7 @@ bool steer_angle_cmd_checks(int desired_angle, bool steer_control_enabled, const
|
|||
int delta_angle_up = (interpolate(limits.angle_rate_up_lookup, vehicle_speed - 1.) * limits.angle_deg_to_can) + 1.;
|
||||
int delta_angle_down = (interpolate(limits.angle_rate_down_lookup, vehicle_speed - 1.) * limits.angle_deg_to_can) + 1.;
|
||||
|
||||
// allow down limits at zero since small floats will be rounded to 0
|
||||
int highest_desired_angle = desired_angle_last + ((desired_angle_last > 0) ? delta_angle_up : delta_angle_down);
|
||||
int lowest_desired_angle = desired_angle_last - ((desired_angle_last >= 0) ? delta_angle_down : delta_angle_up);
|
||||
|
||||
|
|
Loading…
Reference in New Issue