diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-05 10:14:35 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2020-01-08 00:17:29 +0100 |
commit | 7273de90fadc82f9a63336b0449e995bf32f76ed (patch) | |
tree | 5a9c18ba233a1abcbe123ec8531f9da599b531eb | |
parent | 368c69724971ec73ac47bd1072204cddcc888355 (diff) |
can: Fix receiving and sending extended CAN frames
Bug-AGL: SPEC-2779
Change-Id: I672450b51b46082b6a913bef2d6e27d64c49e6fc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | low-can-binding/can/message-definition.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/low-can-binding/can/message-definition.cpp b/low-can-binding/can/message-definition.cpp index ab7a884b..b761ad68 100644 --- a/low-can-binding/can/message-definition.cpp +++ b/low-can-binding/can/message-definition.cpp @@ -64,7 +64,9 @@ const std::string message_definition_t::get_bus_device_name() const uint32_t message_definition_t::get_id() const { - return id_; + return id_ & CAN_EFF_MASK ? + id_ | CAN_EFF_FLAG : + id_; } bool message_definition_t::is_fd() const @@ -105,4 +107,4 @@ uint32_t message_definition_t::get_length() const uint32_t message_definition_t::get_flags() const { return flags_; -}
\ No newline at end of file +} |