Disable openpilot longitudinal control

Added toggle to disable openpilot longitudinal control.
This commit is contained in:
FrogAi
2024-03-15 21:05:18 -07:00
parent a5412fdba2
commit 284b26b9eb
10 changed files with 23 additions and 10 deletions

View File

@@ -29,7 +29,7 @@ class CarInterface(CarInterfaceBase):
# Check if we have messages on an auxiliary panda, and that 0x2bf (DAS_control) is present on the AP powertrain bus
# If so, we assume that it is connected to the longitudinal harness.
if (CANBUS.autopilot_powertrain in fingerprint.keys()) and (0x2bf in fingerprint[CANBUS.autopilot_powertrain].keys()):
ret.openpilotLongitudinalControl = True
ret.openpilotLongitudinalControl = True and not params.get_bool("DisableOpenpilotLongitudinal")
ret.safetyConfigs = [
get_safety_config(car.CarParams.SafetyModel.tesla, Panda.FLAG_TESLA_LONG_CONTROL),
get_safety_config(car.CarParams.SafetyModel.tesla, Panda.FLAG_TESLA_LONG_CONTROL | Panda.FLAG_TESLA_POWERTRAIN),