aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/can
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-05 10:14:35 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-05 10:14:35 +0100
commit0759ebe6f4e6a07d560fff1d03935409fb079458 (patch)
treed6ae569a8e02dc1dc9bac5eef236ad46317320a1 /low-can-binding/can
parent76f91113bacc2b27dc2c3b94039f00f10c253722 (diff)
can: Fix receiving and sending extended CAN frames
Change-Id: I672450b51b46082b6a913bef2d6e27d64c49e6fc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can')
-rw-r--r--low-can-binding/can/message-definition.cpp6
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
+}