This commit is contained in:
Your Name
2024-05-03 23:32:41 -05:00
parent c22403f4fa
commit ede59674fa
2 changed files with 3 additions and 13 deletions

View File

@@ -9,8 +9,6 @@ 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
import sys
VisualAlert = car.CarControl.HUDControl.VisualAlert
LongCtrlState = car.CarControl.Actuators.LongControlState
@@ -122,12 +120,10 @@ class CarController(CarControllerBase):
self.CP.flags & HyundaiFlags.CANFD_HDA2_ALT_STEERING))
# LFA and HDA icons
# if self.frame % 5 == 0 and (not hda2 or hda2_long):
if self.frame % 5 == 0 and (not hda2 or hda2_long):
# CLEARPILOT TEST self.CS.lkas_enabled
# can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CC.enabled, CC.latActive))
# can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CS.lkas_enabled, CS.lkas_enabled))
can_sends.append(hyundaicanfd.create_lfahda_cluster(self.packer, self.CAN, CS.lkas_enabled, CS.lkas_enabled))
# blinkers
if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
@@ -182,10 +178,6 @@ class CarController(CarControllerBase):
def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool):
can_sends = []
# False
# sys.stderr.write(str({'use_clu11': use_clu11}) + '\n')
if use_clu11:
if CC.cruiseControl.cancel:
can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP))
@@ -209,10 +201,9 @@ class CarController(CarControllerBase):
self.last_button_frame = self.frame
# cruise standstill resume
elif CC.cruiseControl.resume or CS.lkas_enabled:
elif CC.cruiseControl.resume:
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
# TODO: resume for alt button cars
sys.stderr.write(str({'canfdalt': True}) + '\n')
pass
else:
for _ in range(20):

View File

@@ -297,7 +297,6 @@ class CarState(CarStateBase):
# new lane change works perfect
# need to auto disable lat on turn lower than 20 + turn signal as default
self.lkas_enabled = lkas_enabled
self.params_memory.put_float("CarSpeedLimit", self.calculate_speed_limit(cp, cp_cam) * speed_factor)