Reapply "update to new opendbc API (#32009)" (#33151)

This reverts commit f2f01e3afaeaa267af61c8d7ab918da04d3411f2.
old-commit-hash: 7c112341c358b57ee9d0209cb2b2c53383adcca9
This commit is contained in:
Shane Smiskol
2024-07-31 15:37:39 -07:00
committed by GitHub
parent 0ea25665bb
commit 799fabd707
13 changed files with 86 additions and 17 deletions
@@ -24,6 +24,7 @@
"from opendbc.can.parser import CANParser\n",
"\n",
"from openpilot.selfdrive.car.subaru.values import DBC\n",
"from openpilot.selfdrive.pandad import can_capnp_to_list\n",
"from openpilot.tools.lib.logreader import LogReader\n",
"\n",
"\"\"\"\n",
@@ -50,7 +51,7 @@
"\n",
" for msg in lr:\n",
" if msg.which() == \"can\":\n",
" cp.update_strings([msg.as_builder().to_bytes()])\n",
" cp.update_strings(can_capnp_to_list([msg.as_builder().to_bytes()]))\n",
" es_distance_history.append(copy.copy(cp.vl[\"ES_Distance\"]))\n",
" es_brake_history.append(copy.copy(cp.vl[\"ES_Brake\"]))\n",
" es_status_history.append(copy.copy(cp.vl[\"ES_Status\"]))\n",
@@ -27,6 +27,7 @@
"from opendbc.can.parser import CANParser\n",
"\n",
"from openpilot.selfdrive.car.subaru.values import CanBus, DBC\n",
"from openpilot.selfdrive.pandad import can_capnp_to_list\n",
"from openpilot.tools.lib.logreader import LogReader\n",
"\n",
"\"\"\"\n",
@@ -50,7 +51,7 @@
" examples = []\n",
"\n",
" for msg in can_msgs:\n",
" cp.update_strings([msg.as_builder().to_bytes()])\n",
" cp.update_strings(can_capnp_to_list([msg.as_builder().to_bytes()]))\n",
" steering_torque_history.append(copy.copy(cp.vl[\"Steering_Torque\"]))\n",
"\n",
" steer_warning_last = False\n",