This commit is contained in:
Your Name
2024-05-03 01:31:25 -05:00
parent 02513c94c6
commit f70ca7178d
3 changed files with 17123 additions and 3 deletions

17119
frogpilot.diff Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -41,7 +41,7 @@ def create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer):
values = {
"LKA_MODE": 2, # CP: Whats this?
"LKA_ICON": 2 if lat_active else 1, # CP: Whats this?
"LKA_ICON": 2 if enabled else 1 if lat_active else 0, # CP: Whats this?
"TORQUE_REQUEST": apply_steer,
"LKA_ASSIST": 0,
"STEER_REQ": 1 if lat_active else 0,
@@ -114,12 +114,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
# This doesn't appear to do anything on my tucson
def create_lfahda_cluster(packer, CAN, enabled, lat_active):
values = {
# 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,
"LFA_ICON": 2 if enabled else 1 if lat_active else 0,
}
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)

View File

@@ -93,7 +93,7 @@ def nmea_checksum_ok(s):
def process_nmea_port_messages(device:str="/dev/ttyUSB1") -> NoReturn:
while True:
try:
with open(device, "r") as nmeaport:
with open(device) as nmeaport:
for line in nmeaport:
line = line.strip()
if DEBUG: