forked from enlightenment/enlightenment
Enlightenment - BSD - Fix typos in battery sysctl float compares.
This commit is contained in:
parent
82af16c32b
commit
2f218a1694
|
@ -201,7 +201,7 @@ _battery_sysctl_battery_update()
|
|||
}
|
||||
|
||||
/* This is a workaround because there's an ACPI bug */
|
||||
if ((EINA_FLT_EQ(charge ==, 0.0)) || (EINA_FLT_EQ(bat->last_full_charge ==, 0.0)))
|
||||
if ((EINA_FLT_EQ(charge, 0.0)) || (EINA_FLT_EQ(bat->last_full_charge, 0.0)))
|
||||
{
|
||||
/* last full capacity */
|
||||
bat->mib[3] = 8;
|
||||
|
|
|
@ -229,7 +229,7 @@ _batman_sysctl_battery_update(Instance *inst)
|
|||
bat->got_prop = 1;
|
||||
|
||||
_time = ecore_time_get();
|
||||
if ((bat->got_prop) && (charge != bat->current_charge))
|
||||
if ((bat->got_prop) && (!EINA_FLT_EQ(charge, bat->current_charge)))
|
||||
bat->charge_rate = ((charge - bat->current_charge) / (_time - bat->last_update));
|
||||
bat->last_update = _time;
|
||||
bat->current_charge = charge;
|
||||
|
|
Loading…
Reference in New Issue