up-device-battery: set up charge-threshold-settings-supported property

Setup and update the charge-threshold-settings-supported property.
This commit is contained in:
Kate Hsuan 2025-08-01 14:37:29 +08:00
parent 1c7b9d8bae
commit 1bf86b5483
2 changed files with 3 additions and 0 deletions

View file

@ -537,6 +537,7 @@ up_device_battery_update_info (UpDeviceBattery *self, UpBatteryInfo *info)
"charge-end-threshold", info->charge_control_end_threshold, "charge-end-threshold", info->charge_control_end_threshold,
"charge-threshold-enabled", charge_threshold_enabled, "charge-threshold-enabled", charge_threshold_enabled,
"charge-threshold-supported", info->charge_control_supported, "charge-threshold-supported", info->charge_control_supported,
"charge-threshold-settings-supported", info->charge_threshold_settings,
"voltage-min-design", info->voltage_min_design, "voltage-min-design", info->voltage_min_design,
"voltage-max-design", info->voltage_max_design, "voltage-max-design", info->voltage_max_design,
NULL); NULL);
@ -615,6 +616,7 @@ up_device_battery_update_info (UpDeviceBattery *self, UpBatteryInfo *info)
"charge-end-threshold", 0, "charge-end-threshold", 0,
"charge-threshold-enabled", FALSE, "charge-threshold-enabled", FALSE,
"charge-threshold-supported", FALSE, "charge-threshold-supported", FALSE,
"charge-threshold-settings-supported", 0,
"voltage-min-design", (gdouble) 0.0, "voltage-min-design", (gdouble) 0.0,
"voltage-max-design", (gdouble) 0.0, "voltage-max-design", (gdouble) 0.0,
"capacity-level", NULL, "capacity-level", NULL,

View file

@ -98,6 +98,7 @@ typedef struct {
gboolean charge_control_supported; gboolean charge_control_supported;
guint charge_control_start_threshold; guint charge_control_start_threshold;
guint charge_control_end_threshold; guint charge_control_end_threshold;
guint charge_threshold_settings;
} UpBatteryInfo; } UpBatteryInfo;