[chronojump] encoder modes default to linear



commit aec070ca46bdea3229735693ad0df6d7ca1093e2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Nov 17 14:09:12 2013 +0100

    encoder modes default to linear

 src/gui/encoder.cs |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 919e6de..a8e5c86 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -635,17 +635,15 @@ public partial class ChronoJumpWindow
                        checkbutton_encoder_capture_inertial.Active = false;
                                
        
-               if(str == Constants.EncoderSignalMode.LINEAR.ToString()) {
-                       radiobutton_encoder_capture_linear.Active = true;
-                       checkbutton_encoder_capture_inverted.Active = false;
-               }
-               else if(str == Constants.EncoderSignalMode.LINEARINVERTED.ToString()) {
+               if(str == Constants.EncoderSignalMode.LINEARINVERTED.ToString()) {
                        radiobutton_encoder_capture_linear.Active = true;
                        checkbutton_encoder_capture_inverted.Active = true;
-               }
-               else { //(str == Constants.EncoderSignalMode.ROTARY.ToString())
+               } else if(str == Constants.EncoderSignalMode.ROTARY.ToString()) {
                        radiobutton_encoder_capture_rotary.Active = true;
                        checkbutton_encoder_capture_inverted.Active = false;
+               } else { //default to linear: (str == Constants.EncoderSignalMode.LINEAR.ToString()) 
+                       radiobutton_encoder_capture_linear.Active = true;
+                       checkbutton_encoder_capture_inverted.Active = false;
                }
 
                //TODO: fix this to use diameter if needed


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]