mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-09 07:08:07 +02:00
src: up-device-battery: Reset values when the battery is not present
If the battery is not present, reset the attribute values. Resolves: #292
This commit is contained in:
parent
6bd8cd90b3
commit
3452140a6c
1 changed files with 6 additions and 1 deletions
|
|
@ -595,16 +595,21 @@ up_device_battery_update_info (UpDeviceBattery *self, UpBatteryInfo *info)
|
|||
"vendor", NULL,
|
||||
"model", NULL,
|
||||
"serial", NULL,
|
||||
"state", UP_DEVICE_STATE_UNKNOWN,
|
||||
"technology", UP_DEVICE_TECHNOLOGY_UNKNOWN,
|
||||
"capacity", (gdouble) 0.0,
|
||||
"energy", (gdouble) 0.0,
|
||||
"energy-full", (gdouble) 0.0,
|
||||
"energy-full-design", (gdouble) 0.0,
|
||||
"voltage", (gdouble) 0.0,
|
||||
"charge-cycles", -1,
|
||||
"has-history", FALSE,
|
||||
"has-statistics", FALSE,
|
||||
"percentage", (gdouble) 0.0,
|
||||
"temperature", (gdouble) 0.0,
|
||||
"update-time", (guint64) g_get_real_time () / G_USEC_PER_SEC,
|
||||
"charge-start-threshold", 0,
|
||||
"charge-end-threshold", 100,
|
||||
"charge-end-threshold", 0,
|
||||
"charge-threshold-enabled", FALSE,
|
||||
"charge-threshold-supported", FALSE,
|
||||
NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue