Remove Global Subarus from Dashcam Mode

This commit is contained in:
FrogAi
2024-02-27 16:34:47 -07:00
parent c9c74da42b
commit 5053a45d81
2 changed files with 3 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ class CarInterface(CarInterfaceBase):
# - replacement for ES_Distance so we can cancel the cruise control
# - to find the Cruise_Activated bit from the car
# - proper panda safety setup (use the correct cruise_activated bit, throttle from Throttle_Hybrid, etc)
ret.dashcamOnly = candidate in (PREGLOBAL_CARS | LKAS_ANGLE | HYBRID_CARS)
ret.dashcamOnly = candidate in (LKAS_ANGLE | HYBRID_CARS)
ret.autoResumeSng = False
# Detect infotainment message sent from the camera

View File

@@ -239,6 +239,8 @@ def main():
0.2 <= liveParameters.stiffnessFactor <= 5.0,
min_sr <= liveParameters.steerRatio <= max_sr,
))
if (CP.carName == 'subaru' and CP.lateralTuning.which() == 'torque'):
liveParameters.valid = True
liveParameters.steerRatioStd = float(P[States.STEER_RATIO].item())
liveParameters.stiffnessFactorStd = float(P[States.STIFFNESS].item())
liveParameters.angleOffsetAverageStd = float(P[States.ANGLE_OFFSET].item())