diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/diagnostic/diagnostic-message.cpp | 2 | ||||
-rw-r--r-- | src/diagnostic/diagnostic-message.hpp | 3 | ||||
-rw-r--r-- | src/utils/signals.hpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/diagnostic/diagnostic-message.cpp b/src/diagnostic/diagnostic-message.cpp index c358aae4..0b1a9339 100644 --- a/src/diagnostic/diagnostic-message.cpp +++ b/src/diagnostic/diagnostic-message.cpp @@ -95,7 +95,7 @@ void obd2_signals_t::find_obd2_signals(const openxc_DynamicField &key, std::vect DEBUG(binder_interface, "Found %d signal(s)", (int)found_signals.size()); } -uint32_t get_signal_id(const Obd2Pid& sig) +uint32_t get_signal_id(const obd2_signals_t& sig) { return (uint32_t)sig.pid; } diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp index 5a19393b..062f7b5e 100644 --- a/src/diagnostic/diagnostic-message.hpp +++ b/src/diagnostic/diagnostic-message.hpp @@ -81,10 +81,8 @@ class obd2_signals_t { void add_request(int pid); - uint32_t get_signal_id(const Obd2Pid& sig); void find_obd2_signals(const openxc_DynamicField &key, std::vector<obd2_signals_t*>& found_signals); - bool is_obd2_response(can_message_t can_message); bool is_obd2_request(DiagnosticRequest *request); bool is_obd2_signal(const char *name); @@ -92,4 +90,5 @@ class obd2_signals_t { float decode_obd2_response(const DiagnosticResponse* response, float parsedPayload); }; +uint32_t get_signal_id(const obd2_signals_t& sig); std::vector<obd2_signals_t>& get_obd2_signals();
\ No newline at end of file diff --git a/src/utils/signals.hpp b/src/utils/signals.hpp index bc421e96..8e15bd21 100644 --- a/src/utils/signals.hpp +++ b/src/utils/signals.hpp @@ -60,7 +60,7 @@ void lookup_signals_by_id(const double key, std::vector<T>& signals, std::vector template <typename T> void lookup_signals_by_id(const double key, std::vector<T>& signals, std::vector<std::string>& found_signals_name) { - for(T& s : signals) + for(const T& s : signals) { if(get_signal_id(s) == key) { |