Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  X5 button problem while in WPS
« previous next »
  • Print
Pages: [1]

Author Topic: X5 button problem while in WPS  (Read 6867 times)

Offline Sherv

  • Member
  • *
  • Posts: 66
X5 button problem while in WPS
« on: December 04, 2006, 09:55:39 AM »
I'm torn between posting this in the Audio Playback forum and the Hardware forum, I'm not sure where this fits but...

So I've been running the latest daily builds on my iAudio X5 and one thing I've noticed is that occasionally when I'm trying to skip the song playing by pressing right on the joystick the player will not register this properly and instead drops me out of the WPS as if I had pressed the joystick down (into the player). I hit up IRC and someone suggested that it's not necessarily a hardware problem but that rockbox could perhaps be modified, something about debouncing or bouncing was said (sorry, memory is hazy). This was mentioned before in http://forums.rockbox.org/index.php?topic=4154.0 but I only notice it when in the WPS; while navigating or using plugins this button mixup does not manifest itself.

Any ideas as to whether this is indeed a hardware problem or whether it can be rectified via the firmware? Thanks!
Logged

Offline etchasketch

  • Member
  • *
  • Posts: 2
Re: X5 button problem while in WPS
« Reply #1 on: December 12, 2006, 10:45:54 PM »
Hello, I am new here, and just got an iAudio X5 last week.  

I loaded up rockbox and noticed that my joystick was sometimes quite twitchy. For example, if i clicked left it would often register a left button, then on release would fire off a short right button. Also, it was sometimes picking up buttons i never touched, like Record, while moving the joystick.

As i'm a programmer, i took a look through the rockbox source and noticed that when the firmware polls for a button, it makes sure the button state it just read from the hardware is the same as the last time it read the state (during the previous tick). This is equivalent to 'rockbox only registers a button state as valid if it reads the same state two times in a row'.

I extended this to 'rockbox only registers a button state as valid if it reads the same state four times in a row' and it (so far) has vastly improved my situation. Of course, there is about 2ms more lag on the button presses, but it's helped stop the phantom button presses.

I believe this is what debouncing is, although I personally call it filtering. If my joystick fails more I might have to add either more filtering or something more drastic.

On a related note, I'm quite disappointed in the X5's joystick, as my player is brand new. Rockbox shows the problems much more than the original firmware does.

So, to answer your question... it might be able to be rectified via firmware. My problem sounds similar.
Logged

Offline xlarge

  • Member
  • *
  • Posts: 191
Re: X5 button problem while in WPS
« Reply #2 on: December 13, 2006, 10:46:30 AM »
Really odd.
I've never felt anything like that.
But then again my x5 is ~1½ year old by now and i used it a full 10 months on original firmware.
Who knows, something might have changed in hardware since i bought mine.
Logged

Offline Sherv

  • Member
  • *
  • Posts: 66
Re: X5 button problem while in WPS
« Reply #3 on: December 13, 2006, 11:13:55 AM »
Quote from: etchasketch on December 12, 2006, 10:45:54 PM
Hello, I am new here, and just got an iAudio X5 last week.  

I loaded up rockbox and noticed that my joystick was sometimes quite twitchy. For example, if i clicked left it would often register a left button, then on release would fire off a short right button. Also, it was sometimes picking up buttons i never touched, like Record, while moving the joystick.

As i'm a programmer, i took a look through the rockbox source and noticed that when the firmware polls for a button, it makes sure the button state it just read from the hardware is the same as the last time it read the state (during the previous tick). This is equivalent to 'rockbox only registers a button state as valid if it reads the same state two times in a row'.

I extended this to 'rockbox only registers a button state as valid if it reads the same state four times in a row' and it (so far) has vastly improved my situation. Of course, there is about 2ms more lag on the button presses, but it's helped stop the phantom button presses.

I believe this is what debouncing is, although I personally call it filtering. If my joystick fails more I might have to add either more filtering or something more drastic.

On a related note, I'm quite disappointed in the X5's joystick, as my player is brand new. Rockbox shows the problems much more than the original firmware does.

So, to answer your question... it might be able to be rectified via firmware. My problem sounds similar.

Ah yes, debouncing/filtering, that's the proper term. Thanks for your feedback, would it be possible for you to provide a patch for your changes? I won't notice the 2ms lag and would definitely appreciate the increased button reliability!

Thanks for your feedback and testing, glad to know I'm not alone  with this (what happened to the other X5 owners who suffer from this problem?)
Logged

Offline RandomBob

  • Member
  • *
  • Posts: 2
Re: X5 button problem while in WPS
« Reply #4 on: December 13, 2006, 12:54:24 PM »
I am having similar problems with twitchy controls with my X5. I do not experience the problem with the original firmware. Can any one suggest a fix?
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: X5 button problem while in WPS
« Reply #5 on: December 13, 2006, 02:24:45 PM »
By the way, this is completely unrelated to playback and playlists.

Just wanted to mention that... ;D
Logged

Offline Sherv

  • Member
  • *
  • Posts: 66
Re: X5 button problem while in WPS
« Reply #6 on: December 13, 2006, 03:05:02 PM »
Yeah, but like I wrote, "I'm torn between posting this in the Audio Playback forum and the Hardware forum, I'm not sure where this fits but..."

Heh, maybe I should have been torn between posting in the User Interface and Hardware forums...whoops!
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: X5 button problem while in WPS
« Reply #7 on: December 13, 2006, 03:50:00 PM »
I think reading the "POSTING IN THIS FORUM" post for the Hardware forum probably would've answered your question on that matter...
Logged

Offline etchasketch

  • Member
  • *
  • Posts: 2
Re: X5 button problem while in WPS
« Reply #8 on: December 13, 2006, 04:06:10 PM »
I've attached a patch for button.c (rename it to patch if you want)

I made a mistake: I mean 20ms, rather than 2ms. It still isnt noticable.

You can vary the filtering by changing FILTER_LIMIT to whatever you want, although i dont suggest making it larger than 16, or smaller than 2.

I have only tested this on my own iAudio X5L.

[attachment deleted by admin, too old]
Logged

Offline Sherv

  • Member
  • *
  • Posts: 66
Re: X5 button problem while in WPS
« Reply #9 on: December 13, 2006, 04:14:21 PM »
Sweet, thanks so much!
Logged

Offline RandomBob

  • Member
  • *
  • Posts: 2
Re: X5 button problem while in WPS
« Reply #10 on: December 14, 2006, 10:26:20 AM »
Thanks etchasketch, my control work perfectly now!   :D
Logged

Offline pixelma

  • Rockbox Expert
  • Member
  • *
  • Posts: 645
Re: X5 button problem while in WPS
« Reply #11 on: March 05, 2007, 06:25:59 PM »
There is a fix for this issue in SVN now (current builds, daily builds from tomorrow on):

Quote
5 Mar 20:14Jens ArnoldAdd extra filtering to the X5 and M5 button drivers to prevent erratic button events (ported from H300).
Logged

Offline philibuster

  • Member
  • *
  • Posts: 7
Re: X5 button problem while in WPS
« Reply #12 on: April 28, 2007, 03:59:32 AM »
I think the button driver still needs a little work. When I try to down quickly by rapidly hitting the button through some files, it flashes down, then goes back up, leaving me at the same place when I know I hit the button at least twice.  Why would it trigger an up event when I am only pushing down?

This is using the latest build, so it has the extra filtering, but maybe the extra filtering is not extra enough...
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  X5 button problem while in WPS
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.119 seconds with 15 queries.