Lines Matching refs:props

61 static void initBatteryProperties(BatteryProperties* props) {
62 props->chargerAcOnline = false;
63 props->chargerUsbOnline = false;
64 props->chargerWirelessOnline = false;
65 props->maxChargingCurrent = 0;
66 props->maxChargingVoltage = 0;
67 props->batteryStatus = BATTERY_STATUS_UNKNOWN;
68 props->batteryHealth = BATTERY_HEALTH_UNKNOWN;
69 props->batteryPresent = false;
70 props->batteryLevel = 0;
71 props->batteryVoltage = 0;
72 props->batteryTemperature = 0;
73 props->batteryCurrent = 0;
74 props->batteryCycleCount = 0;
75 props->batteryFullCharge = 0;
76 props->batteryChargeCounter = 0;
77 props->batteryTechnology.clear();
82 initBatteryProperties(&props);
213 initBatteryProperties(&props);
216 props.batteryPresent = getBooleanField(mHealthdConfig->batteryPresentPath);
218 props.batteryPresent = mBatteryDevicePresent;
220 props.batteryLevel = mBatteryFixedCapacity ?
223 props.batteryVoltage = getIntField(mHealthdConfig->batteryVoltagePath) / 1000;
226 props.batteryCurrent = getIntField(mHealthdConfig->batteryCurrentNowPath) / 1000;
229 props.batteryFullCharge = getIntField(mHealthdConfig->batteryFullChargePath);
232 props.batteryCycleCount = getIntField(mHealthdConfig->batteryCycleCountPath);
235 props.batteryChargeCounter = getIntField(mHealthdConfig->batteryChargeCounterPath);
237 props.batteryTemperature = mBatteryFixedTemperature ?
244 props.chargerAcOnline = true;
245 props.batteryPresent = true;
246 props.batteryStatus = BATTERY_STATUS_CHARGING;
247 props.batteryHealth = BATTERY_HEALTH_GOOD;
255 props.batteryStatus = getBatteryStatus(buf);
258 props.batteryHealth = getBatteryHealth(buf);
261 props.batteryTechnology = String8(buf);
278 props.chargerAcOnline = true;
281 props.chargerUsbOnline = true;
284 props.chargerWirelessOnline = true;
307 props.maxChargingCurrent = ChargingCurrent;
308 props.maxChargingVoltage = ChargingVoltage;
315 logthis = !healthd_board_battery_update(&props);
320 if (props.batteryPresent) {
323 props.batteryLevel, props.batteryVoltage,
324 props.batteryTemperature < 0 ? "-" : "",
325 abs(props.batteryTemperature / 10),
326 abs(props.batteryTemperature % 10), props.batteryHealth,
327 props.batteryStatus);
332 " c=%d", props.batteryCurrent);
337 " fc=%d", props.batteryFullCharge);
342 " cc=%d", props.batteryCycleCount);
351 props.chargerAcOnline ? "a" : "",
352 props.chargerUsbOnline ? "u" : "",
353 props.chargerWirelessOnline ? "w" : "");
358 healthd_mode_ops->battery_update(&props);
359 return props.chargerAcOnline | props.chargerUsbOnline |
360 props.chargerWirelessOnline;
440 props.chargerAcOnline, props.chargerUsbOnline,
441 props.chargerWirelessOnline, props.maxChargingCurrent,
442 props.maxChargingVoltage);
445 props.batteryStatus, props.batteryHealth, props.batteryPresent);
448 props.batteryLevel, props.batteryVoltage,
449 props.batteryTemperature);
471 snprintf(vs, sizeof(vs), "current now: %d\n", props.batteryCurrent);
476 snprintf(vs, sizeof(vs), "cycle count: %d\n", props.batteryCycleCount);
481 snprintf(vs, sizeof(vs), "Full charge: %d\n", props.batteryFullCharge);