Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#6787 - Button filter

Attached to Project: Rockbox
Opened by Nicolas GIF (salokyn) - Saturday, 10 March 2007, 17:01 GMT+2
Last edited by Alex Parker (BigBambi) - Sunday, 06 June 2010, 01:01 GMT+2
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Here is a /firmware/target/coldfire/iaudio/x5/button-x5.c containing my button filter I made for my X5.
It consists in storing button data in an array (each new value erase the older one). The average of the values is validated if the difference between the lower and the higher values is not too big.
I think it can be ported to any Jukebox and the filter strength can be configurable.
This task depends upon

Closed by  Alex Parker (BigBambi)
Sunday, 06 June 2010, 01:01 GMT+2
Reason for closing:  Fixed
Comment by Nicolas GIF (salokyn) - Friday, 23 March 2007, 09:29 GMT+2
Well, this patch is full of bugs (I forgave that value > 0x80 can be negative !!), and a bit too complicated !! So foreget it for now.

I began to write another one still working with an array in oder to configure the filter strength (by modifying the array size). And if I can, maybe I could add a new entry in the settings menu.
Comment by Nicolas GIF (salokyn) - Sunday, 25 March 2007, 11:09 GMT+2
Finally I just changed button-x5.c (should work on M5 without changes)
   button.patch (1.5 KiB)
 sources/rockbox-bleeding/firmware/target/coldfire/iaudio/x5/button-x5.c |   30 +++++++---
 1 file changed, 22 insertions(+), 8 deletions(-)

Comment by Nicolas GIF (salokyn) - Sunday, 25 March 2007, 11:24 GMT+2
Removed abs()
   button.patch (1.5 KiB)
 sources/rockbox-bleeding/firmware/target/coldfire/iaudio/x5/button-x5.c |   30 +++++++---
 1 file changed, 22 insertions(+), 8 deletions(-)

Comment by Nicolas GIF (salokyn) - Sunday, 25 March 2007, 13:34 GMT+2
Removed last_valid trick that makes more problems than it solves.
   button.patch (1.6 KiB)
 /home/nicolas/sources/rockbox-bleeding/firmware/target/coldfire/iaudio/x5/button-x5.c |   35 +++++++---
 1 file changed, 25 insertions(+), 10 deletions(-)

Comment by Rani Hod (RaeNye) - Sunday, 05 August 2007, 15:38 GMT+2
What is the purpose of this patch?
(what problem does it solve?)
Comment by Nicolas GIF (salokyn) - Friday, 21 September 2007, 14:02 GMT+2
Well, the joystick of X5 players is not stable. When you push it in one direction, the "keycode" that hardware returns may be varying that much that Rockbox can understand another direction. Then the solution is to make a filter to reduce bounce.

The patch as still a problem : what to return when keypress in not validated by filter ? Nothing or the last valid keypress ? Both in fact depending of the context. I have to watch for it.

Loading...