mirror of https://github.com/commaai/panda.git
angle safety: consistent rate limit variable names (#1390)
consistent names
This commit is contained in:
parent
69ad3dd8e8
commit
22b2453728
|
@ -536,9 +536,9 @@ class AngleSteeringSafetyTest(PandaSafetyTestBase):
|
|||
|
||||
DEG_TO_CAN: int
|
||||
|
||||
ANGLE_DELTA_BP: List[float]
|
||||
ANGLE_DELTA_V: List[float] # windup limit
|
||||
ANGLE_DELTA_VU: List[float] # unwind limit
|
||||
ANGLE_RATE_BP: List[float]
|
||||
ANGLE_RATE_UP: List[float] # windup limit
|
||||
ANGLE_RATE_DOWN: List[float] # unwind limit
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
@ -568,8 +568,8 @@ class AngleSteeringSafetyTest(PandaSafetyTestBase):
|
|||
angles = [-300, -100, -10, 0, 10, 100, 300]
|
||||
for a in angles:
|
||||
for s in speeds:
|
||||
max_delta_up = np.interp(s, self.ANGLE_DELTA_BP, self.ANGLE_DELTA_V)
|
||||
max_delta_down = np.interp(s, self.ANGLE_DELTA_BP, self.ANGLE_DELTA_VU)
|
||||
max_delta_up = np.interp(s, self.ANGLE_RATE_BP, self.ANGLE_RATE_UP)
|
||||
max_delta_down = np.interp(s, self.ANGLE_RATE_BP, self.ANGLE_RATE_DOWN)
|
||||
|
||||
# first test against false positives
|
||||
self._reset_angle_measurement(a)
|
||||
|
|
|
@ -19,9 +19,9 @@ class TestNissanSafety(common.PandaSafetyTest, common.AngleSteeringSafetyTest):
|
|||
# Angle control limits
|
||||
DEG_TO_CAN = -100
|
||||
|
||||
ANGLE_DELTA_BP = [0., 5., 15.]
|
||||
ANGLE_DELTA_V = [5., .8, .15] # windup limit
|
||||
ANGLE_DELTA_VU = [5., 3.5, .4] # unwind limit
|
||||
ANGLE_RATE_BP = [0., 5., 15.]
|
||||
ANGLE_RATE_UP = [5., .8, .15] # windup limit
|
||||
ANGLE_RATE_DOWN = [5., 3.5, .4] # unwind limit
|
||||
|
||||
def setUp(self):
|
||||
self.packer = CANPackerPanda("nissan_x_trail_2017")
|
||||
|
|
|
@ -71,9 +71,9 @@ class TestTeslaSteeringSafety(TestTeslaSafety, common.AngleSteeringSafetyTest):
|
|||
# Angle control limits
|
||||
DEG_TO_CAN = 10
|
||||
|
||||
ANGLE_DELTA_BP = [0., 5., 15.]
|
||||
ANGLE_DELTA_V = [5., .8, .15] # windup limit
|
||||
ANGLE_DELTA_VU = [5., 3.5, .4] # unwind limit
|
||||
ANGLE_RATE_BP = [0., 5., 15.]
|
||||
ANGLE_RATE_UP = [5., .8, .15] # windup limit
|
||||
ANGLE_RATE_DOWN = [5., 3.5, .4] # unwind limit
|
||||
|
||||
def setUp(self):
|
||||
self.packer = CANPackerPanda("tesla_can")
|
||||
|
|
Loading…
Reference in New Issue