diff options
Diffstat (limited to 'low-can-binding/can/message-definition.cpp')
-rw-r--r-- | low-can-binding/can/message-definition.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/low-can-binding/can/message-definition.cpp b/low-can-binding/can/message-definition.cpp index 6989a909..8184e983 100644 --- a/low-can-binding/can/message-definition.cpp +++ b/low-can-binding/can/message-definition.cpp @@ -68,7 +68,8 @@ const std::string message_definition_t::get_name() const{ uint32_t message_definition_t::get_id() const { - return ((id_ & CAN_SFF_MASK) != id_) ? id_ | CAN_EFF_FLAG : id_; + return is_j1939() || ((id_ & CAN_SFF_MASK) == id_) ? + id_ : id_ | CAN_EFF_FLAG ; } bool message_definition_t::is_fd() const |