Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9557 - Correctly interpret the number parameter of the %mv wps tag

Attached to Project: Rockbox
Opened by Alexander Levin (fml2) - Sunday, 16 November 2008, 13:25 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Saturday, 22 November 2008, 11:31 GMT+2
Task Type Patches
Category Applications
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

The number parameter in the %mv tag (volume changing) should be interpreted as seconds. But it's interpreted as 0.1 secs. I.e. 2.5 will wait 0.25 secs instead of 2.5. The patch fixes that.
   button_timeout.patch (2.3 KiB)
 apps/gui/gwps-common.c |    4 ++--
 apps/gui/gwps.h        |   11 ++++++++---
 apps/gui/wps_parser.c  |    3 +--
 3 files changed, 11 insertions(+), 7 deletions(-)

This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Saturday, 22 November 2008, 11:31 GMT+2
Reason for closing:  Accepted
Comment by Alexander Levin (fml2) - Sunday, 16 November 2008, 13:37 GMT+2
Another try (moved private symbols from .h to .c).
   button_timeout2.patch (2.6 KiB)
 apps/gui/gwps-common.c |   12 ++++++++++--
 apps/gui/gwps.h        |    3 ---
 apps/gui/wps_parser.c  |    3 +--
 3 files changed, 11 insertions(+), 7 deletions(-)

Comment by Alexander Levin (fml2) - Monday, 17 November 2008, 22:53 GMT+2
A comment for the reviewers: it might be better to store the timeout not in 0.1 sec units (as it's done now) but directly in ticks (i.e. in 0.01 sec units). Then the interpreting code wouldn't need to do any scaling. But in the WPS structure, the subline timeout is stored as an unsigned char. That would be too small for storing ticks, hence I left it in tenth of a second. I didn't want to make the data structure bigger in size.

Loading...