summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorSteve Gotthardt <gotthardt@rockbox.org>2007-01-08 08:53:36 +0000
committerSteve Gotthardt <gotthardt@rockbox.org>2007-01-08 08:53:36 +0000
commit93b047fffec9b6d3b5ef1697c3034caa83944182 (patch)
tree430b4482bd77c6d860a14048b25310db5aa8943d /apps/debug_menu.c
parent2446b22db971668f8d6ba5cb2361aabbda286da1 (diff)
downloadrockbox-93b047fffec9b6d3b5ef1697c3034caa83944182.zip
rockbox-93b047fffec9b6d3b5ef1697c3034caa83944182.tar.gz
rockbox-93b047fffec9b6d3b5ef1697c3034caa83944182.tar.bz2
rockbox-93b047fffec9b6d3b5ef1697c3034caa83944182.tar.xz
Updated buttonlights for the Gigabeat port. Added LCD controller off and on for extra power savings - thanks to Greg White. Incorporated feedback from Gary Allen. Added 'battery charging' mode: shows leds during charging. Added 'follow' mode that turns off leds when backlight goes off. Flicker mode and new solid mode only show during disk access. Access settings from Info/debug menu for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11945 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c41
1 files changed, 27 insertions, 14 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 3785374..083dddb 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2094,14 +2094,14 @@ static bool dbg_lcd_power_off(void)
static bool dbg_buttonlights(void)
{
unsigned short mode_changed = 1, mode = 0;
- unsigned short which_led = BUTTONLIGHT_LED_ALL;
+ enum buttonlight_selection which_led = BUTTONLIGHT_LED_ALL;
+ unsigned short brightness = DEFAULT_BRIGHTNESS_SETTING;
lcd_setmargins(0, 0);
for (;;)
{
int button;
-
if (mode_changed)
{
lcd_clear_display();
@@ -2113,22 +2113,37 @@ static bool dbg_buttonlights(void)
{
case 0:
lcd_puts(1, 3, "Off");
- __buttonlight_mode(BUTTONLIGHT_OFF);
+ __buttonlight_mode(BUTTONLIGHT_OFF, which_led, brightness);
break;
case 1:
- lcd_puts(1, 3, "On");
- __buttonlight_mode(BUTTONLIGHT_ON);
+ lcd_puts(1, 3, "On - Set to brightness");
+ __buttonlight_mode(BUTTONLIGHT_ON, which_led, brightness);
break;
case 2:
- lcd_puts(1, 3, "Faint");
- __buttonlight_mode(BUTTONLIGHT_FAINT);
+ lcd_puts(1, 3, "Faint - Always on at lowest brightness");
+ __buttonlight_mode(BUTTONLIGHT_FAINT, which_led, brightness);
break;
case 3:
- lcd_puts(1, 3, "Flicker");
- __buttonlight_mode(BUTTONLIGHT_FLICKER);
+ lcd_puts(1, 3, "Flicker on disk access");
+ __buttonlight_mode(BUTTONLIGHT_FLICKER, which_led, brightness);
+ break;
+
+ case 4:
+ lcd_puts(1, 3, "Solid on disk access");
+ __buttonlight_mode(BUTTONLIGHT_SIGNAL, which_led, brightness);
+ break;
+
+ case 5:
+ lcd_puts(1, 3, "Follows backlight");
+ __buttonlight_mode(BUTTONLIGHT_FOLLOW, which_led, brightness);
+ break;
+
+ case 6:
+ lcd_puts(1, 3, "Shows 'battery charging'");
+ __buttonlight_mode(BUTTONLIGHT_CHARGING, which_led, brightness);
break;
}
@@ -2140,13 +2155,12 @@ static bool dbg_buttonlights(void)
/* does nothing unless in flicker mode */
/* the parameter sets the brightness */
- __buttonlight_flicker(20);
+ __buttonlight_trigger();
button = get_action(CONTEXT_STD,HZ/5);
switch(button)
{
case ACTION_STD_PREV:
- mode++;
- if (mode > 3) mode = 0;
+ if (++mode > 6) mode = 0;
mode_changed = 1;
break;
@@ -2159,8 +2173,7 @@ static bool dbg_buttonlights(void)
{
which_led = BUTTONLIGHT_LED_ALL;
}
-
- __buttonlight_select(which_led);
+ mode_changed = 1;
break;