wip
This commit is contained in:
@@ -277,6 +277,20 @@ class CarState(CarStateBase):
|
||||
self.cruise_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["CRUISE_BUTTONS"])
|
||||
self.prev_main_buttons = self.main_buttons[-1]
|
||||
self.main_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["ADAPTIVE_CRUISE_MAIN_BTN"])
|
||||
|
||||
# testme
|
||||
# if ret.cruiseState.speed > 1 and self.main_enabled == False:
|
||||
# self.main_enabled = True
|
||||
|
||||
# test if this blocks trying to engage while pressin brakes
|
||||
if self.main_buttons[-1] != 0 and ret.brakePressed and self.main_enabled == False:
|
||||
self.main_buttons[-1] = 0
|
||||
# But enable always on lateral if self.main_enabled = false
|
||||
# I think this may require an override variable?
|
||||
# It looks like always on lat is only set when cruise control is enabled
|
||||
# We need a temp version that enables or disables it if cruise is off via button
|
||||
# and then the temp state removes when the button is pressed again
|
||||
|
||||
if self.prev_main_buttons == 0 and self.main_buttons[-1] != 0:
|
||||
self.main_enabled = not self.main_enabled
|
||||
# if self.fix_main_enabled_check:
|
||||
|
||||
Reference in New Issue
Block a user