diff --git a/apps/settings.c b/apps/settings.c index fb2b369cd7..e065e78c81 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR; #include "dsp.h" #endif -#define CONFIG_BLOCK_VERSION 45 +#define CONFIG_BLOCK_VERSION 46 #define CONFIG_BLOCK_SIZE 512 #define RTC_BLOCK_SIZE 44 @@ -364,6 +364,7 @@ static const struct bit_entry hd_bits[] = {4, S_O(remote_scroll_speed), 9, "remote scroll speed", NULL }, /* 0...15 */ {8, S_O(remote_scroll_step), 6, "remote scroll step", NULL }, /* 1...160 */ {8, S_O(remote_scroll_delay), 100, "remote scroll delay", NULL }, /* 0...250 */ + {8, S_O(remote_bidir_limit), 50, "remote bidir limit", NULL }, /* 0...200 */ #endif #ifdef HAVE_LCD_BITMAP @@ -1018,6 +1019,7 @@ void settings_apply(void) lcd_remote_scroll_speed(global_settings.remote_scroll_speed); lcd_remote_scroll_step(global_settings.remote_scroll_step); lcd_remote_scroll_delay(global_settings.remote_scroll_delay * (HZ/10)); + lcd_remote_bidir_scroll(global_settings.remote_bidir_limit); #ifdef HAVE_REMOTE_LCD_TICKING lcd_remote_emireduce(global_settings.remote_reduce_ticking); #endif diff --git a/apps/settings.h b/apps/settings.h index dc9e4f84d5..4809c18575 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -353,6 +353,7 @@ struct user_settings int remote_scroll_speed; /* long texts scrolling speed: 1-30 */ int remote_scroll_delay; /* delay (in 1/10s) before starting scroll */ int remote_scroll_step; /* pixels to advance per update */ + int remote_bidir_limit; /* bidir scroll length limit */ #endif #ifdef HAVE_LCD_BITMAP diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 8417e77341..3e02727f9e 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -880,6 +880,14 @@ static bool remote_scroll_delay(void) global_settings.remote_scroll_delay = dummy / (HZ/10); return rc; } + +static bool remote_bidir_limit(void) +{ + return set_int(str(LANG_BIDIR_SCROLL), "%", UNIT_PERCENT, + &global_settings.remote_bidir_limit, + &lcd_remote_bidir_scroll, 25, 0, 200, NULL ); +} + #endif #ifdef HAVE_LCD_BITMAP @@ -1708,6 +1716,7 @@ static bool remote_scroll_sets(void) { ID2P(LANG_SCROLL_SPEED), remote_scroll_speed }, { ID2P(LANG_SCROLL_DELAY), remote_scroll_delay }, { ID2P(LANG_SCROLL_STEP), remote_scroll_step }, + { ID2P(LANG_BIDIR_SCROLL), remote_bidir_limit }, }; m=menu_init( items, sizeof(items) / sizeof(*items), NULL, @@ -1729,10 +1738,10 @@ static bool scroll_settings_menu(void) #ifdef HAVE_LCD_BITMAP { ID2P(LANG_SCROLL_STEP), scroll_step }, #endif + { ID2P(LANG_BIDIR_SCROLL), bidir_limit }, #ifdef HAVE_REMOTE_LCD { ID2P(LANG_REMOTE_SCROLL_SETS), remote_scroll_sets }, #endif - { ID2P(LANG_BIDIR_SCROLL), bidir_limit }, #ifdef HAVE_LCD_CHARCELLS { ID2P(LANG_JUMP_SCROLL), jump_scroll }, { ID2P(LANG_JUMP_SCROLL_DELAY), jump_scroll_delay },