Skip to content

Commit 2e82c45

Browse files
committed
Use more consistent naming scheme
1 parent dcc3eb5 commit 2e82c45

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

libs/indibase/indipowerinterface.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ PowerInterface::PowerInterface(DefaultDevice *defaultDevice) : m_defaultDevice(d
4040
OverVoltageProtectionNP[0].fill("OVERVOLTAGE", "Max Voltage", "%.1f", 0, 999, 0, 13.8);
4141

4242
// Initialize Power Off on Disconnect
43-
PowerOffOnDisconnectSP[0].fill("ENABLED", "Enabled", ISS_OFF);
44-
PowerOffOnDisconnectSP[1].fill("DISABLED", "Disabled", ISS_ON);
43+
PowerOffOnDisconnectSP[0].fill("INDI_ENABLED", "Enabled", ISS_OFF);
44+
PowerOffOnDisconnectSP[1].fill("INDI_DISABLED", "Disabled", ISS_ON);
4545

4646
// Initialize LED Control
47-
LEDControlSP[0].fill("ENABLED", "On", ISS_ON);
48-
LEDControlSP[1].fill("DISABLED", "Off", ISS_OFF);
47+
LEDControlSP[0].fill("INDI_ENABLED", "On", ISS_ON);
48+
LEDControlSP[1].fill("INDI_DISABLED", "Off", ISS_OFF);
4949

5050

5151
// Initialize Power Cycle All
@@ -59,7 +59,7 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
5959
PowerSensorsNP.fill(m_defaultDevice->getDeviceName(), "POWER_SENSORS", "Sensors", groupName, IP_RO, 60, IPS_IDLE);
6060

6161
// Over Voltage Protection
62-
OverVoltageProtectionNP.fill(m_defaultDevice->getDeviceName(), "OVERVOLTAGE_PROTECTION", "Over Voltage", groupName,
62+
OverVoltageProtectionNP.fill(m_defaultDevice->getDeviceName(), "OVER_VOLTAGE_PROTECTION", "Over Voltage", groupName,
6363
IP_RW, 60, IPS_IDLE);
6464

6565
// Power Off on Disconnect
@@ -85,11 +85,11 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
8585

8686
char propName[MAXINDINAME];
8787
char propLabel[MAXINDILABEL];
88-
snprintf(propName, MAXINDINAME, "POWER_CHANNEL_LABEL_%d", static_cast<int>(i + 1));
88+
snprintf(propName, MAXINDINAME, "POWER_CHANNEL_%d", static_cast<int>(i + 1));
8989
snprintf(propLabel, MAXINDILABEL, "Channel %d", static_cast<int>(i + 1));
9090
PowerChannelLabelsTP[i].fill(propName, propLabel, propLabel);
9191
}
92-
PowerChannelLabelsTP.fill(m_defaultDevice->getDeviceName(), "POWER_CHANNEL_LABELS", "Labels", POWER_TAB,
92+
PowerChannelLabelsTP.fill(m_defaultDevice->getDeviceName(), "POWER_LABELS", "Labels", POWER_TAB,
9393
IP_RW, 60, IPS_IDLE);
9494
PowerChannelLabelsTP.load();
9595

@@ -120,11 +120,11 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
120120

121121
char propName[MAXINDINAME];
122122
char propLabel[MAXINDILABEL];
123-
snprintf(propName, MAXINDINAME, "POWER_CHANNEL_CURRENT_%d", static_cast<int>(i + 1));
123+
snprintf(propName, MAXINDINAME, "POWER_CHANNEL_%d", static_cast<int>(i + 1));
124124
snprintf(propLabel, MAXINDILABEL, "%s", PowerChannelLabelsTP[i].getText());
125125
PowerChannelCurrentNP[i].fill(propName, propLabel, "%.2f", 0, 999, 0, 0);
126126
}
127-
PowerChannelCurrentNP.fill(m_defaultDevice->getDeviceName(), "POWER_CHANNEL_CURRENTS", "Currents", POWER_TAB, IP_RO, 60,
127+
PowerChannelCurrentNP.fill(m_defaultDevice->getDeviceName(), "POWER_CURRENTS", "Currents", POWER_TAB, IP_RO, 60,
128128
IPS_IDLE);
129129
}
130130

@@ -137,11 +137,11 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
137137

138138
char propName[MAXINDINAME];
139139
char propLabel[MAXINDILABEL];
140-
snprintf(propName, MAXINDINAME, "DEW_LABEL_CHANNEL_%d", static_cast<int>(i + 1));
140+
snprintf(propName, MAXINDINAME, "DEW_CHANNEL_%d", static_cast<int>(i + 1));
141141
snprintf(propLabel, MAXINDILABEL, "Channel %d", static_cast<int>(i + 1));
142142
DewChannelLabelsTP[i].fill(propName, propLabel, propLabel);
143143
}
144-
DewChannelLabelsTP.fill(m_defaultDevice->getDeviceName(), "DEW_CHANNEL_LABELS", "Labels", DEW_TAB, IP_RW, 60,
144+
DewChannelLabelsTP.fill(m_defaultDevice->getDeviceName(), "DEW_LABELS", "Labels", DEW_TAB, IP_RW, 60,
145145
IPS_IDLE);
146146
DewChannelLabelsTP.load();
147147

@@ -170,7 +170,7 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
170170

171171
char propName[MAXINDINAME];
172172
char propLabel[MAXINDILABEL];
173-
snprintf(propName, MAXINDINAME, "DEW_DUTY_CHANNEL_%d", static_cast<int>(i + 1));
173+
snprintf(propName, MAXINDINAME, "DEW_CHANNEL_%d", static_cast<int>(i + 1));
174174
snprintf(propLabel, MAXINDILABEL, "%s (%%)", DewChannelLabelsTP[i].getText());
175175
DewChannelDutyCycleNP[i].fill(propName, propLabel, "%.0f", 0, 100, 10, 0);
176176
}
@@ -188,11 +188,11 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
188188

