|
|
@ -12,6 +12,7 @@ import cereal.messaging as messaging |
|
|
|
from common.conversions import Conversions as CV |
|
|
|
from common.conversions import Conversions as CV |
|
|
|
from panda import ALTERNATIVE_EXPERIENCE |
|
|
|
from panda import ALTERNATIVE_EXPERIENCE |
|
|
|
from system.swaglog import cloudlog |
|
|
|
from system.swaglog import cloudlog |
|
|
|
|
|
|
|
from system.version import get_short_branch |
|
|
|
from selfdrive.boardd.boardd import can_list_to_can_capnp |
|
|
|
from selfdrive.boardd.boardd import can_list_to_can_capnp |
|
|
|
from selfdrive.car.car_helpers import get_car, get_startup_event, get_one_can |
|
|
|
from selfdrive.car.car_helpers import get_car, get_startup_event, get_one_can |
|
|
|
from selfdrive.controls.lib.lane_planner import CAMERA_OFFSET |
|
|
|
from selfdrive.controls.lib.lane_planner import CAMERA_OFFSET |
|
|
@ -62,6 +63,9 @@ class Controls: |
|
|
|
def __init__(self, sm=None, pm=None, can_sock=None, CI=None): |
|
|
|
def __init__(self, sm=None, pm=None, can_sock=None, CI=None): |
|
|
|
config_realtime_process(4, Priority.CTRL_HIGH) |
|
|
|
config_realtime_process(4, Priority.CTRL_HIGH) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Ensure the current branch is cached, otherwise the first iteration of controlsd lags |
|
|
|
|
|
|
|
self.branch = get_short_branch("") |
|
|
|
|
|
|
|
|
|
|
|
# Setup sockets |
|
|
|
# Setup sockets |
|
|
|
self.pm = pm |
|
|
|
self.pm = pm |
|
|
|
if self.pm is None: |
|
|
|
if self.pm is None: |
|
|
|