This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8110 - Dimming Sansa wheel light
Attached to Project:
Rockbox
Opened by jpcasainho (casainho) - Wednesday, 07 November 2007, 16:56 GMT+2
Last edited by Steve Bavin (pondlife) - Wednesday, 07 November 2007, 18:38 GMT+2
Opened by jpcasainho (casainho) - Wednesday, 07 November 2007, 16:56 GMT+2
Last edited by Steve Bavin (pondlife) - Wednesday, 07 November 2007, 18:38 GMT+2
|
DetailsI would like to see wheel light fade in/fade out. I think that should not be difficult to implement in software, maybe PWM, changing the duty-cycle.
Also the constant quantity of light in wheel. Its a question of harmony, as the natural light of sun reach us, fading in on morning and out on evening. Rapid transitions are not natural to humans and I believe that behavior passes some stress to us, for example in illumination on our houses (at least in mine, here in Portugal). |
This task depends upon
Closed by Björn Stenberg (zagor)
Reason for closing:
Additional comments about closing: Closing all feature requests.
Reason for closing:
Additional comments about closing: Closing all feature requests.
http://forums.rockbox.org/index.php?topic=13628.msg102659
Now I need to have the timeout wheel light working and after put a menu entry in options for configure the value of the wheel_light_quantity.
FILE: firmware/drivers/button.c
timer_register(1, NULL, TIMER_FREQ/10000, 1, wheel_light_quantity_isr); /* Call "wheel_light_quantity_isr" every 100us. */
static signed char wheel_light_quantity = 10; /* 10% of light in whell. */
static void wheel_light_quantity_isr(void)
{
static char pwm_counter = 0;
if (wheel_light_quantity == 0) /* wheel_light turned off. */
{
GPIOG_OUTPUT_VAL &=~ 0x80; /* Button light OFF. */
return;
}
if (++pwm_counter > 100)
pwm_counter = 1;
if (pwm_counter <= wheel_light_quantity)
GPIOG_OUTPUT_VAL |= 0x80; /* Button light ON. */
else
GPIOG_OUTPUT_VAL &=~ 0x80; /* Button light OFF. */
}