diff options
Diffstat (limited to 'src/diagnostic/diagnostic-message.hpp')
-rw-r--r-- | src/diagnostic/diagnostic-message.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp index 5adbde5..ac6ca18 100644 --- a/src/diagnostic/diagnostic-message.hpp +++ b/src/diagnostic/diagnostic-message.hpp @@ -68,7 +68,7 @@ typedef struct _Obd2Pid { class obd2_signals_t { private: uint8_t pid_; /*!< pid - The 1 byte PID.*/ - const char* generic_name_; /*!< generic_name_ - A human readable name to use for this PID when published.*/ + const std::string generic_name_; /*!< generic_name_ - A human readable name to use for this PID when published.*/ const int min_; /*!< min_ - Minimum value that can take this pid */ const int max_; /*!< max_ - Maximum value that can take this pid */ enum UNIT unit_; /*!< unit_ : Which unit system is used by that pid. See enum UNIT above.*/ @@ -76,7 +76,7 @@ class obd2_signals_t { bool supported_; /*!< supported_ - boolean indicating whether this pid is supported by the vehicle or not.*/ public: - const char* generic_name = generic_name_; + const char* generic_name = generic_name_.c_str(); obd2_signals_t(uint8_t pid, const char* generic_name, const int min_, const int max_, enum UNIT unit, int frequency, bool supported); uint32_t get_pid(); |