Revert "Update interface.py"

This reverts commit d563c72f72.
This commit is contained in:
firestar5683
2025-05-12 13:20:11 -05:00
parent d563c72f72
commit caa24fd8bd
+4 -23
View File
@@ -136,10 +136,6 @@ class CarInterface(CarInterfaceBase):
ret.openpilotLongitudinalControl = True
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
# CAM_LONG flag only if camera-capable and conditional_experimental_mode enabled
if candidate in CAMERA_ACC_CAR and getattr(frogpilot_toggles, "conditional_experimental_mode", False):
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
elif candidate in SDGM_CAR:
ret.longitudinalTuning.kiV = [0., 0., 0.] # TODO: tuning
ret.experimentalLongitudinalAvailable = False
@@ -151,12 +147,7 @@ class CarInterface(CarInterfaceBase):
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_SDGM
else: # ASCM, OBD-II harness
try:
disable_long = frogpilot_toggles.disable_openpilot_long
except AttributeError:
disable_long = params.get_bool("DisableOpenpilotLongitudinal")
ret.openpilotLongitudinalControl = True
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
ret.networkLocation = NetworkLocation.gateway
ret.radarUnavailable = RADAR_HEADER_MSG not in fingerprint[CanBus.OBSTACLE] and not docs
ret.pcmCruise = False # stock non-adaptive cruise control is kept off
@@ -278,11 +269,7 @@ class CarInterface(CarInterfaceBase):
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM
ret.minEnableSpeed = -1
ret.pcmCruise = False
try:
disable_long = frogpilot_toggles.disable_openpilot_long
except AttributeError:
disable_long = params.get_bool("DisableOpenpilotLongitudinal")
ret.openpilotLongitudinalControl = True
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
ret.stoppingControl = True
ret.autoResumeSng = True
@@ -302,19 +289,13 @@ class CarInterface(CarInterfaceBase):
elif candidate in CC_ONLY_CAR:
ret.flags |= GMFlags.CC_LONG.value
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_CC_LONG
ret.radarUnavailable = True
ret.experimentalLongitudinalAvailable = False
ret.minEnableSpeed = 24 * CV.MPH_TO_MS
try:
disable_long = frogpilot_toggles.disable_openpilot_long
except AttributeError:
disable_long = params.get_bool("DisableOpenpilotLongitudinal")
ret.openpilotLongitudinalControl = True
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
ret.pcmCruise = False
if not ret.enableGasInterceptor:
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_CC_LONG
if not ret.enableGasInterceptor and candidate in CC_ONLY_CAR: #redneck tuning
ret.longitudinalTuning.kpBP = [10.7, 10.8, 28.] # 10.7 m/s == 24 mph
ret.longitudinalTuning.kpV = [0., 20., 20.] # set lower end to 0 since we can't drive below that speed