diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index 872ff6c57d..914e0d0223 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -123,17 +123,14 @@ def main(sm=None, pm=None): # When driving in wet conditions the stiffness can go down, and then be too low on the next drive # Without a way to detect this we have to reset the stiffness every drive params['stiffnessFactor'] = 1.0 - learner = ParamsLearner(CP, params['steerRatio'], params['stiffnessFactor'], math.radians(params['angleOffsetAverageDeg'])) - angle_offset_average = params['angleOffsetAverageDeg'] angle_offset = angle_offset_average while True: sm.update() - - for which, updated in sm.updated.items(): - if updated: + for which in sorted(sm.updated.keys(), key=lambda x: sm.logMonoTime[x]): + if sm.updated[which]: t = sm.logMonoTime[which] * 1e-9 learner.handle_log(t, which, sm[which]) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index fd5b288882..941467aebd 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -dc264ed5d283bbfe4dd44c5f65db3eb5cef210eb \ No newline at end of file +5ee94677282bcea512e0d929e55e71308f14d530 \ No newline at end of file