summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:54:23 +0900
committerroot <root@avtech.domain.avtechpulse.com>1970-01-01 09:54:23 +0900
commit92572cdd82ef8cce33eb52359f14ab0f2b13bd12 (patch)
treece319add01c7e47e8b2aa929ba99833867bc206c /menus.c
parenta33693b1048b5893868b470d93e70ee35c4ef3d9 (diff)
inc/dec burst count faster if encoder rotated fasterINSTRUMENT_6_0_2c
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/menus.c b/menus.c
index c910210..9acdaeb 100644
--- a/menus.c
+++ b/menus.c
@@ -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]) {