CAN FD transmission on non CAN FD hardware now fails as would be expected

This commit is contained in:
Paul Hollinsky
2018-10-19 17:00:40 -04:00
parent 80bccb59a5
commit 0f703f494f
7 changed files with 18 additions and 11 deletions
+3
View File
@@ -15,6 +15,9 @@ bool Encoder::encode(std::vector<uint8_t>& result, const std::shared_ptr<Message
if(!canmsg)
return false; // The message was not a properly formed CANMessage
if(!supportCANFD && canmsg->isCANFD)
return false; // This device does not support CAN FD
if(canmsg->isCANFD && canmsg->isRemote)
return false; // RTR frames can not be used with CAN FD