wip
This commit is contained in:
@@ -23,9 +23,6 @@ class CanBus(CanBusBase):
|
|||||||
self._e += self.offset
|
self._e += self.offset
|
||||||
self._cam = 2 + self.offset
|
self._cam = 2 + self.offset
|
||||||
|
|
||||||
self.params = Params()
|
|
||||||
self.params_memory = Params("/dev/shm/params")
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ECAN(self):
|
def ECAN(self):
|
||||||
return self._e
|
return self._e
|
||||||
@@ -130,13 +127,19 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
|
|||||||
# CLEARPILOT changed HDA icons
|
# CLEARPILOT changed HDA icons
|
||||||
# This doesn't appear to do anything on my tucson
|
# 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):
|
||||||
no_lat_lane_change = self.params_memory.get_int("no_lat_lane_change", 1)
|
|
||||||
|
# Im sure there is a better way to do this
|
||||||
|
params = Params()
|
||||||
|
params_memory = Params("/dev/shm/params")
|
||||||
|
no_lat_lane_change = params_memory.get_int("no_lat_lane_change", 1)
|
||||||
|
|
||||||
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": 0 if no_lat_lane_change else 2 if enabled else 1 if lat_active else 0,
|
"LFA_ICON": 0 if no_lat_lane_change else 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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user