This commit is contained in:
Your Name
2024-05-02 01:07:51 -05:00
parent 95a98a8fe8
commit c55a879968
83 changed files with 3570 additions and 69 deletions

View File

@@ -40,8 +40,8 @@ def create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer):
ret = []
values = {
"LKA_MODE": 2,
"LKA_ICON": 2 if lat_active else 1,
"LKA_MODE": 2, # CP: Whats this?
"LKA_ICON": 2 if lat_active else 1, # CP: Whats this?
"TORQUE_REQUEST": apply_steer,
"LKA_ASSIST": 0,
"STEER_REQ": 1 if lat_active else 0,
@@ -113,10 +113,13 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
})
return packer.make_can_msg("SCC_CONTROL", CAN.ECAN, values)
# CLEARPILOT changed HDA icons
def create_lfahda_cluster(packer, CAN, enabled, lat_active):
values = {
"HDA_ICON": 1 if enabled else 0,
"LFA_ICON": 2 if lat_active else 0,
# 0 off, 1 gray, 2 green, 3 blinking (wheel icon)
# CP: Is this actually the wheel? Might this be the HDA2 thing?
"HDA_ICON": 0, # Intention is to have this represent stock HDA mode
"LFA_ICON": 2 if enabled else 1 if lat_active else 0,
}
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)