Pedal interceptor sng

Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com>
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 003f15fa87
commit a2c4853ed2
3 changed files with 25 additions and 4 deletions

View File

@@ -336,6 +336,11 @@ class CarInterface(CarInterfaceBase):
ret.longitudinalTuning.kiV = [0.1, 0.1]
ret.longitudinalTuning.kf = 0.15
ret.stoppingDecelRate = 0.8
else: # Pedal used for SNG, ACC for longitudinal control otherwise
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
ret.startingState = True
ret.vEgoStopping = 0.25
ret.vEgoStarting = 0.25
elif candidate in CC_ONLY_CAR:
ret.flags |= GMFlags.CC_LONG.value
@@ -391,7 +396,7 @@ class CarInterface(CarInterfaceBase):
if below_min_enable_speed and not (ret.standstill and ret.brake >= 20 and
(self.CP.networkLocation == NetworkLocation.fwdCamera and not self.CP.carFingerprint in SDGM_CAR)):
events.add(EventName.belowEngageSpeed)
if ret.cruiseState.standstill and not self.disable_resumeRequired:
if ret.cruiseState.standstill and not self.CP.autoResumeSng and not self.disable_resumeRequired:
events.add(EventName.resumeRequired)
self.resumeRequired_shown = True