diff --git a/opendbc_repo b/opendbc_repo index 3df0776969..9dca31094f 160000 --- a/opendbc_repo +++ b/opendbc_repo @@ -1 +1 @@ -Subproject commit 3df0776969949fc51f98412685bfff3ebb529841 +Subproject commit 9dca31094f1108494d080647a16e4fbcb8ba1bd7 diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index dea22fb3e7..9c7b6a0455 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import os import math from typing import SupportsFloat @@ -26,6 +27,7 @@ LaneChangeState = log.LaneChangeState LaneChangeDirection = log.LaneChangeDirection ACTUATOR_FIELDS = tuple(car.CarControl.Actuators.schema.fields.keys()) +REPLAY = "REPLAY" in os.environ class Controls: def __init__(self) -> None: @@ -34,9 +36,12 @@ class Controls: self.CP = messaging.log_from_bytes(self.params.get("CarParams", block=True), car.CarParams) cloudlog.info("controlsd got CarParams") - cloudlog.info("controlsd is waiting for CarParamsSP") - self.CP_SP = messaging.log_from_bytes(self.params.get("CarParamsSP", block=True), custom.CarParamsSP) - cloudlog.info("controlsd got CarParamsSP") + if not REPLAY: + cloudlog.info("controlsd is waiting for CarParamsSP") + self.CP_SP = messaging.log_from_bytes(self.params.get("CarParamsSP", block=True), custom.CarParamsSP) + cloudlog.info("controlsd got CarParamsSP") + else: + self.CP_SP = None self.CI = get_car_interface(self.CP, self.CP_SP) diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index 1089c43075..d10bf8f6c0 100755 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -60,7 +60,7 @@ class SelfdriveD(CruiseHelper): else: self.CP = CP - if CP_SP is None: + if CP_SP is None and not REPLAY: cloudlog.info("selfdrived is waiting for CarParamsSP") self.CP_SP = messaging.log_from_bytes(self.params.get("CarParamsSP", block=True), custom.CarParamsSP) cloudlog.info("selfdrived got CarParamsSP")