summaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding
diff options
context:
space:
mode:
Diffstat (limited to 'low-can-binding/binding')
-rw-r--r--low-can-binding/binding/low-can-hat.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/low-can-binding/binding/low-can-hat.cpp b/low-can-binding/binding/low-can-hat.cpp
index 7e0d94a4..72580744 100644
--- a/low-can-binding/binding/low-can-hat.cpp
+++ b/low-can-binding/binding/low-can-hat.cpp
@@ -74,7 +74,11 @@ int read_message(sd_event_source *event_source, int fd, uint32_t revents, void *
if (message->get_id() &&
message->get_length() &&
! (message->get_flags() & INVALID_FLAG) )
+ {
+ if(can_subscription->get_signal() != nullptr && can_subscription->get_signal()->get_message()->get_flags() & BYTE_FRAME_IS_BIG_ENDIAN)
+ message->frame_swap();
push_n_notify(message);
+ }
}
}
}