Skip to content

Commit

Permalink
fix declaration
Browse files Browse the repository at this point in the history
Signed-off-by: DaRK AnGeL <[email protected]>
  • Loading branch information
masterwishx committed Oct 16, 2024
1 parent e435f4d commit a41b41f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/mge-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ static long round (LDOUBLE value)
static const char *eaton_abm_enabled_fun(double value)
{
int advanced_battery_monitoring_val;
advanced_battery_monitoring = value;
const char *advanced_battery_monitoring_str = dstate_getinfo("battery.charger.type");

advanced_battery_monitoring = value;
str_to_int(advanced_battery_monitoring_str, &advanced_battery_monitoring_val, 10);

if (advanced_battery_monitoring_str)
{
advanced_battery_monitoring = advanced_battery_monitoring_val;
upsdebugx(2, "ABM is %s", (advanced_battery_monitoring == 4) ? "enabled" : "disabled");
}
{
advanced_battery_monitoring = advanced_battery_monitoring_val;
upsdebugx(2, "ABM is %s", (advanced_battery_monitoring == 4) ? "enabled" : "disabled");
}
else
upsdebugx(2, "ABM is %s", (advanced_battery_monitoring == 1) ? "enabled" : "disabled");

Expand Down

0 comments on commit a41b41f

Please sign in to comment.