Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by salokyn - 2007-03-10
Last edited by BigBambi - 2010-06-05

FS#6787 - Button filter

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.

Closed by  BigBambi
2010-06-05 23:01
Reason for closing:  Fixed

Well, this patch is full of bugs (I forgave that value > 0×80 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.

Finally I just changed button-x5.c (should work on M5 without changes)

Removed abs()

Removed last_valid trick that makes more problems than it solves.

What is the purpose of this patch?
(what problem does it solve?)

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

Available keyboard shortcuts

Tasklist

Task Details

Task Editing