Skip to content

Commit

Permalink
VW: stricter limits to comply with comma safety policy
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Oct 25, 2019
1 parent e2e2be9 commit 4007532
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions board/safety/safety_volkswagen.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const int VW_MAX_STEER = 300; // 3.0 nm
const int VW_MAX_RT_DELTA = 188; // 10 max rate * 50Hz send rate * 250000 RT interval / 1000000 = 125 ; 125 * 1.5 for safety pad = 187.5
const int VW_MAX_STEER = 250; // 2.5 nm
const int VW_MAX_RT_DELTA = 75; // 4 max rate up * 50Hz send rate * 250000 RT interval / 1000000 = 125 ; 125 * 1.5 for safety pad = 75
const uint32_t VW_RT_INTERVAL = 250000; // 250ms between real time checks
const int VW_MAX_RATE_UP = 10; // 5.0 nm/s available rate of change from the steering rack
const int VW_MAX_RATE_UP = 4; // 5.0 nm/s available rate of change from the steering rack
const int VW_MAX_RATE_DOWN = 10; // 5.0 nm/s available rate of change from the steering rack
const int VW_DRIVER_TORQUE_ALLOWANCE = 100;
const int VW_DRIVER_TORQUE_FACTOR = 4;
const int VW_DRIVER_TORQUE_ALLOWANCE = 80;
const int VW_DRIVER_TORQUE_FACTOR = 3;

struct sample_t vw_torque_driver; // last few driver torques measured
int vw_rt_torque_last = 0;
Expand Down
10 changes: 5 additions & 5 deletions tests/safety/test_volkswagen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import libpandasafety_py # pylint: disable=import-error
from panda import Panda

MAX_RATE_UP = 10
MAX_RATE_UP = 4
MAX_RATE_DOWN = 10
MAX_STEER = 300
MAX_STEER = 250

MAX_RT_DELTA = 188
MAX_RT_DELTA = 75
RT_INTERVAL = 250000

DRIVER_TORQUE_ALLOWANCE = 100
DRIVER_TORQUE_FACTOR = 4
DRIVER_TORQUE_ALLOWANCE = 80
DRIVER_TORQUE_FACTOR = 3

def sign(a):
if a > 0:
Expand Down

0 comments on commit 4007532

Please sign in to comment.