wip
This commit is contained in:
11
notes
11
notes
@@ -23,4 +23,13 @@ ret.cruiseState.standstill cp_scc.vl["SCC11"]["SCCInfoDisplay"] == 4.
|
||||
Interesting can messages
|
||||
|
||||
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
|
||||
@@ -197,9 +197,9 @@ class CarController:
|
||||
# else:
|
||||
# can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP.carFingerprint)] * 25)
|
||||
|
||||
# Test
|
||||
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))
|
||||
# Test - Works???
|
||||
# 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))
|
||||
|
||||
new_actuators = actuators.copy()
|
||||
new_actuators.steer = apply_steer / self.params.STEER_MAX
|
||||
@@ -237,10 +237,13 @@ class CarController:
|
||||
if CS.oscar_lane_center_btn_pressed:
|
||||
CS.oscar_lane_center_btn_pressed = False
|
||||
# CC.cruiseControl.resume = True
|
||||
CC.cruiseControl.cancel = True
|
||||
# CC.cruiseControl.cancel = True
|
||||
# Test this...
|
||||
# ?? can_sends.append(hyundaicanfd.create_acc_control(self.packer, self.CAN, CC.enabled, self.accel_last, accel, stopping, CC.cruiseControl.override,
|
||||
# set_speed_in_units, CS.personality_profile))
|
||||
# Also try create_acc_commands
|
||||
# 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
|
||||
if CC.cruiseControl.cancel:
|
||||
|
||||
@@ -309,15 +309,18 @@ class CarState(CarStateBase):
|
||||
if self.cruise_buttons[-1] == Buttons.GAP_DIST and self.prev_cruise_buttons == 0:
|
||||
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:
|
||||
# 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
|
||||
# if self.personalities_via_wheel and ret.cruiseState.available:
|
||||
# # Sync with the onroad UI button
|
||||
|
||||
@@ -116,7 +116,7 @@ def create_acc_cancel(packer, CP, CAN, cruise_info_copy):
|
||||
def create_lfahda_cluster(packer, CAN, enabled):
|
||||
values = {
|
||||
"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,
|
||||
}
|
||||
return packer.make_can_msg("LFAHDA_CLUSTER", CAN.ECAN, values)
|
||||
|
||||
Reference in New Issue
Block a user