mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-24 10:02:08 +08:00
use new cereal
This commit is contained in:
+1
-1
Submodule opendbc_repo updated: 9cda3653e0...e220dadd78
@@ -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']
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user