process_replay: add cast in migrate_longitudinalPlan (#34383)

* Cast

* Something

* Remove newline
pull/34385/head
Kacper Rączy 3 months ago committed by GitHub
parent ea4a127ab8
commit 2054495e79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      selfdrive/test/process_replay/migration.py

@ -108,7 +108,8 @@ def migrate_longitudinalPlan(msgs):
if msg.which() != 'longitudinalPlan':
continue
new_msg = msg.as_builder()
new_msg.longitudinalPlan.aTarget, new_msg.longitudinalPlan.shouldStop = get_accel_from_plan(msg.longitudinalPlan.speeds, msg.longitudinalPlan.accels)
a_target, should_stop = get_accel_from_plan(msg.longitudinalPlan.speeds, msg.longitudinalPlan.accels)
new_msg.longitudinalPlan.aTarget, new_msg.longitudinalPlan.shouldStop = float(a_target), bool(should_stop)
ops.append((index, new_msg.as_reader()))
return ops, [], []

Loading…
Cancel
Save