mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 11:23:47 +08:00
update to new opendbc API (#32009)
* use new opendbc api * export pandad_python * merge master * merge master * bump opendbc * bump opendbc * improve func * keep interface unchanged * fix test_car_interfaces * bump opendbc * bump opendbc * fix test_models * the interface now has to convert from can capnp to list, so we should include this time * goes from ~210 to ~240 mean ms real time * remoe busTime * lowercase sendcan * consistent msgtype * bump * bump * not used in lat_mpc * space * bump to master --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user