summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c6
-rw-r--r--apps/settings.h8
-rw-r--r--apps/settings_menu.c8
3 files changed, 21 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 274a124d31..5dd5ea144a 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -276,6 +276,8 @@ int settings_save( void )
276 276
277 rtc_config_block[0x11] = (unsigned char)global_settings.avc; 277 rtc_config_block[0x11] = (unsigned char)global_settings.avc;
278 278
279 rtc_config_block[0x12] = (unsigned char)global_settings.contrast;
280
279 memcpy(&rtc_config_block[0x24], &global_settings.total_uptime, 4); 281 memcpy(&rtc_config_block[0x24], &global_settings.total_uptime, 4);
280 282
281 if(save_config_buffer()) 283 if(save_config_buffer())
@@ -350,9 +352,13 @@ void settings_load(void)
350 if (rtc_config_block[0x11] != 0xFF) 352 if (rtc_config_block[0x11] != 0xFF)
351 global_settings.avc = rtc_config_block[0x11]; 353 global_settings.avc = rtc_config_block[0x11];
352 354
355 if (rtc_config_block[0x12] != 0xff)
356 global_settings.contrast = rtc_config_block[0x12];
357
353 if (rtc_config_block[0x24] != 0xFF) 358 if (rtc_config_block[0x24] != 0xFF)
354 memcpy(&global_settings.total_uptime, &rtc_config_block[0x24], 4); 359 memcpy(&global_settings.total_uptime, &rtc_config_block[0x24], 4);
355 } 360 }
361 lcd_set_contrast(global_settings.contrast);
356 lcd_scroll_speed(global_settings.scroll_speed); 362 lcd_scroll_speed(global_settings.scroll_speed);
357 backlight_time(global_settings.backlight); 363 backlight_time(global_settings.backlight);
358#ifdef HAVE_CHARGE_CTRL 364#ifdef HAVE_CHARGE_CTRL
diff --git a/apps/settings.h b/apps/settings.h
index e0f0571def..1315cdcbd9 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -101,7 +101,13 @@ extern struct user_settings global_settings;
101#define DEFAULT_LOUDNESS_SETTING 0 101#define DEFAULT_LOUDNESS_SETTING 0
102#define DEFAULT_BASS_BOOST_SETTING 0 102#define DEFAULT_BASS_BOOST_SETTING 0
103#define DEFAULT_AVC_SETTING 0 103#define DEFAULT_AVC_SETTING 0
104#define DEFAULT_CONTRAST_SETTING 0 104#ifdef HAVE_LCD_CHARCELLS
105#define MAX_CONTRAST_SETTING 31
106#define DEFAULT_CONTRAST_SETTING 15
107#else
108#define MAX_CONTRAST_SETTING 63
109#define DEFAULT_CONTRAST_SETTING 32
110#endif
105#define DEFAULT_POWEROFF_SETTING 0 111#define DEFAULT_POWEROFF_SETTING 0
106#define DEFAULT_BACKLIGHT_SETTING 5 112#define DEFAULT_BACKLIGHT_SETTING 5
107#define DEFAULT_WPS_DISPLAY 0 113#define DEFAULT_WPS_DISPLAY 0
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index b2ca475619..0dbe50d9cb 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -35,6 +35,13 @@
35#include "powermgmt.h" 35#include "powermgmt.h"
36#include "rtc.h" 36#include "rtc.h"
37 37
38
39static void contrast(void)
40{
41 set_int( "[Contrast]", "", &global_settings.contrast,
42 lcd_set_contrast, 1, 0, MAX_CONTRAST_SETTING );
43}
44
38static void shuffle(void) 45static void shuffle(void)
39{ 46{
40 set_bool( "[Shuffle]", &global_settings.playlist_shuffle ); 47 set_bool( "[Shuffle]", &global_settings.playlist_shuffle );
@@ -133,6 +140,7 @@ void settings_menu(void)
133 { "MP3/M3U filter", mp3_filter }, 140 { "MP3/M3U filter", mp3_filter },
134 { "Sort mode", sort_case }, 141 { "Sort mode", sort_case },
135 { "Backlight Timer", backlight_timer }, 142 { "Backlight Timer", backlight_timer },
143 { "Contrast", contrast },
136 { "Scroll speed", scroll_speed }, 144 { "Scroll speed", scroll_speed },
137 { "While Playing", wps_set }, 145 { "While Playing", wps_set },
138#ifdef HAVE_CHARGE_CTRL 146#ifdef HAVE_CHARGE_CTRL