Lines Matching defs:chargeRate
124 * @param chargeRate The "rate" (typically mW)
129 * @param guessChargeRate If ignore chargeRate and guess them.
134 int chargeRate,
144 if (chargeRate < 0 || chargeLevel < 0 || chargeLastFull < 0) {
145 HAL_WARNING (("chargeRate, chargeLevel or chargeLastFull < 0, returning -1"));
158 if (chargeRate == 0 || guessChargeRate) {
170 * chargeRate to prevent removing battery.remaining_time.
172 chargeRate = battery_info->last_chargeRate;
174 chargeRate = ((chargeLevel - battery_info->last_level) * 60 * 60) / (cur_time - battery_info->last_time);
176 * During discharging chargeRate would be negative, which would
180 chargeRate = (chargeRate > 0) ? chargeRate : -chargeRate;
184 battery_info->last_chargeRate = chargeRate;
197 if (chargeRate == 0)
201 remaining_time = ((double) chargeLevel / (double) chargeRate) * 60 * 60;
211 remaining_time = ((double) (chargeLastFull - chargeLevel) / (double) chargeRate) * 60 * 60;