This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7278 - remote volume up keypress sometimes causes directory skip (iriver h140)
Attached to Project:
Rockbox
Opened by Kévin Ferrare (TiMiD) - Saturday, 09 June 2007, 10:01 GMT+2
Last edited by Steve Bavin (pondlife) - Tuesday, 05 May 2009, 14:44 GMT+2
Opened by Kévin Ferrare (TiMiD) - Saturday, 09 June 2007, 10:01 GMT+2
Last edited by Steve Bavin (pondlife) - Tuesday, 05 May 2009, 14:44 GMT+2
|
DetailsPressing the remote volume UP key on my iriver 140 in wps sometimes results in directory skip.
This is not easy to reproduce, but I was able to repeat once that problem in conditions where I'm sure that the directory skip key wasn't pressed. I don't know if it's a hardware related problem, but I've read somewhere about another user having the same problem. |
This task depends upon
Doesn't occur with iriver firmware.
[japc@morgoth:~/RB/.rockbox]$ grep ^Version rockbox-info.txt
Version: r14559-070831
...
data = adc_scan(ADC_BUTTONS);
/* ADC debouncing: Only accept new reading if it's
* stable (+/-1). Use latest stable value otherwise. */
if ((unsigned)(data - prev_data + 1) <= 2)
last_valid = data;
prev_data = data;
data = last_valid;
...
verses
...
data = adc_scan(ADC_REMOTE);
switch (remote_type())
{
case REMOTETYPE_H100_LCD:
if (data < 0xf5)
{
...
Maybe it's a combination of the hardware aging and producing a more significant bounce when changing the signal for the remote and the lack of the debouncing code being propagated to the remote handing code.
===================================================================
--- firmware/target/coldfire/iriver/h100/button-h100.c (revision 20563)
+++ firmware/target/coldfire/iriver/h100/button-h100.c (working copy)
@@ -68,6 +68,8 @@
static bool remote_hold_button = false;
static int prev_data = 0xff;
static int last_valid = 0xff;
+ static int prev_data_remote = 0xff;
+ static int last_valid_remote = 0xff;
bool hold_button_old;
bool remote_hold_button_old;
@@ -131,6 +133,14 @@
if (!remote_hold_button)
{
data = adc_scan(ADC_REMOTE);
+
+ /* ADC debouncing: Only accept new reading if it's
+ * stable (+/-1). Use latest stable value otherwise. */
+ if ((unsigned)(data - prev_data_remote + 1) <= 2)
+ last_valid_remote = data;
+ prev_data_remote = data;
+ data = last_valid_remote;
+
switch (remote_type())
{
case REMOTETYPE_H100_LCD: