wip
This commit is contained in:
@@ -8,7 +8,7 @@ from openpilot.selfdrive.car.hyundai import hyundaicanfd, hyundaican
|
||||
from openpilot.selfdrive.car.hyundai.hyundaicanfd import CanBus
|
||||
from openpilot.selfdrive.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CANFD_CAR, CAR
|
||||
from openpilot.selfdrive.car.interfaces import CarControllerBase
|
||||
|
||||
from openpilot.common.params import Params
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
LongCtrlState = car.CarControl.Actuators.LongControlState
|
||||
|
||||
@@ -182,10 +182,18 @@ class CarController(CarControllerBase):
|
||||
return new_actuators, can_sends
|
||||
|
||||
def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool):
|
||||
# hax
|
||||
params_memory = Params("/dev/shm/params")
|
||||
|
||||
if params_memory.get_bool("CPTLkasButtonAction"):
|
||||
params_memory.put_bool("CPTLkasButtonAction", False)
|
||||
CC.cruiseControl.cancel = True
|
||||
print("Debug cancel executed")
|
||||
|
||||
can_sends = []
|
||||
if use_clu11:
|
||||
if CC.cruiseControl.cancel:
|
||||
print("Cancel executed")
|
||||
print("Yes")
|
||||
can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP))
|
||||
CS.lkas_trigger_result = 5
|
||||
elif CC.cruiseControl.resume:
|
||||
|
||||
Reference in New Issue
Block a user