wip
This commit is contained in:
17119
frogpilot.diff
Normal file
17119
frogpilot.diff
Normal file
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ def create_steering_messages(packer, CP, CAN, enabled, lat_active, apply_steer):
|
|||||||
|
|
||||||
values = {
|
values = {
|
||||||
"LKA_MODE": 2, # CP: Whats this?
|
"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,
|
"TORQUE_REQUEST": apply_steer,
|
||||||
"LKA_ASSIST": 0,
|
"LKA_ASSIST": 0,
|
||||||
"STEER_REQ": 1 if lat_active else 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)
|
return packer.make_can_msg("SCC_CONTROL", CAN.ECAN, values)
|
||||||
|
|
||||||
# CLEARPILOT changed HDA icons
|
# CLEARPILOT changed HDA icons
|
||||||
|
# This doesn't appear to do anything on my tucson
|
||||||
def create_lfahda_cluster(packer, CAN, enabled, lat_active):
|
def create_lfahda_cluster(packer, CAN, enabled, lat_active):
|
||||||
values = {
|
values = {
|
||||||
# 0 off, 1 gray, 2 green, 3 blinking (wheel icon)
|
# 0 off, 1 gray, 2 green, 3 blinking (wheel icon)
|
||||||
# CP: Is this actually the wheel? Might this be the HDA2 thing?
|
# CP: Is this actually the wheel? Might this be the HDA2 thing?
|
||||||
"HDA_ICON": 0, # Intention is to have this represent stock HDA mode
|
"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)
|
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ def nmea_checksum_ok(s):
|
|||||||
def process_nmea_port_messages(device:str="/dev/ttyUSB1") -> NoReturn:
|
def process_nmea_port_messages(device:str="/dev/ttyUSB1") -> NoReturn:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
with open(device, "r") as nmeaport:
|
with open(device) as nmeaport:
|
||||||
for line in nmeaport:
|
for line in nmeaport:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
|||||||
Reference in New Issue
Block a user