use new cereal

This commit is contained in:
Jason Wen
2024-11-16 17:23:31 -05:00
parent ca4183808d
commit 4f78e31cf4
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -21,6 +21,7 @@ from openpilot.selfdrive.controls.lib.longcontrol import LongControl
from openpilot.selfdrive.controls.lib.vehicle_model import VehicleModel
from openpilot.selfdrive.locationd.helpers import PoseCalibrator, Pose
from opendbc.sunnypilot import SunnypilotParamFlags
State = log.SelfdriveState.OpenpilotState
LaneChangeState = log.LaneChangeState
@@ -169,8 +170,9 @@ class Controls:
hudControl.leftLaneDepart = self.sm['driverAssistance'].leftLaneDeparture
hudControl.rightLaneDepart = self.sm['driverAssistance'].rightLaneDeparture
sunnyLiveParams = CC.sunnyLiveParams
sunnyLiveParams.enableMads = self.enable_mads
sunnypilotParams = CC.sunnypilotParams
if self.enable_mads:
sunnypilotParams |= SunnypilotParamFlags.ENABLE_MADS.value
if self.sm['selfdriveState'].active:
CO = self.sm['carOutput']
+1 -1
View File
@@ -24,7 +24,7 @@ class ModularAssistiveDrivingSystem:
self.state_machine = StateMachine(self)
if self.selfdrive.CP.carName == "hyundai":
if (self.selfdrive.CP.sunnyParams.flags & HyundaiFlagsSP.HAS_LFA_BUTTON) or \
if (self.selfdrive.CP.sunnypilotFlags & HyundaiFlagsSP.HAS_LFA_BUTTON) or \
(self.selfdrive.CP.flags & HyundaiFlags.CANFD):
self.allow_always = True