mirror of https://github.com/commaai/openpilot.git
Update pandad.cc
This commit is contained in:
parent
bc7173460f
commit
aa4db46618
|
@ -123,9 +123,13 @@ void can_recv(std::vector<Panda *> &pandas, PubMaster *pm) {
|
|||
evt.setValid(comms_healthy);
|
||||
auto canData = evt.initCan(raw_can_data.size());
|
||||
for (size_t i = 0; i < raw_can_data.size(); ++i) {
|
||||
int src = raw_can_data[i].src;
|
||||
if (src >= 4 ) {
|
||||
src -= 4;
|
||||
}
|
||||
canData[i].setAddress(raw_can_data[i].address);
|
||||
canData[i].setDat(kj::arrayPtr((uint8_t*)raw_can_data[i].dat.data(), raw_can_data[i].dat.size()));
|
||||
canData[i].setSrc(raw_can_data[i].src);
|
||||
canData[i].setSrc(src);
|
||||
}
|
||||
pm->send("can", msg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue