[chronojump] Implementing encoder configurations



commit 328f1500a1ad09715243d50ace060fb3b3b7f166
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jan 23 14:03:15 2014 +0100

    Implementing encoder configurations

 glade/chronojump.glade |  529 +++++++++++++++++++++++++++++++++++++++++++++++-
 src/encoder.cs         |  124 ++++++++++--
 src/gui/encoder.cs     |   21 ++-
 3 files changed, 647 insertions(+), 27 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index a552bd8..97ca061 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6244,6 +6244,18 @@ Second Chronopic to platforms.</property>
                                                         <child>
                                                           <placeholder/>
                                                         </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
@@ -6870,6 +6882,18 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -7632,6 +7656,18 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -8153,6 +8189,18 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -11961,7 +12009,6 @@ on current Chronojump version.</property>
                                             <property name="can_focus">False</property>
                                             <child>
                                               <widget class="GtkHBox" id="hbox117">
-                                                <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
                                                 <property name="border_width">6</property>
                                                 <property name="spacing">4</property>
@@ -17367,6 +17414,18 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -17796,6 +17855,18 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -18668,6 +18739,30 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -21151,6 +21246,7 @@ comments</property>
               <widget class="GtkHBox" id="hbox4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="spacing">8</property>
                 <child>
                   <widget class="GtkImage" id="image_encoder_configuration">
                     <property name="width_request">300</property>
@@ -21253,30 +21349,315 @@ comments</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkTextView" id="textview1">
+                      <widget class="GtkButton" id="button_select">
+                        <property name="label" translatable="yes">Select</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
                       </widget>
                       <packing>
-                        <property name="expand">True</property>
+                        <property name="expand">False</property>
                         <property name="fill">True</property>
+                        <property name="pack_type">end</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="button_select">
-                        <property name="label" translatable="yes">Select</property>
+                      <widget class="GtkVBox" id="vbox2">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">8</property>
+                        <child>
+                          <widget class="GtkHBox" id="hbox_d">
+                            <property name="can_focus">False</property>
+                            <property name="spacing">8</property>
+                            <child>
+                              <widget class="GtkLabel" id="label2">
+                                <property name="width_request">20</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label">d</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spin_d">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <property name="adjustment">4 0 80 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="digits">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">if-valid</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label6">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">cm</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox_d2">
+                            <property name="can_focus">False</property>
+                            <property name="spacing">8</property>
+                            <child>
+                              <widget class="GtkLabel" id="label3">
+                                <property name="width_request">20</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label">d2</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spin_d1">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <property name="adjustment">4 0 80 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="digits">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">if-valid</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">cm</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox_angle">
+                            <property name="can_focus">False</property>
+                            <property name="spacing">8</property>
+                            <child>
+                              <widget class="GtkLabel" id="label4">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">angle</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spin_angle">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">●</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <property name="adjustment">4 0 80 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="digits">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">if-valid</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label8">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">º</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox_inertia">
+                            <property name="can_focus">False</property>
+                            <property name="spacing">4</property>
+                            <child>
+                              <widget class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Inertia</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spin_encoder_capture_inertial">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip">Inertia Momentum</property>
+                                <property name="invisible_char">●</property>
+                                <property name="invisible_char_set">True</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
+                                <property name="adjustment">100 0 5000 1 10 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label9">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">Kg*cm^2</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="bottom_padding">8</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox_inertia2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <child>
+                                  <widget class="GtkButton" id="button_encoder_capture_inertial">
+                                    <property name="label" translatable="yes">Calcule IM</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="has_tooltip">True</property>
+                                    <property name="tooltip" translatable="yes">Calcule inertial 
momentum</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="pack_type">end</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
                       </widget>
                       <packing>
                         <property name="expand">False</property>
-                        <property name="fill">True</property>
+                        <property name="fill">False</property>
                         <property name="pack_type">end</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
+                    <child>
+                      <widget class="GtkTextView" id="textview">
+                        <property name="width_request">180</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="editable">False</property>
+                        <property name="wrap_mode">word</property>
+                      </widget>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
@@ -24500,6 +24881,78 @@ options</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -25500,6 +25953,18 @@ options</property>
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -25988,6 +26453,18 @@ options</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -27662,6 +28139,18 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -27755,6 +28244,18 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -27863,6 +28364,18 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/encoder.cs b/src/encoder.cs
index eb27282..3e4aea8 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -604,80 +604,145 @@ public class EncoderModeSelectionList
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.LINEAR.ToString(),
                                        Constants.FileNameEncoderLinearFreeWeight,
-                                       "Text for normal linear encoder"); 
+                                       "Linear encoder attached to a barbell.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.LINEARINVERTED.ToString(),
                                        Constants.FileNameEncoderLinearFreeWeightInv,
-                                       "Text for inverted linear encoder"); 
+                                       "Linear encoder inverted attached to a barbell.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       );
                        list.Add(enc);
                        
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.LINEARINERTIAL.ToString(),
                                        Constants.FileNameEncoderLinearInertial,
-                                       "Linear encoder on inertial machine. NOT Recommended!"); 
+                                       "Linear encoder on inertia machine. NOT Recommended!",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       true    //inertia
+                                       );      
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYLINEARONPERSON1.ToString(),
                                        Constants.FileNameEncoderWeightedMovPulleyOnPerson1,
-                                       ""); 
+                                       "Linear encoder attached to a barbell. Barbell is connected to a 
weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYLINEARONPERSON1INV.ToString(),
                                        Constants.FileNameEncoderWeightedMovPulleyOnPerson1Inv,
