summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can
diff options
context:
space:
mode:
Diffstat (limited to 'low-can-binding/can')
-rw-r--r--low-can-binding/can/message-definition.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/low-can-binding/can/message-definition.cpp b/low-can-binding/can/message-definition.cpp
index 63541277..e6fd862f 100644
--- a/low-can-binding/can/message-definition.cpp
+++ b/low-can-binding/can/message-definition.cpp
@@ -72,9 +72,7 @@ const std::string message_definition_t::get_name() const{
uint32_t message_definition_t::get_id() const
{
- return id_ & CAN_EFF_MASK ?
- id_ | CAN_EFF_FLAG :
- id_;
+ return ((id_ & CAN_SFF_MASK) != id_) ? id_ | CAN_EFF_FLAG : id_;
}
bool message_definition_t::is_fd() const