diff --git a/libs/indibase/indiinputinterface.cpp b/libs/indibase/indiinputinterface.cpp index e6c537be59..b75ee63e1e 100644 --- a/libs/indibase/indiinputinterface.cpp +++ b/libs/indibase/indiinputinterface.cpp @@ -45,8 +45,8 @@ InputInterface::~InputInterface() void InputInterface::initProperties(const char *groupName, uint8_t digital, uint8_t analog, const std::string &digitalPrefix, const std::string &analogPrefix) { - m_DigitalLabelConfig = false; - m_AnalogLabelConfig = false; + m_DigitalInputLabelsConfig = false; + m_AnalogInputLabelsConfig = false; DigitalInputLabelsTP.resize(0); // Digital labels for (size_t i = 0; i < digital; i++) @@ -64,7 +64,7 @@ void InputInterface::initProperties(const char *groupName, uint8_t digital, uint DigitalInputLabelsTP.fill(m_defaultDevice->getDeviceName(), "DIGITAL_INPUT_LABELS", "Digital Labels", groupName, IP_RW, 60, IPS_IDLE); DigitalInputLabelsTP.shrink_to_fit(); - m_DigitalLabelConfig = DigitalInputLabelsTP.load(); + m_DigitalInputLabelsConfig = DigitalInputLabelsTP.load(); } // Analog labels @@ -84,7 +84,7 @@ void InputInterface::initProperties(const char *groupName, uint8_t digital, uint AnalogInputLabelsTP.fill(m_defaultDevice->getDeviceName(), "ANALOG_INPUT_LABELS", "Analog Labels", groupName, IP_RW, 60, IPS_IDLE); AnalogInputLabelsTP.shrink_to_fit(); - m_AnalogLabelConfig = AnalogInputLabelsTP.load(); + m_AnalogInputLabelsConfig = AnalogInputLabelsTP.load(); } // Analog inputs diff --git a/libs/indibase/indiinputinterface.h b/libs/indibase/indiinputinterface.h index 1bf9783532..04d7ea51b3 100644 --- a/libs/indibase/indiinputinterface.h +++ b/libs/indibase/indiinputinterface.h @@ -112,7 +112,7 @@ class InputInterface // Indicates whether we loaded the labels from configuration file successfully. // If loaded from config file, then we do not need to overwrite. - bool m_DigitalLabelConfig {false}, m_AnalogLabelConfig {false}; + bool m_DigitalInputLabelsConfig {false}, m_AnalogInputLabelsConfig {false}; DefaultDevice *m_defaultDevice { nullptr }; }; diff --git a/libs/indibase/indioutputinterface.cpp b/libs/indibase/indioutputinterface.cpp index 1e08f44854..7231510e60 100644 --- a/libs/indibase/indioutputinterface.cpp +++ b/libs/indibase/indioutputinterface.cpp @@ -44,6 +44,7 @@ OutputInterface::~OutputInterface() ///////////////////////////////////////////////////////////////////////////////////////////// void OutputInterface::initProperties(const char *groupName, uint8_t Outputs, const std::string &prefix) { + m_DigitalOutputLabelsConfig = false; DigitalOutputLabelsTP.resize(0); // Initialize labels @@ -61,7 +62,7 @@ void OutputInterface::initProperties(const char *groupName, uint8_t Outputs, con IPS_IDLE); DigitalOutputLabelsTP.shrink_to_fit(); if (Outputs > 0) - DigitalOutputLabelsTP.load(); + m_DigitalOutputLabelsConfig = DigitalOutputLabelsTP.load(); DigitalOutputsSP.reserve(Outputs); // Initialize switches, use labels if loaded. diff --git a/libs/indibase/indioutputinterface.h b/libs/indibase/indioutputinterface.h index 3e974555e9..23bd82dd9e 100644 --- a/libs/indibase/indioutputinterface.h +++ b/libs/indibase/indioutputinterface.h @@ -109,6 +109,10 @@ class OutputInterface // Output Labels INDI::PropertyText DigitalOutputLabelsTP {0}; + // Indicates whether we loaded the labels from configuration file successfully. + // If loaded from config file, then we do not need to overwrite. + bool m_DigitalOutputLabelsConfig {false}; + DefaultDevice *m_defaultDevice { nullptr }; }; }