This commit is contained in:
Your Name
2024-02-09 17:24:49 -06:00
parent 4948aecc6e
commit da6553c24d
4 changed files with 29 additions and 14 deletions

9
notes
View File

@@ -24,3 +24,12 @@ Interesting can messages
SG_ C_SunRoofOpenState SG_ C_SunRoofOpenState
CR_Datc_DrTempDispF CR_Datc_DrTempDispF
2-9 test notes
- Only the icon with the lane lines is showing after recent lkas mods - can we show amber?
- pressing lkas distance does in fact cancel cruise, if only for a second. that means that it response to the cancel button - and possibly resume too?
- test: set cluster speed directly
- test: simulate down button on wheel
- we should put a splash screen of the pacman ghost over the main startup display, and only reveal the interface when we tap on it
- Fix: read speed limit from car computer, flicker LKAS button when it is out of range

View File

@@ -197,9 +197,9 @@ class CarController:
# else: # else:
# can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP.carFingerprint)] * 25) # can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP.carFingerprint)] * 25)
# Test # Test - Works???
if CS.cruise_buttons == Buttons.NONE and CS.cruiseState.enabled: # if CS.cruise_buttons == Buttons.NONE and CS.cruiseState.enabled:
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, ((self.frame // 2) + 1) % 0x10, Buttons.SET_DECEL)) # can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, ((self.frame // 2) + 1) % 0x10, Buttons.SET_DECEL))
new_actuators = actuators.copy() new_actuators = actuators.copy()
new_actuators.steer = apply_steer / self.params.STEER_MAX new_actuators.steer = apply_steer / self.params.STEER_MAX
@@ -237,10 +237,13 @@ class CarController:
if CS.oscar_lane_center_btn_pressed: if CS.oscar_lane_center_btn_pressed:
CS.oscar_lane_center_btn_pressed = False CS.oscar_lane_center_btn_pressed = False
# CC.cruiseControl.resume = True # CC.cruiseControl.resume = True
CC.cruiseControl.cancel = True # CC.cruiseControl.cancel = True
# Test this... # Test this...
# ?? can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override, # Also try create_acc_commands
# set_speed_in_units, CS.personality_profile)) # This attempts to set the speed to
stopping = CC.actuators.longControlState == LongCtrlState.stopping
can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, CC.actuators.accel, stopping, CC.cruiseControl.override,
40, CS.personality_profile))
# cruise cancel # cruise cancel
if CC.cruiseControl.cancel: if CC.cruiseControl.cancel:

View File

@@ -309,15 +309,18 @@ class CarState(CarStateBase):
if self.cruise_buttons[-1] == Buttons.GAP_DIST and self.prev_cruise_buttons == 0: if self.cruise_buttons[-1] == Buttons.GAP_DIST and self.prev_cruise_buttons == 0:
self.oscar_lane_center_btn_pressed = True self.oscar_lane_center_btn_pressed = True
lkas_pressed = False
try:
lkas_pressed = cp.vl[self.cruise_btns_msg_canfd]["LKAS_BTN"]
except:
nothing = 0
# intentionally cause a failure
if lkas_pressed:
floog=norpdywoop
# if self.cruise_buttons[-1] == Buttons.GAP_DIST and self.prev_cruise_buttons == 0: # if self.cruise_buttons[-1] == Buttons.GAP_DIST and self.prev_cruise_buttons == 0:
# self.oscar_lane_center_btn_pressed= True # self.oscar_lane_center_btn_pressed= True
# lkas_pressed = cp.vl_all[self.cruise_btns_msg_canfd]["LKAS_BTN"]
# if lkas_pressed and not self.lkas_previously_pressed:
# self.custom_speed_up = True
# self.lkas_previously_pressed = lkas_pressed
# Driving personalities function # Driving personalities function
# if self.personalities_via_wheel and ret.cruiseState.available: # if self.personalities_via_wheel and ret.cruiseState.available:
# # Sync with the onroad UI button # # Sync with the onroad UI button

View File

@@ -116,7 +116,7 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
def create_lfahda_cluster(packer, CAN, enabled): def create_lfahda_cluster(packer, CAN, enabled):
values = { values = {
"HDA_ICON": 1 if enabled else 0, "HDA_ICON": 1 if enabled else 0,
"LFA_ICON": 0 if enabled else 0, "LFA_ICON": 3 if enabled else 0, # was green before i think in 2? 3 should be flashing?
# "LFA_ICON": 2 if enabled else 0, # "LFA_ICON": 2 if enabled else 0,
} }
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values) return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)