X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=low-can-binding%2Fcan%2Fcan-decoder.cpp;h=a69a70b6ce35ffb67e632d8edda003ff9f5f6cda;hb=00fc4d94ba9585b6262218136d76b913e162876b;hp=f64a843d69950143fc5f62dbf2ceee043b4e1c5a;hpb=65ec074edcda5403164b36073a57454958353fc1;p=apps%2Fagl-service-can-low-level.git diff --git a/low-can-binding/can/can-decoder.cpp b/low-can-binding/can/can-decoder.cpp index f64a843d..a69a70b6 100644 --- 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 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.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.