forked from len0rd/rockbox
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
This commit is contained in:
parent
facf94eb8b
commit
e40900df01
1 changed files with 12 additions and 1 deletions
|
|
@ -639,11 +639,22 @@ static char* get_tag(struct wps_data* wps_data,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*intval = 6;
|
*intval = 6;
|
||||||
return "?%";
|
return "?";
|
||||||
}
|
}
|
||||||
return buf;
|
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 */
|
case 't': /* estimated battery time */
|
||||||
{
|
{
|
||||||
int t = battery_time();
|
int t = battery_time();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue