astuff / pacmod3

PACMod Board Rev 3 Driver
MIT License
25 stars 14 forks source link

Incorrect CmdMsg::DATA_LENGTH used for HornCmdMsg when it is pushed into rx_list #67

Closed jilinzhouas closed 4 years ago

jilinzhouas commented 4 years ago

The issue is self-explained in the code (in pacmod3_node.cpp):

    rx_list.emplace(
      HornCmdMsg::CAN_ID,
      std::shared_ptr<LockedData>(new LockedData(HeadlightCmdMsg::DATA_LENGTH)));

Although HeadlightCmdMsg::DATA_LENGTH is equal to HornCmdMsg::DATA_LENGTH, it should be changed.