mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-06 11:05:42 +08:00
this is why it was never using DEC
This commit is contained in:
@@ -16,13 +16,10 @@ class DecPlanner:
|
||||
def __init__(self, CP: structs.CarParams, mpc):
|
||||
self.CP = CP
|
||||
self.mpc = mpc
|
||||
|
||||
self.is_enabled = False
|
||||
|
||||
self.dynamic_experimental_controller = DynamicExperimentalController()
|
||||
|
||||
def get_mpc_mode(self, sm: messaging.SubMaster):
|
||||
if not self.is_enabled or not sm['selfdriveState'].experimentalMode:
|
||||
if not self.dynamic_experimental_controller.is_enabled() or not sm['selfdriveState'].experimentalMode:
|
||||
return None
|
||||
|
||||
return self.dynamic_experimental_controller.get_mpc_mode()
|
||||
|
||||
Reference in New Issue
Block a user