Skip to content

Commit

Permalink
added info_lkp_t eaton_input_mode_info[] for input.eco.switchable
Browse files Browse the repository at this point in the history
Signed-off-by: DaRK AnGeL <[email protected]>
  • Loading branch information
masterwishx committed Sep 25, 2024
1 parent 0159aa3 commit ef37e06
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/mge-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,14 @@ static info_lkp_t outlet_eco_yes_no_info[] = {
{ 0, NULL, NULL, NULL }
};

/* High Efficiency (aka ECO) mode */
static info_lkp_t eaton_input_mode_info[] = {
{ 0, "normal", NULL, NULL },
{ 1, "high-efficiency", NULL, NULL },
{ 2, "ESS", NULL, NULL }, /* makes sense for UPS that implements this mode */
{ 0, NULL, NULL, NULL }
};

/* Determine country using UPS.PowerSummary.Country.
* If not present:
* if PowerConverter.Output.Voltage >= 200 => "Europe"
Expand Down Expand Up @@ -1462,8 +1470,8 @@ static hid_info_t mge_hid2nut[] =
{ "input.bypass.frequency", 0, 0, "UPS.PowerConverter.Input.[2].Frequency", NULL, "%.1f", 0, NULL },
{ "input.bypass.frequency.nominal", 0, 0, "UPS.Flow.[2].ConfigFrequency", NULL, "%.0f", HU_FLAG_STATIC, NULL },

/* ECO(HE) Mode switch , maybe better = outlet.5.switchable ? */
{ "input.eco.switchable", ST_FLAG_RW | ST_FLAG_STRING, 8, "UPS.PowerConverter.Input.[5].Switchable", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL },
/* ECO(HE) Mode switch */
{ "input.eco.switchable", ST_FLAG_RW | ST_FLAG_STRING, 8, "UPS.PowerConverter.Input.[5].Switchable", NULL, "%.0f", HU_FLAG_SEMI_STATIC, eaton_input_mode_info },

/* Output page */
{ "output.voltage", 0, 0, "UPS.PowerConverter.Output.Voltage", NULL, "%.1f", 0, NULL },
Expand Down

0 comments on commit ef37e06

Please sign in to comment.