diff options
Diffstat (limited to 'menus.c')
-rw-r--r-- | menus.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -2323,11 +2323,23 @@ static void Submenu_Service_Encoder(int encoder_change) g_usleep (2e5); reset_encoder=YES; /* to avoid extra unwanted increments */ new_int_value=(int) (Submenu_Value); + +#define LARGE_CHANGE 3 +#define BURST_SMALL_INC 1 +#define BURST_LARGE_INC 10 if (encoder_change>0) { - ++new_int_value; - } else { - --new_int_value; + if (encoder_change>LARGE_CHANGE) { + new_int_value += BURST_LARGE_INC; + } else { + new_int_value += BURST_SMALL_INC; + } + } else if (encoder_change<0) { + if (encoder_change<-LARGE_CHANGE) { + new_int_value -= BURST_LARGE_INC; + } else { + new_int_value -= BURST_SMALL_INC; + } } if (new_int_value>globals.Constraints.err_max_burst_count[channel]) { |