Skip to content

Commit

Permalink
Fallback publish calib (commaai#1392)
Browse files Browse the repository at this point in the history
* if no inputs still publish

* better
  • Loading branch information
haraschax authored Apr 18, 2020
1 parent 02e4745 commit 28d8b4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions selfdrive/locationd/calibrationd.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ def calibrationd_thread(sm=None, pm=None):
while 1:
sm.update()

# if no inputs still publish calibration
if not sm.updated['carState'] and not sm.updated['cameraOdometry']:
calibrator.send_data(pm)
continue

if sm.updated['carState']:
calibrator.handle_v_ego(sm['carState'].vEgo)
if send_counter % 25 == 0:
Expand All @@ -159,6 +164,7 @@ def calibrationd_thread(sm=None, pm=None):
sm['cameraOdometry'].transStd,
sm['cameraOdometry'].rotStd)


if DEBUG and new_vp is not None:
print('got new vp', new_vp)

Expand Down

0 comments on commit 28d8b4a

Please sign in to comment.