mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-21 01:02:48 +08:00
GM: match panda & ECM standstill checks (#26095)
* gm: match panda standstill check * fix * needs to be <= 10 to avoid a fault, fix for safety tests * fix * fix * bump panda to master old-commit-hash: 826d8a8ae34bfd909535f5edff2229b8b2daf1a6
This commit is contained in:
+1
-1
Submodule panda updated: 9ed3f75f67...b95a65df58
@@ -8,6 +8,7 @@ from selfdrive.car.gm.values import DBC, AccState, CanBus, STEER_THRESHOLD
|
||||
|
||||
TransmissionType = car.CarParams.TransmissionType
|
||||
NetworkLocation = car.CarParams.NetworkLocation
|
||||
STANDSTILL_THRESHOLD = 10 * 0.0311 * CV.KPH_TO_MS
|
||||
|
||||
|
||||
class CarState(CarStateBase):
|
||||
@@ -39,7 +40,8 @@ class CarState(CarStateBase):
|
||||
)
|
||||
ret.vEgoRaw = mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr])
|
||||
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
|
||||
ret.standstill = ret.vEgoRaw < 0.01
|
||||
# sample rear wheel speeds, standstill=True if ECM allows engagement with brake
|
||||
ret.standstill = ret.wheelSpeeds.rl <= STANDSTILL_THRESHOLD and ret.wheelSpeeds.rr <= STANDSTILL_THRESHOLD
|
||||
|
||||
if pt_cp.vl["ECMPRDNL2"]["ManualMode"] == 1:
|
||||
ret.gearShifter = self.parse_gear_shifter("T")
|
||||
|
||||
@@ -234,7 +234,7 @@ class TestCarModelBase(unittest.TestCase):
|
||||
|
||||
checks['gasPressed'] += CS.gasPressed != self.safety.get_gas_pressed_prev()
|
||||
checks['cruiseState'] += CS.cruiseState.enabled and not CS.cruiseState.available
|
||||
if self.CP.carName not in ("hyundai", "volkswagen", "gm", "body"):
|
||||
if self.CP.carName not in ("hyundai", "volkswagen", "body"):
|
||||
# TODO: fix standstill mismatches for other makes
|
||||
checks['standstill'] += CS.standstill == self.safety.get_vehicle_moving()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user