lib: up-device: Expose historical voltage data

Enable library users to access stored voltage data.
This commit is contained in:
Sicelo A. Mhlongo 2025-12-23 23:45:43 +02:00
parent 9e33b090f4
commit 99bb51ce50

View file

@ -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