Skip to content

Commit

Permalink
Cadillac: fixed typo. Need better regression tests to catch this
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Jun 3, 2018
1 parent d9f1e61 commit ca0b6be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions board/safety/safety_cadillac.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ static int cadillac_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
int lowest_allowed_torque = min(cadillac_desired_torque_last, 0) - CADILLAC_MAX_RATE_UP;

int driver_torque_max_limit = CADILLAC_STEER_MAX +
(CADILLAC_DRIVER_TORQUE_ALLOWANCE + cadillac_torque_driver.max) *
(CADILLAC_DRIVER_TORQUE_ALLOWANCE + cadillac_torque_driver.max) *
CADILLAC_DRIVER_TORQUE_FACTOR;
int driver_torque_min_limit = -CADILLAC_STEER_MAX +
(-CADILLAC_DRIVER_TORQUE_ALLOWANCE + cadillac_torque_driver.max) *
(-CADILLAC_DRIVER_TORQUE_ALLOWANCE + cadillac_torque_driver.min) *
CADILLAC_DRIVER_TORQUE_FACTOR;

// if we've exceeded the applied torque, we must start moving toward 0
Expand Down

0 comments on commit ca0b6be

Please sign in to comment.