189189
char propName[MAXINDINAME];
190190
char propLabel[MAXINDILABEL];
191-
snprintf(propName, MAXINDINAME, "DEW_CURRENT_CHANNEL_%d", static_cast<int>(i + 1));
191+
snprintf(propName, MAXINDINAME, "DEW_CHANNEL_%d", static_cast<int>(i + 1));
192192
snprintf(propLabel, MAXINDILABEL, "%s (A)", DewChannelLabelsTP[i].getText());
193193
DewChannelCurrentNP[i].fill(propName, propLabel, "%.2f", 0, 999, 0, 0);
194194
}
195-
DewChannelCurrentNP.fill(m_defaultDevice->getDeviceName(), "DEW_CHANNEL_CURRENTS", "Currents", DEW_TAB, IP_RO,
195+
DewChannelCurrentNP.fill(m_defaultDevice->getDeviceName(), "DEW_CURRENTS", "Currents", DEW_TAB, IP_RO,
196196
60, IPS_IDLE);
197197
}
198198

@@ -230,13 +230,13 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
230230

231231
char propName[MAXINDINAME];
232232
char propLabel[MAXINDILABEL];
233-
snprintf(propName, MAXINDINAME, "USB_PORT_LABEL_%d", static_cast<int>(i + 1));
233+
snprintf(propName, MAXINDINAME, "USB_PORT_%d", static_cast<int>(i + 1));
234234
snprintf(propLabel, MAXINDILABEL, "Port %d", static_cast<int>(i + 1));
235235
USBPortLabelsTP[i].fill(propName, propLabel, propLabel);
236236
}
237237
if (nUSBPorts > 0)
238238
{
239-
USBPortLabelsTP.fill(m_defaultDevice->getDeviceName(), "USB_PORT_LABELS", "Labels", USB_TAB, IP_RW, 60,
239+
USBPortLabelsTP.fill(m_defaultDevice->getDeviceName(), "USB_LABELS", "Labels", USB_TAB, IP_RW, 60,
240240
IPS_IDLE);
241241
USBPortLabelsTP.load();
242242
}
@@ -269,7 +269,7 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
269269

270270
char propName[MAXINDINAME];
271271
char propLabel[MAXINDILABEL];
272-
snprintf(propName, MAXINDINAME, "VAR_LABEL_CHANNEL_%d", static_cast<int>(i + 1));
272+
snprintf(propName, MAXINDINAME, "VAR_CHANNEL_%d", static_cast<int>(i + 1));
273273
snprintf(propLabel, MAXINDILABEL, "Channel %d", static_cast<int>(i + 1));
274274
VariableChannelLabelsTP[i].fill(propName, propLabel, propLabel);
275275
}
@@ -304,7 +304,7 @@ void PowerInterface::initProperties(const char *groupName, size_t nPowerPorts, s
304304

305305
char propName[MAXINDINAME];
306306
char propLabel[MAXINDILABEL];
307-
snprintf(propName, MAXINDINAME, "VAR_VOLTS_CHANNEL_%d", static_cast<int>(i + 1));
307+
snprintf(propName, MAXINDINAME, "VAR_CHANNEL_%d", static_cast<int>(i + 1));
308308
snprintf(propLabel, MAXINDILABEL, "%s (V)", VariableChannelLabelsTP[i].getText());
309309
VariableChannelVoltsNP[i].fill(propName, propLabel, "%.1f", 3, 12, 0.1, 5);
310310
}

0 commit comments

Comments
 (0)