Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix bit_position swapping
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
can
/
can-decoder.cpp
diff --git
a/low-can-binding/can/can-decoder.cpp
b/low-can-binding/can/can-decoder.cpp
index
f64a843
..
a69a70b
100644
(file)
--- a/
low-can-binding/can/can-decoder.cpp
+++ b/
low-can-binding/can/can-decoder.cpp
@@
-357,9
+357,10
@@
openxc_DynamicField decoder_t::decode_state(signal_t& signal, std::shared_ptr<me
///
openxc_DynamicField decoder_t::translate_signal(signal_t& signal, std::shared_ptr<message_t> message, bool* send)
{
///
openxc_DynamicField decoder_t::translate_signal(signal_t& signal, std::shared_ptr<message_t> message, bool* send)
{
- if(!signal.get_message()->frame_layout_is_little())
+ if(!signal.get_message()->frame_layout_is_little()
&& !signal.bit_position_is_swapped()
)
{
signal.set_bit_position(converter_t::bit_position_swap(signal.get_bit_position(),signal.get_bit_size()));
{
signal.set_bit_position(converter_t::bit_position_swap(signal.get_bit_position(),signal.get_bit_size()));
+ signal.bit_position_is_swapped_reverse();
}
// Must call the decoders every time, regardless of if we are going to
// decide to send the signal or not.
}
// Must call the decoders every time, regardless of if we are going to
// decide to send the signal or not.