fixed flow control message padding

This commit is contained in:
gregjhogan 2018-02-20 21:34:06 -06:00
parent bbd04d1237
commit 95ab1aeffa
1 changed files with 3 additions and 0 deletions

View File

@ -136,6 +136,9 @@ void J2534Connection_ISO15765::processMessage(const J2534Frame& msg) {
if (flowfilter.size() > 4)
flowstrlresp += flowfilter[4];
flowstrlresp += std::string("\x30\x00\x00", 3);
if (check_bmask(filter->flags, ISO15765_FRAME_PAD)) {
flowstrlresp += std::string(8 - flowstrlresp.size(), '\x00');
}
if (auto panda_dev_sp = this->panda_dev.lock()) {
panda_dev_sp->panda->can_send(flow_addr, val_is_29bit(msg.RxStatus), (const uint8_t *)flowstrlresp.c_str(), (uint8_t)flowstrlresp.size(), panda::PANDA_CAN1);