Add SDGM support

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 0174873f46
commit 9af2cadf3b
9 changed files with 165 additions and 51 deletions

View File

@@ -50,6 +50,12 @@ class CarControllerParams:
if CP.carFingerprint in SLOW_ACC and Params().get_bool("GasRegenCmd"):
self.MAX_GAS = 8650
elif CP.carFingerprint in SDGM_CAR:
self.MAX_GAS = 3400
self.MAX_ACC_REGEN = 1514
self.INACTIVE_REGEN = 1554
max_regen_acceleration = 0.
else:
self.MAX_GAS = 7168 # Safety limit, not ACC max. Stock ACC >8192 from standstill.
self.MAX_ACC_REGEN = 5500 # Max ACC regen is slightly less than max paddle regen
@@ -90,6 +96,7 @@ class CAR(StrEnum):
YUKON_CC = "GMC YUKON NO ACC"
CT6_CC = "CADILLAC CT6 NO ACC"
TRAILBLAZER_CC = "CHEVROLET TRAILBLAZER 2024 NO ACC"
XT4 = "CADILLAC XT4 2023"
class Footnote(Enum):
@@ -141,6 +148,7 @@ CAR_INFO: Dict[str, Union[GMCarInfo, List[GMCarInfo]]] = {
CAR.YUKON_CC: GMCarInfo("GMC Yukon No ACC"),
CAR.CT6_CC: GMCarInfo("Cadillac CT6 No ACC"),
CAR.TRAILBLAZER_CC: GMCarInfo("Chevrolet Trailblazer 2024 No ACC"),
CAR.XT4: GMCarInfo("Cadillac XT4 2023", "Driver Assist Package"),
}
@@ -182,6 +190,9 @@ CC_ONLY_CAR = {CAR.VOLT_CC, CAR.BOLT_CC, CAR.EQUINOX_CC, CAR.SUBURBAN_CC, CAR.YU
# Slow acceleration cars
SLOW_ACC = {CAR.SILVERADO}
# We're integrated at the Safety Data Gateway Module on these cars
SDGM_CAR = {CAR.XT4}
# We're integrated at the camera with VOACC on these cars (instead of ASCM w/ OBD-II harness)
CAMERA_ACC_CAR = {CAR.BOLT_EUV, CAR.SILVERADO, CAR.EQUINOX, CAR.TRAILBLAZER}
CAMERA_ACC_CAR.update({CAR.VOLT_CC, CAR.BOLT_CC, CAR.EQUINOX_CC, CAR.YUKON_CC, CAR.CT6_CC, CAR.TRAILBLAZER_CC})