cleanup old sm pm args (#30241)

* cleanup sm pm

* fix controlsd

* fix
This commit is contained in:
Adeeb Shihadeh
2023-10-13 23:27:04 -07:00
committed by GitHub
parent 9e24a11f17
commit b68cfbb332
8 changed files with 41 additions and 64 deletions
+2 -3
View File
@@ -440,7 +440,7 @@ def clear_tmp_cache():
os.mkdir(Paths.download_cache_root())
def main(sm=None, pm=None):
def main():
#clear_tmp_cache()
use_qcom = not Params().get_bool("UbloxAvailable")
@@ -449,8 +449,7 @@ def main(sm=None, pm=None):
else:
raw_name = "ubloxGnss"
raw_gnss_sock = messaging.sub_sock(raw_name, conflate=False)
if pm is None:
pm = messaging.PubMaster(['gnssMeasurements'])
pm = messaging.PubMaster(['gnssMeasurements'])
# disable until set as main gps source, to better analyze startup time
# TODO ensure low CPU usage before enabling
+3 -5
View File
@@ -117,16 +117,14 @@ def check_valid_with_hysteresis(current_valid: bool, val: float, threshold: floa
return current_valid
def main(sm=None, pm=None):
def main():
config_realtime_process([0, 1, 2, 3], 5)
DEBUG = bool(int(os.getenv("DEBUG", "0")))
REPLAY = bool(int(os.getenv("REPLAY", "0")))
if sm is None:
sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman'])
if pm is None:
pm = messaging.PubMaster(['liveParameters'])
pm = messaging.PubMaster(['liveParameters'])
sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman'])
params_reader = Params()
# wait for stats about the car to come in from controls
+3 -6
View File
@@ -218,14 +218,11 @@ class TorqueEstimator:
return msg
def main(sm=None, pm=None):
def main():
config_realtime_process([0, 1, 2, 3], 5)
if sm is None:
sm = messaging.SubMaster(['carControl', 'carState', 'liveLocationKalman'], poll=['liveLocationKalman'])
if pm is None:
pm = messaging.PubMaster(['liveTorqueParameters'])
pm = messaging.PubMaster(['liveTorqueParameters'])
sm = messaging.SubMaster(['carControl', 'carState', 'liveLocationKalman'], poll=['liveLocationKalman'])
params = Params()
with car.CarParams.from_bytes(params.get("CarParams", block=True)) as CP: