Skip to content

Commit ca27e06

Browse files
committed
docs/nut-names.txt, drivers/mge-hid.c, data/cmdvartab: revert "experimental.ecomode.start.auto" [#2708, #2850]
Signed-off-by: Jim Klimov <[email protected]>
1 parent 7206458 commit ca27e06

File tree

3 files changed

+0
-50
lines changed

3 files changed

+0
-50
lines changed

data/cmdvartab

-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ CMDDESC bypass.start "Put the UPS in Bypass mode"
260260
CMDDESC bypass.stop "Take the UPS out of Bypass mode"
261261
CMDDESC experimental.ecomode.enable "Put UPS in High Efficiency (aka ECO) mode"
262262
CMDDESC experimental.ecomode.disable "Take the UPS out of High Efficiency (aka ECO) mode"
263-
CMDDESC experimental.ecomode.start.auto "Put UPS in Bypass mode then High Efficiency (aka ECO) mode"
264263
CMDDESC experimental.essmode.enable "Put UPS in Energy Saver System (aka ESS) mode"
265264
CMDDESC experimental.essmode.disable "Take the UPS out of Energy Saver System (aka ESS) mode"
266265
CMDDESC reset.input.minmax "Reset minimum and maximum input voltage status"

docs/nut-names.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1048,8 +1048,6 @@ to last as part of NUT standard protocol in the long run.
10481048
| Put UPS in High Efficiency (aka ECO) mode
10491049
| experimental.ecomode.disable | usbhid-ups => mge-hid (Eaton/MGE)
10501050
| Take the UPS out of High Efficiency (aka ECO) mode
1051-
| experimental.ecomode.start.auto | usbhid-ups => mge-hid (Eaton/MGE)
1052-
| Put UPS in Bypass mode then High Efficiency (aka ECO) mode
10531051
| experimental.essmode.enable | usbhid-ups => mge-hid (Eaton/MGE)
10541052
| Put UPS in Energy Saver System (aka ESS) mode
10551053
| experimental.essmode.disable | usbhid-ups => mge-hid (Eaton/MGE)

drivers/mge-hid.c

-47
Original file line numberDiff line numberDiff line change
@@ -1151,51 +1151,6 @@ static info_lkp_t eaton_input_bypass_mode_off_info[] = {
11511151
{ 0, NULL, NULL, NULL }
11521152
};
11531153

1154-
/* Function to start ECO(HE) Mode automatically instead of manually starting Bypass and then ECO(HE) Mode */
1155-
static const char *eaton_input_eco_mode_auto_on_fun(double value)
1156-
{
1157-
const char *bypass_switch_off_str = NULL;
1158-
const char *bypass_switch_on_str = NULL;
1159-
const char *eco_switchable_str = NULL;
1160-
1161-
NUT_UNUSED_VARIABLE(value);
1162-
1163-
/* Check if input.bypass.switch.on is disabled and set it to 'on' */
1164-
bypass_switch_on_str = dstate_getinfo("input.bypass.switch.on");
1165-
if (!strcmp(bypass_switch_on_str, "disabled")) {
1166-
setvar("input.bypass.switch.on", "on");
1167-
} else {
1168-
upsdebugx(1, "Bypass switch on state is: %s , must be disabled before switching on", bypass_switch_on_str);
1169-
return NULL;
1170-
}
1171-
1172-
/* Check if input.eco.switchable is normal and set it to 'ECO' */
1173-
eco_switchable_str = dstate_getinfo("input.eco.switchable");
1174-
if (!strcmp(eco_switchable_str, "normal")) {
1175-
setvar("input.eco.switchable", "ECO");
1176-
} else {
1177-
upsdebugx(1, "ECO switch state is: %s , must be normal before switching to ECO", eco_switchable_str);
1178-
return NULL;
1179-
}
1180-
1181-
/* Check if input.bypass.switch.off is disabled and set it to 'off' */
1182-
bypass_switch_off_str = dstate_getinfo("input.bypass.switch.off");
1183-
if (!strcmp(bypass_switch_off_str, "disabled")) {
1184-
setvar("input.bypass.switch.off", "off");
1185-
} else {
1186-
upsdebugx(1, "Bypass switch off state is: %s , must be disabled before switching off", bypass_switch_off_str);
1187-
return NULL;
1188-
}
1189-
upsdebugx(1, "%s: ECO Mode was enabled after switching to Bypass Mode", __func__);
1190-
return NULL;
1191-
}
1192-
1193-
/* High Efficiency (aka ECO) mode for auto start command */
1194-
static info_lkp_t eaton_input_eco_mode_auto_on_info[] = {
1195-
{ 1, "dummy", eaton_input_eco_mode_auto_on_fun, NULL },
1196-
{ 0, NULL, NULL, NULL }
1197-
};
1198-
11991154
/* Determine country using UPS.PowerSummary.Country.
12001155
* If not present:
12011156
* if PowerConverter.Output.Voltage >= 200 => "Europe"
@@ -2137,8 +2092,6 @@ static hid_info_t mge_hid2nut[] =
21372092
{ "experimental.ecomode.enable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "1", HU_TYPE_CMD, eaton_input_eco_mode_on_off_info },
21382093
{ "experimental.essmode.enable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "2", HU_TYPE_CMD, NULL },
21392094
{ "experimental.essmode.disable", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "0", HU_TYPE_CMD, NULL },
2140-
/* Command to switch ECO(HE) Mode with switch to Automatic Bypass Mode on before */
2141-
{ "experimental.ecomode.start.auto", 0, 0, "UPS.PowerConverter.Input.[5].Switchable", NULL, "1", HU_TYPE_CMD, eaton_input_eco_mode_auto_on_info },
21422095

21432096
/* Command to switch Automatic Bypass Mode on/off */
21442097
{ "bypass.start", 0, 0, "UPS.PowerConverter.Input.[2].SwitchOnControl", NULL, "1", HU_TYPE_CMD, eaton_input_bypass_mode_on_info },

0 commit comments

Comments
 (0)