fix wasted cycles in locationd and dmonitoringd

pull/2108/head
Adeeb Shihadeh 5 years ago
parent 63436373d2
commit 0fad46457c
  1. 2
      cereal
  2. 2
      selfdrive/locationd/locationd.py
  3. 3
      selfdrive/monitoring/dmonitoringd.py

@ -1 +1 @@
Subproject commit 1538183eaa3c9a22a3e675182d6e1cc8e23ad574
Subproject commit 0a13413f41d54295f618f497e5434fa64ee53313

@ -289,7 +289,7 @@ def locationd_thread(sm, pm, disabled_logs=None):
localizer = Localizer(disabled_logs=disabled_logs)
while True:
sm.update()
sm.update(wait_for="cameraOdometry")
for sock, updated in sm.updated.items():
if updated and sm.valid[sock]:

@ -40,7 +40,7 @@ def dmonitoringd_thread(sm=None, pm=None):
# 10Hz <- dmonitoringmodeld
while True:
sm.update()
sm.update(wait_for="driverState")
# Get interaction
if sm.updated['carState']:
@ -57,7 +57,6 @@ def dmonitoringd_thread(sm=None, pm=None):
driver_status.set_policy(sm['model'])
# Get data from dmonitoringmodeld
if sm.updated['driverState']:
events = Events()
driver_status.get_pose(sm['driverState'], sm['liveCalibration'].rpyCalib, sm['carState'].vEgo, sm['carState'].cruiseState.enabled)

Loading…
Cancel
Save