diff options
Diffstat (limited to 'low-can-binding/can/can-decoder.cpp')
-rw-r--r-- | low-can-binding/can/can-decoder.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/low-can-binding/can/can-decoder.cpp b/low-can-binding/can/can-decoder.cpp index e901240b..a6b6c14d 100644 --- a/low-can-binding/can/can-decoder.cpp +++ b/low-can-binding/can/can-decoder.cpp @@ -294,7 +294,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) { - + if(!signal.get_message()->frame_layout_is_little()) + { + signal.set_bit_position(converter_t::bit_position_swap(signal.get_bit_position(),signal.get_bit_size())); + } // Must call the decoders every time, regardless of if we are going to // decide to send the signal or not. openxc_DynamicField decoded_value = decoder_t::decode_signal(signal, |