diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:54:23 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:54:23 +0900 |
commit | 92572cdd82ef8cce33eb52359f14ab0f2b13bd12 (patch) | |
tree | ce319add01c7e47e8b2aa929ba99833867bc206c /menus.c | |
parent | a33693b1048b5893868b470d93e70ee35c4ef3d9 (diff) |
inc/dec burst count faster if encoder rotated fasterINSTRUMENT_6_0_2c
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]) { |