diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-21 17:59:07 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2020-01-09 15:55:03 +0100 |
commit | 31996413bb7a4cddc94067568117b7ff23ee60ff (patch) | |
tree | e3de944e341f9e735f7b78177061a7c14a9fd379 /low-can-binding/can/message-definition.cpp | |
parent | a4b14ff6fbd637f709eb874ee856974a5d764d63 (diff) |
message: Correctly detect extended CAN id.
Previous test was always true. This fix the wrong test and then
add the EFF flag correctly on messages using extended
CAN id.
Bug-AGL: SPEC-2988
Change-Id: I69686fd3d5a39ea3a0d1980b4bfa88fe36fb7fe5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/message-definition.cpp')
-rw-r--r-- | low-can-binding/can/message-definition.cpp | 4 |
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 |