• Status Closed
  • Percent Complete
  • Task Type Bugs
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by mc2739 - 2010-10-14
Last edited by dreamlayers - 2011-12-02

FS#11675 - Resistor plugin - led resistor calculator does not wait for keypress


Fails on device and sim (e200v1 and e200v2)

1. start the resistor plugin
2. select “LED resistor calculator” 3. select “2v (Common red, orange)” 4. select “20mA - Most common…” 5. use the virtual keyboard to input a supply voltage - I used “5”

After leaving the virtual keyboard, a resistor image is drawn and plugin immediately returns to menu.

At this point, the scrollwheel does not work until button is pressed. The button is ignored and the scrollwheel starts to work. This scrollwheel/button behavior has been previously documented in several other Flyspray tasks:  FS#8816 ,  FS#10097 , FS#10883 (and others)

Closed by  dreamlayers
2011-12-02 02:04
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Fixed in r31107

I created a duplicated of this entry because by error (
Anyhow, I post here too the patch I posted there (since this is the “real” entry for this bug), it should fix the problem by waiting 200 msec (to let the user release the button) and flushing the input buffer before waiting for keypress to exit.

s/because by/by/ :S

It’s still a problem in the 3.7 release. This really ought to be committed.

fg commented on 2010-11-07 15:46

I don’t think clearing the queue all the time is a good idea. This patch looks more like a workaround than a fix to me.

I can’t think about a better solution, if the key remains pressed even for a very small time after the virtual keyboard is closed, the keypress will remain in the queue; since the resistor screen waits for any keypress to exit, if the queue isn’t emptied it will close immediately.
(Disclaimer: I don’t know exactly how the RockBox input queue is designed, I’m just guessing :-) )

The problem occurs when inputing a value from the keyboard as the last step, so I switched the order of the inputs. This seems to fix the problem.

This also happens on the 5G iPod and sim. At that point in the sim, button_press is 0×02000040, meaning BUTTON_REL | BUTTON_PLAY. The text entry screen exits when the play button is pressed, and the resistor display exits when the play button is released. Simply holding the button doesn’t work as a workaround, probably because longer presses get interpreted differently. It’s easy to ignore the release with a while loop. I’m attaching a simple patch. It fixes the problem on the 5G iPod and its sim.


Your patch works fine for me on e200


Available keyboard shortcuts


Task Details

Task Editing