-                                       "Inverted"); 
+                                       "Linear encoder inverted attached to a barbell. Barbell is connected 
to a weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYLINEARONPERSON2.ToString(),
                                        Constants.FileNameEncoderWeightedMovPulleyOnPerson2,
-                                       ""); 
+                                       "Linear encoder attached to a barbell. Barbell is connected to a 
fixed pulley that is connected to a weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYLINEARONPERSON2INV.ToString(),
                                        Constants.FileNameEncoderWeightedMovPulleyOnPerson2Inv,
-                                       "Inverted"); 
+                                       "Linear encoder inverted attached to a barbell. Barbell is connected 
to a fixed pulley that is connected to a weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYONLINEARENCODER.ToString(),
                                        Constants.FileNameEncoderWeightedMovPulleyOnLinearEncoder,
-                                       ""); 
+                                       "Linear encoder attached to a weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.LINEARONPLANE.ToString(),
                                        Constants.FileNameEncoderLinearOnPlane,
-                                       ""); 
+                                       "Linear encoder on a inclinated plane.",
+                                       false,  //d
+                                       false,  //d2
+                                       true,   //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
                }
                else if(type == "rotary-friction") {
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.ROTARYFRICTIONSIDE.ToString(),
                                        Constants.FileNameEncoderFrictionSide,
-                                       ""); 
+                                       "Rotary friction encoder on pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.ROTARYFRICTIONAXIS.ToString(),
                                        Constants.FileNameEncoderFrictionAxis ,
-                                       ""); 
+                                       "Rotary friction encoder on pulley axis.",
+                                       true,   //d
+                                       true,   //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.ROTARYFRICTIONINERTIAL.ToString(),
                                        Constants.FileNameEncoderFrictionInertial ,
-                                       ""); 
+                                       "Rotary friction encoder on inertial machine.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       true    //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYROTARYFRICTION.ToString(),
                                        Constants.FileNameEncoderFrictionWithMovPulley ,
-                                       ""); 
+                                       "Rotary friction encoder on weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                }
@@ -685,19 +750,34 @@ public class EncoderModeSelectionList
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.ROTARYAXIS.ToString(),
                                        Constants.FileNameEncoderRotaryAxisOnAxis ,
-                                       ""); 
+                                       "Rotary axis encoder on pulley axis.",
+                                       true,   //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.ROTARYAXISINERTIAL.ToString(),
                                        Constants.FileNameEncoderAxisInertial ,
-                                       ""); 
+                                       "Rotary axis encoder on inertial machine.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       true    //inertia
+                                       ); 
                        list.Add(enc);
 
                        enc = new EncoderModeSelection(
                                        Constants.EncoderMode.WEIGHTEDMOVPULLEYROTARYAXIS.ToString(),
                                        Constants.FileNameEncoderAxisWithMovPulley ,
-                                       ""); 
+                                       "Rotary axis encoder on weighted moving pulley.",
+                                       false,  //d
+                                       false,  //d2
+                                       false,  //angle
+                                       false   //inertia
+                                       ); 
                        list.Add(enc);
                }
        }
@@ -707,13 +787,23 @@ public class EncoderModeSelection {
        public string encoderMode;
        public string image;
        public string text;
+       public bool d;
+       public bool d2;
+       public bool angle;
+       public bool inertia;
        
        public EncoderModeSelection() {
        }
 
-       public EncoderModeSelection(string encoderMode, string image, string text) {
+       public EncoderModeSelection(
+                       string encoderMode, string image, string text,
+                       bool d, bool d2, bool angle, bool inertia) {
                this.encoderMode = encoderMode;
                this.image = image;
                this.text = text;
+               this.d = d;
+               this.d2 = d2;
+               this.angle = angle;
+               this.inertia = inertia;
        }
 }
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 4577243..a371e37 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -4605,6 +4605,12 @@ public class EncoderConfigurationWindow {
        [Widget] Gtk.RadioButton radio_rotary_friction;
        [Widget] Gtk.RadioButton radio_rotary_axis;
        [Widget] Gtk.Label label_count;
+       [Widget] Gtk.TextView textview;
+       [Widget] Gtk.Box hbox_d;
+       [Widget] Gtk.Box hbox_d2;
+       [Widget] Gtk.Box hbox_angle;
+       [Widget] Gtk.Box hbox_inertia;
+       [Widget] Gtk.Box hbox_inertia2;
 
        static EncoderConfigurationWindow EncoderConfigurationWindowBox;
        
@@ -4681,9 +4687,20 @@ public class EncoderConfigurationWindow {
        }
        
        private void updateImageAndConfigurationGUI() {
-               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
-                               ( (EncoderModeSelection) list[listCurrent]).image);
+               EncoderModeSelection sel = (EncoderModeSelection) list[listCurrent];
+               
+               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + sel.image);
                image_encoder_configuration.Pixbuf = pixbuf;
+                       
+               TextBuffer tb1 = new TextBuffer (new TextTagTable());
+               tb1.Text = sel.text;
+               textview.Buffer = tb1;
+               
+               hbox_d.Visible = sel.d;
+               hbox_d2.Visible = sel.d2;
+               hbox_angle.Visible = sel.angle;
+               hbox_inertia.Visible = sel.inertia;
+               hbox_inertia2.Visible = sel.inertia;
                
                label_count.Text = (listCurrent + 1).ToString() + " / " + list.Count.ToString();
        }



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