From 99bb51ce508a9b65da764de6ddcab4a442fcfdcc Mon Sep 17 00:00:00 2001 From: "Sicelo A. Mhlongo" Date: Tue, 23 Dec 2025 23:45:43 +0200 Subject: [PATCH] lib: up-device: Expose historical voltage data Enable library users to access stored voltage data. --- libupower-glib/up-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c index 32cb54b..7cd198c 100644 --- a/libupower-glib/up-device.c +++ b/libupower-glib/up-device.c @@ -430,6 +430,7 @@ up_device_to_text (UpDevice *device) if (up_exported_device_get_has_history (priv->proxy_device)) { up_device_to_text_history (device, string, "charge"); up_device_to_text_history (device, string, "rate"); + up_device_to_text_history (device, string, "voltage"); } return g_string_free (string, FALSE); @@ -461,7 +462,7 @@ up_device_refresh_sync (UpDevice *device, GCancellable *cancellable, GError **er /** * up_device_get_history_sync: * @device: a #UpDevice instance. - * @type: The type of history, known values are "rate" and "charge". + * @type: The type of history, known values are "rate", "voltage", and "charge". * @timespec: the amount of time to look back into time. * @resolution: the resolution of data. * @cancellable: a #GCancellable or %NULL