diff --git a/selfdrive/pandad/can_list_to_can_capnp.cc b/selfdrive/pandad/can_list_to_can_capnp.cc index ad2393b986..6ad999da91 100644 --- a/selfdrive/pandad/can_list_to_can_capnp.cc +++ b/selfdrive/pandad/can_list_to_can_capnp.cc @@ -1,8 +1,7 @@ #include "cereal/messaging/messaging.h" -#include "selfdrive/pandad/panda.h" #include "opendbc/can/common.h" -void can_list_to_can_capnp_cpp(const std::vector &can_list, std::string &out, bool sendcan, bool valid) { +void can_list_to_can_capnp_cpp(const std::vector &can_list, std::string &out, bool sendcan, bool valid) { MessageBuilder msg; auto event = msg.initEvent(valid); diff --git a/selfdrive/pandad/pandad_api_impl.pyx b/selfdrive/pandad/pandad_api_impl.pyx index 787968f53e..e571c4aa58 100644 --- a/selfdrive/pandad/pandad_api_impl.pyx +++ b/selfdrive/pandad/pandad_api_impl.pyx @@ -6,12 +6,6 @@ from libcpp.string cimport string from libcpp cimport bool from libc.stdint cimport uint8_t, uint32_t, uint64_t -cdef extern from "panda.h": - cdef struct can_frame: - long address - string dat - long src - cdef extern from "opendbc/can/common.h": cdef struct CanFrame: long src @@ -23,12 +17,12 @@ cdef extern from "opendbc/can/common.h": vector[CanFrame] frames cdef extern from "can_list_to_can_capnp.cc": - void can_list_to_can_capnp_cpp(const vector[can_frame] &can_list, string &out, bool sendcan, bool valid) + void can_list_to_can_capnp_cpp(const vector[CanFrame] &can_list, string &out, bool sendcan, bool valid) void can_capnp_to_can_list_cpp(const vector[string] &strings, vector[CanData] &can_data, bool sendcan) def can_list_to_can_capnp(can_msgs, msgtype='can', valid=True): - cdef can_frame *f - cdef vector[can_frame] can_list + cdef CanFrame *f + cdef vector[CanFrame] can_list can_list.reserve(len(can_msgs)) for can_msg in can_msgs: