diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c index 8f3bbbce34..e854f6207d 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -105,7 +105,8 @@ offset abs | |||
105 | 0x22 0x36 <rec. quality (bit 0-2), source (bit 3-4), frequency (bit 5-7)> | 105 | 0x22 0x36 <rec. quality (bit 0-2), source (bit 3-4), frequency (bit 5-7)> |
106 | 0x23 0x37 <rec. left gain (bit 0-3)> | 106 | 0x23 0x37 <rec. left gain (bit 0-3)> |
107 | 0x24 0x38 <rec. right gain (bit 0-3)> | 107 | 0x24 0x38 <rec. right gain (bit 0-3)> |
108 | 0x25 0x39 <disk poweroff flag (bit 0), MP3 buffer margin (bit 1-3)> | 108 | 0x25 0x39 <disk poweroff flag (bit 0), MP3 buffer margin (bit 1-3), |
109 | Trickle charge flag (bit 4)> | ||
109 | 0x26 0x40 <runtime low byte> | 110 | 0x26 0x40 <runtime low byte> |
110 | 0x27 0x41 <runtime high byte> | 111 | 0x27 0x41 <runtime high byte> |
111 | 0x28 0x42 <topruntime low byte> | 112 | 0x28 0x42 <topruntime low byte> |
@@ -349,7 +350,8 @@ int settings_save( void ) | |||
349 | config_block[0x24] = (unsigned char)global_settings.rec_right_gain; | 350 | config_block[0x24] = (unsigned char)global_settings.rec_right_gain; |
350 | config_block[0x25] = (unsigned char) | 351 | config_block[0x25] = (unsigned char) |
351 | ((global_settings.disk_poweroff & 1) | | 352 | ((global_settings.disk_poweroff & 1) | |
352 | ((global_settings.buffer_margin & 7) << 1)); | 353 | ((global_settings.buffer_margin & 7) << 1) | |
354 | ((global_settings.trickle_charge & 1) << 4)); | ||
353 | 355 | ||
354 | { | 356 | { |
355 | static long lasttime = 0; | 357 | static long lasttime = 0; |
@@ -461,6 +463,7 @@ void settings_apply(void) | |||
461 | #ifdef HAVE_CHARGE_CTRL | 463 | #ifdef HAVE_CHARGE_CTRL |
462 | charge_restart_level = global_settings.discharge ? | 464 | charge_restart_level = global_settings.discharge ? |
463 | CHARGE_RESTART_LO : CHARGE_RESTART_HI; | 465 | CHARGE_RESTART_LO : CHARGE_RESTART_HI; |
466 | enable_trickle_charge(global_settings.trickle_charge); | ||
464 | #endif | 467 | #endif |
465 | 468 | ||
466 | #ifdef HAVE_LCD_BITMAP | 469 | #ifdef HAVE_LCD_BITMAP |
@@ -500,8 +503,6 @@ void settings_apply(void) | |||
500 | global_settings.lang_file); | 503 | global_settings.lang_file); |
501 | lang_load(buf); | 504 | lang_load(buf); |
502 | } | 505 | } |
503 | |||
504 | |||
505 | } | 506 | } |
506 | 507 | ||
507 | /* | 508 | /* |
@@ -636,6 +637,7 @@ void settings_load(void) | |||
636 | { | 637 | { |
637 | global_settings.disk_poweroff = config_block[0x25] & 1; | 638 | global_settings.disk_poweroff = config_block[0x25] & 1; |
638 | global_settings.buffer_margin = (config_block[0x25] >> 1) & 7; | 639 | global_settings.buffer_margin = (config_block[0x25] >> 1) & 7; |
640 | global_settings.trickle_charge = (config_block[0x25] >> 4) & 1; | ||
639 | } | 641 | } |
640 | 642 | ||
641 | if (config_block[0x27] != 0xff) | 643 | if (config_block[0x27] != 0xff) |
@@ -829,6 +831,7 @@ void settings_reset(void) { | |||
829 | global_settings.backlight_timeout = DEFAULT_BACKLIGHT_TIMEOUT_SETTING; | 831 | global_settings.backlight_timeout = DEFAULT_BACKLIGHT_TIMEOUT_SETTING; |
830 | global_settings.backlight_on_when_charging = | 832 | global_settings.backlight_on_when_charging = |
831 | DEFAULT_BACKLIGHT_ON_WHEN_CHARGING_SETTING; | 833 | DEFAULT_BACKLIGHT_ON_WHEN_CHARGING_SETTING; |
834 | global_settings.trickle_charge = true; | ||
832 | global_settings.dirfilter = SHOW_MUSIC; | 835 | global_settings.dirfilter = SHOW_MUSIC; |
833 | global_settings.sort_case = false; | 836 | global_settings.sort_case = false; |
834 | global_settings.statusbar = true; | 837 | global_settings.statusbar = true; |