Fix compilation warning complaining about unset boolean value.
[apps/low-level-can-service.git] / CAN-binder / low-can-binding / can / can-decoder.cpp
index 8843059..902484e 100644 (file)
@@ -20,6 +20,8 @@
 #include "canutil/read.h"
 #include "../utils/openxc-utils.hpp"
 
+#include "../low-can-binding.hpp"
+
 /// @brief Parse the signal's bitfield from the given data and return the raw
 /// value.
 ///
@@ -130,7 +132,7 @@ openxc_DynamicField decoder_t::stateDecoder(can_signal_t& signal,
        if(signal_state.size() <= 0)
        {
                *send = false;
-               ERROR(binder_interface, "stateDecoder: No state found with index: %d", (int)value);
+               ERROR(binder_interface, "%s: No state found with index: %d", __FUNCTION__, (int)value);
        }
        return decoded_value;
 }
@@ -153,7 +155,7 @@ openxc_DynamicField decoder_t::translateSignal(can_signal_t& signal, can_message
        const std::vector<can_signal_t>& signals)
 {
        float value = decoder_t::parseSignalBitfield(signal, message);
-       DEBUG(binder_interface, "translateSignal: Decoded message from parseSignalBitfield: %f", value);
+       DEBUG(binder_interface, "%s: Decoded message from parseSignalBitfield: %f", __FUNCTION__, value);
 
        bool send = true;
        // Must call the decoders every time, regardless of if we are going to