wip
This commit is contained in:
@@ -213,6 +213,7 @@ class CarController(CarControllerBase):
|
||||
elif CC.cruiseControl.resume:
|
||||
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||
# TODO: resume for alt button cars
|
||||
print (CS.cruise_can_msg)
|
||||
CS.lkas_trigger_result = 3
|
||||
pass
|
||||
else:
|
||||
|
||||
@@ -273,6 +273,8 @@ class CarState(CarStateBase):
|
||||
if self.CP.flags & HyundaiFlags.EV:
|
||||
ret.cruiseState.nonAdaptive = cp.vl["MANUAL_SPEED_LIMIT_ASSIST"]["MSLA_ENABLED"] == 1
|
||||
|
||||
self.cruise_can_msg = copy.copy(cp.vl_all[self.cruise_btns_msg_canfd])
|
||||
|
||||
self.prev_cruise_buttons = self.cruise_buttons[-1]
|
||||
self.cruise_buttons.extend(cp.vl_all[self.cruise_btns_msg_canfd]["CRUISE_BUTTONS"])
|
||||
self.prev_main_buttons = self.main_buttons[-1]
|
||||
|
||||
@@ -161,7 +161,8 @@ class CarInterface(CarInterfaceBase):
|
||||
def _update(self, c, frogpilot_variables):
|
||||
ret = self.CS.update(self.cp, self.cp_cam, frogpilot_variables)
|
||||
|
||||
if self.CS.CP.openpilotLongitudinalControl:
|
||||
# todo: this check probably needs to be removed on other cars
|
||||
# if self.CS.CP.openpilotLongitudinalControl:
|
||||
ret.buttonEvents = [
|
||||
*create_button_events(self.CS.cruise_buttons[-1], self.CS.prev_cruise_buttons, BUTTONS_DICT),
|
||||
*create_button_events(self.CS.lkas_enabled, self.CS.lkas_previously_enabled, {1: FrogPilotButtonType.lkas}),
|
||||
|
||||
@@ -1233,15 +1233,11 @@ class Controls:
|
||||
if (len(CS.buttonEvents) > 0):
|
||||
print (CS.buttonEvents)
|
||||
if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents):
|
||||
exit() # Just cause a crash for testing
|
||||
self.events.add(EventName.clpDebug)
|
||||
# clearpilot_notice(CP_NOTICE_DEBUG, "LKAS Debug Action Invoked")
|
||||
foo = "bar"
|
||||
|
||||
|
||||
def clearpilot_state_control(self, CC, CS):
|
||||
foo = "bar"
|
||||
|
||||
if any(be.pressed and be.type == FrogPilotButtonType.lkas for be in CS.buttonEvents):
|
||||
CC.cruiseControl.resume = True
|
||||
return CC
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user