Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrysler: prep for Ram port #25040

Merged
merged 4 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion panda
4 changes: 1 addition & 3 deletions release/files_common
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ common/filter_simple.py
common/stat_live.py
common/spinner.py
common/text_window.py
common/SConscript

common/kalman/.gitignore
common/kalman/*
Expand Down Expand Up @@ -217,7 +216,6 @@ selfdrive/locationd/generated/gps.h

selfdrive/locationd/laikad.py
selfdrive/locationd/laikad_helpers.py
selfdrive/locationd/locationd.cc
selfdrive/locationd/locationd.h
selfdrive/locationd/locationd.cc
selfdrive/locationd/paramsd.py
Expand Down Expand Up @@ -475,7 +473,7 @@ opendbc/can/parser_pyx.pyx

opendbc/comma_body.dbc

opendbc/chrysler_pacifica_2017_hybrid.dbc
opendbc/chrysler_pacifica_2017_hybrid_generated.dbc
opendbc/chrysler_pacifica_2017_hybrid_private_fusion.dbc

opendbc/gm_global_a_powertrain_generated.dbc
Expand Down
20 changes: 10 additions & 10 deletions selfdrive/car/chrysler/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ def update(self, cp, cp_cam):
steer_state = cp.vl["EPS_2"]["LKAS_STATE"]
ret.steerFaultPermanent = steer_state == 4 or (steer_state == 0 and ret.vEgo > self.CP.minSteerSpeed)

ret.genericToggle = bool(cp.vl["STEERING_LEVERS"]["HIGH_BEAM_FLASH"])
ret.genericToggle = bool(cp.vl["STEERING_LEVERS"]["HIGH_BEAM_PRESSED"])

if self.CP.enableBsm:
ret.leftBlindspot = cp.vl["BLIND_SPOT_WARNINGS"]["BLIND_SPOT_LEFT"] == 1
ret.rightBlindspot = cp.vl["BLIND_SPOT_WARNINGS"]["BLIND_SPOT_RIGHT"] == 1
ret.leftBlindspot = cp.vl["BSM_1"]["LEFT_STATUS"] == 1
ret.rightBlindspot = cp.vl["BSM_1"]["RIGHT_STATUS"] == 1

self.lkas_counter = cp_cam.vl["LKAS_COMMAND"]["COUNTER"]
self.lkas_car_model = cp_cam.vl["LKAS_HUD"]["CAR_MODEL"]
self.lkas_car_model = cp_cam.vl["DAS_6"]["CAR_MODEL"]
self.lkas_status_ok = cp_cam.vl["LKAS_HEARTBIT"]["LKAS_STATUS_OK"]
self.button_counter = cp.vl["CRUISE_BUTTONS"]["COUNTER"]

Expand Down Expand Up @@ -100,7 +100,7 @@ def get_can_parser(CP):
("ACC_AVAILABLE", "DAS_3"),
("ACC_ACTIVE", "DAS_3"),
("ACC_FAULTED", "DAS_3"),
("HIGH_BEAM_FLASH", "STEERING_LEVERS"),
("HIGH_BEAM_PRESSED", "STEERING_LEVERS"),
("ACC_SPEED_CONFIG_KPH", "DAS_4"),
("CRUISE_STATE", "DAS_4"),
("COLUMN_TORQUE", "EPS_2"),
Expand Down Expand Up @@ -132,10 +132,10 @@ def get_can_parser(CP):

if CP.enableBsm:
signals += [
("BLIND_SPOT_RIGHT", "BLIND_SPOT_WARNINGS"),
("BLIND_SPOT_LEFT", "BLIND_SPOT_WARNINGS"),
("RIGHT_STATUS", "BSM_1"),
("LEFT_STATUS", "BSM_1"),
]
checks.append(("BLIND_SPOT_WARNINGS", 2))
checks.append(("BSM_1", 2))

return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, 0)

Expand All @@ -144,13 +144,13 @@ def get_cam_can_parser(CP):
signals = [
# sig_name, sig_address
("COUNTER", "LKAS_COMMAND"),
("CAR_MODEL", "LKAS_HUD"),
("CAR_MODEL", "DAS_6"),
("LKAS_STATUS_OK", "LKAS_HEARTBIT")
]
checks = [
("LKAS_COMMAND", 100),
("LKAS_HEARTBIT", 10),
("LKAS_HUD", 4),
("DAS_6", 4),
]

return CANParser(DBC[CP.carFingerprint]["pt"], signals, checks, 2)
6 changes: 3 additions & 3 deletions selfdrive/car/chrysler/chryslercan.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def create_lkas_hud(packer, gear, lkas_active, hud_alert, hud_count, lkas_car_mo
"LKAS_ALERTS": alerts, # byte 3, last 4 bits
}

return packer.make_can_msg("LKAS_HUD", 0, values) # 0x2a6
return packer.make_can_msg("DAS_6", 0, values) # 0x2a6


def create_lkas_command(packer, apply_steer, moving_fast, frame):
# LKAS_COMMAND 0x292 (658) Lane-keeping signal to turn the wheel.
values = {
"LKAS_STEERING_TORQUE": apply_steer,
"LKAS_HIGH_TORQUE": int(moving_fast),
"STEERING_TORQUE": apply_steer,
"LKAS_CONTROL_BIT": int(moving_fast),
"COUNTER": frame % 0x10,
}
return packer.make_can_msg("LKAS_COMMAND", 0, values)
Expand Down
14 changes: 7 additions & 7 deletions selfdrive/car/chrysler/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ class ChryslerCarInfo(CarInfo):


DBC = {
CAR.PACIFICA_2017_HYBRID: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2018: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2020: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2018_HYBRID: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2019_HYBRID: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.JEEP_CHEROKEE: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.JEEP_CHEROKEE_2019: dbc_dict('chrysler_pacifica_2017_hybrid', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2017_HYBRID: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2018: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2020: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2018_HYBRID: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.PACIFICA_2019_HYBRID: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.JEEP_CHEROKEE: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
CAR.JEEP_CHEROKEE_2019: dbc_dict('chrysler_pacifica_2017_hybrid_generated', 'chrysler_pacifica_2017_hybrid_private_fusion'),
}

STEER_THRESHOLD = 120