Lines Matching defs:chargeLevel
84 * @param chargeLevel The current charge level of the battery (typically mWh)
90 int chargeLevel,
95 if (chargeLevel <= 0) {
96 HAL_WARNING (("chargeLevel %i, returning -1!", chargeLevel));
101 percentage = ((double) chargeLevel / (double) chargeLastFull) * 100;
125 * @param chargeLevel The current charge level of the battery (typically mWh)
135 int chargeLevel,
144 if (chargeRate < 0 || chargeLevel < 0 || chargeLastFull < 0) {
145 HAL_WARNING (("chargeRate, chargeLevel or chargeLastFull < 0, returning -1"));
155 * to. We use the current and previous chargeLevel to estimate the rate.
168 if ((cur_time == battery_info->last_time) || (chargeLevel == battery_info->last_level)) {
174 chargeRate = ((chargeLevel - battery_info->last_level) * 60 * 60) / (cur_time - battery_info->last_time);
182 battery_info->last_level = chargeLevel;
190 battery_info->last_level = chargeLevel;
201 remaining_time = ((double) chargeLevel / (double) chargeRate) * 60 * 60;
207 if (chargeLevel > chargeLastFull ) {
208 HAL_WARNING (("chargeLevel > chargeLastFull, returning -1"));
211 remaining_time = ((double) (chargeLastFull - chargeLevel) / (double) chargeRate) * 60 * 60;