From e40900df01bc96b9689aef8c260753ef79abe1e7 Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Wed, 25 Jan 2006 21:55:35 +0000 Subject: Add battery voltage that is now exported from the power management as a wps tag git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8454 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'apps/gui/gwps-common.c') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 31b4de239f..0a33619cbf 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -639,11 +639,22 @@ static char* get_tag(struct wps_data* wps_data, else { *intval = 6; - return "?%"; + return "?"; } return buf; } + case 'v': /* battery voltage */ + { + int v = battery_voltage(); + if (v > -1) + { + snprintf(buf, buf_size, "%d.%02d", v/100, v%100); + return buf; + } else + return "?"; + } + case 't': /* estimated battery time */ { int t = battery_time(); -- cgit v1.2.3