From 7273de90fadc82f9a63336b0449e995bf32f76ed Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 5 Nov 2019 10:14:35 +0100 Subject: can: Fix receiving and sending extended CAN frames Bug-AGL: SPEC-2779 Change-Id: I672450b51b46082b6a913bef2d6e27d64c49e6fc Signed-off-by: Romain Forlot --- low-can-binding/can/message-definition.cpp | 6 ++++-- 1 file 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 +} -- cgit 1.2.3-korg