[chronojump] Encoder capture tab show force on realtime plot and works with bells



commit d88387ff48f73da129f7a920527dab7ee5b563a2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Apr 10 19:07:44 2015 +0200

    Encoder capture tab show force on realtime plot and works with bells

 glade/chronojump.glade          |  779 +++++++++++++++++++++++++++++++++------
 src/constants.cs                |    2 +
 src/encoder.cs                  |   10 +-
 src/gui/encoder.cs              |  145 ++------
 src/gui/encoderTreeviews.cs     |   26 ++-
 src/gui/repetitiveConditions.cs |   74 ++++-
 6 files changed, 810 insertions(+), 226 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index dcb0daa..e93ffb9 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6695,6 +6695,12 @@ Second Chronopic to platforms.</property>
                                                         <child>
                                                           <placeholder/>
                                                         </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
+                                                        <child>
+                                                          <placeholder/>
+                                                        </child>
                                                       </widget>
                                                       <packing>
                                                         <property name="expand">True</property>
@@ -7578,6 +7584,12 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             <child>
@@ -8713,6 +8725,12 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">2</property>
@@ -9489,6 +9507,12 @@ Second Chronopic to platforms.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="position">4</property>
@@ -20319,6 +20343,12 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -21003,6 +21033,12 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -22179,6 +22215,12 @@ by you</property>
               <placeholder/>
             </child>
             <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
               <widget class="GtkButton" id="button_video_url">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -22412,6 +22454,12 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -32455,6 +32503,42 @@ 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>
                           </widget>
                         </child>
                       </widget>
@@ -34519,6 +34603,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                 <child>
                                   <placeholder/>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
                               </widget>
                             </child>
                           </widget>
@@ -35241,6 +35331,12 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -37929,6 +38025,12 @@ show elevation as:</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -38277,6 +38379,12 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -38640,6 +38748,12 @@ show elevation as:</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -40856,7 +40970,7 @@ show elevation as:</property>
                           <widget class="GtkTable" id="table_encoder_conditions_good">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="n_rows">5</property>
+                            <property name="n_rows">10</property>
                             <property name="n_columns">4</property>
                             <property name="column_spacing">8</property>
                             <property name="row_spacing">12</property>
@@ -40878,8 +40992,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -40893,8 +41007,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                               </packing>
                             </child>
                             <child>
@@ -40935,8 +41049,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                               </packing>
                             </child>
                             <child>
@@ -40948,8 +41062,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                               </packing>
                             </child>
                             <child>
@@ -40970,8 +41084,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -40985,8 +41099,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -40999,22 +41113,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="x_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label3">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
-                                <property name="label" translatable="yes">&lt;b&gt;Mean speed&lt;/b&gt; 
(m/s)</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -41027,8 +41127,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -41041,8 +41141,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                               </packing>
                             </child>
                             <child>
@@ -41054,8 +41154,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                               </packing>
                             </child>
                             <child>
@@ -41077,8 +41177,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41092,7 +41192,7 @@ show elevation as:</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">10 0 10 0.10000000000000001 1 0</property>
+                                <property name="adjustment">2 0 10 0.10000000000000001 1 0</property>
                                 <property name="climb_rate">1</property>
                                 <property name="digits">2</property>
                                 <property name="snap_to_ticks">True</property>
@@ -41102,8 +41202,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41146,8 +41246,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                               </packing>
                             </child>
                             <child>
@@ -41188,8 +41288,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                               </packing>
                             </child>
                             <child>
@@ -41230,8 +41330,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                               </packing>
                             </child>
                             <child>
@@ -41318,6 +41418,240 @@ show elevation as:</property>
                                 <property name="right_attach">4</property>
                               </packing>
                             </child>
+                            <child>
+                              <widget class="GtkLabel" id="label27">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Mean force&lt;/b&gt; 
(N)</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label28">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">&gt;=</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spinbutton_encoder_mean_force_higher">
+                                <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">200 0 5000 10 1 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options"/>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="checkbutton_encoder_mean_force_higher">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip" translatable="yes">Bell good</property>
+                                <property name="draw_indicator">True</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment14">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox24">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image_encoder_mean_force_higher">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">3</property>
+                                <property name="right_attach">4</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label29">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Max force&lt;/b&gt; 
(N)</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label30">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">&gt;=</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spinbutton_encoder_max_force_higher">
+                                <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">400 0 5000 10 1 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                                <property name="x_options"/>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="checkbutton_encoder_max_force_higher">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip" translatable="yes">Bell good</property>
+                                <property name="draw_indicator">True</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment15">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox25">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image_encoder_max_force_higher">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">3</property>
+                                <property name="right_attach">4</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label3">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="yalign">0</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Mean speed&lt;/b&gt; 
(m/s)</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </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>
                           <packing>
                             <property name="expand">True</property>
@@ -41340,7 +41674,7 @@ show elevation as:</property>
                           <widget class="GtkTable" id="table_encoder_conditions_bad">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="n_rows">5</property>
+                            <property name="n_rows">10</property>
                             <property name="n_columns">4</property>
                             <property name="column_spacing">8</property>
                             <property name="row_spacing">12</property>
@@ -41382,8 +41716,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41426,8 +41760,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                               </packing>
                             </child>
                             <child>
@@ -41448,8 +41782,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                                 <property name="x_options">GTK_SHRINK</property>
                                 <property name="y_options"/>
                               </packing>
@@ -41463,7 +41797,7 @@ show elevation as:</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 20 5000 10 1 0</property>
+                                <property name="adjustment">400 20 5000 10 1 0</property>
                                 <property name="climb_rate">1</property>
                                 <property name="snap_to_ticks">True</property>
                                 <property name="numeric">True</property>
@@ -41472,8 +41806,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41487,8 +41821,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                               </packing>
                             </child>
                             <child>
@@ -41500,8 +41834,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -41514,8 +41848,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
+                                <property name="top_attach">9</property>
+                                <property name="bottom_attach">10</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -41528,8 +41862,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -41542,8 +41876,8 @@ show elevation as:</property>
                                 <property name="use_markup">True</property>
                               </widget>
                               <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options">GTK_FILL</property>
                               </packing>
                             </child>
@@ -41556,8 +41890,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
+                                <property name="top_attach">8</property>
+                                <property name="bottom_attach">9</property>
                               </packing>
                             </child>
                             <child>
@@ -41569,8 +41903,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                               </packing>
                             </child>
                             <child>
@@ -41582,8 +41916,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                               </packing>
                             </child>
                             <child>
@@ -41605,8 +41939,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41620,7 +41954,7 @@ show elevation as:</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">10 0 10 0.10000000000000001 1 0</property>
+                                <property name="adjustment">2 0 10 0.10000000000000001 1 0</property>
                                 <property name="climb_rate">1</property>
                                 <property name="digits">2</property>
                                 <property name="snap_to_ticks">True</property>
@@ -41630,8 +41964,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">2</property>
                                 <property name="right_attach">3</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41674,8 +42008,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41718,8 +42052,8 @@ show elevation as:</property>
                               <packing>
                                 <property name="left_attach">3</property>
                                 <property name="right_attach">4</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options"/>
                                 <property name="y_options"/>
                               </packing>
@@ -41808,6 +42142,230 @@ show elevation as:</property>
                                 <property name="right_attach">4</property>
                               </packing>
                             </child>
+                            <child>
+                              <widget class="GtkLabel" id="label31">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Mean force&lt;/b&gt; 
(N)</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label32">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">&lt;b&gt;Max force&lt;/b&gt; 
(N)</property>
+                                <property name="use_markup">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                                <property name="x_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label33">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">&lt;=</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label34">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">&lt;=</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spinbutton_encoder_mean_force_lower">
+                                <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">200 0 5000 10 1 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options"/>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkSpinButton" id="spinbutton_encoder_max_force_lower">
+                                <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">400 0 5000 10 1 0</property>
+                                <property name="climb_rate">1</property>
+                                <property name="snap_to_ticks">True</property>
+                                <property name="numeric">True</property>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">2</property>
+                                <property name="right_attach">3</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                                <property name="x_options"/>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="checkbutton_encoder_mean_force_lower">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip" translatable="yes">Bell bad</property>
+                                <property name="draw_indicator">True</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment16">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox26">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image_encoder_mean_force_lower">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">3</property>
+                                <property name="right_attach">4</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                                <property name="x_options"/>
+                                <property name="y_options"/>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="checkbutton_encoder_max_force_lower">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="has_tooltip">True</property>
+                                <property name="tooltip" translatable="yes">Bell bad</property>
+                                <property name="draw_indicator">True</property>
+                                <child>
+                                  <widget class="GtkAlignment" id="alignment17">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="xscale">0</property>
+                                    <property name="yscale">0</property>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox27">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">2</property>
+                                        <child>
+                                          <widget class="GtkImage" id="image_encoder_max_force_lower">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                    </child>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">3</property>
+                                <property name="right_attach">4</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
+                                <property name="x_options"/>
+                                <property name="y_options"/>
+                              </packing>
+                            </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>
                           <packing>
                             <property name="expand">True</property>
@@ -44074,20 +44632,47 @@ suitable for agility tests and RSA)</property>
       <widget class="GtkVBox" id="vbox6">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="spacing">8</property>
+        <property name="spacing">10</property>
         <child>
           <widget class="GtkHBox" id="hbox1">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="spacing">12</property>
             <child>
-              <widget class="GtkCheckButton" id="checkbutton_show_data_encoder">
-                <property name="label" translatable="yes">Show data of encoder tests</property>
+              <widget class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="draw_indicator">True</property>
-                <signal name="toggled" handler="on_checkbutton_show_data_encoder_toggled" swapped="no"/>
+                <property name="can_focus">False</property>
+                <property name="spacing">4</property>
+                <child>
+                  <widget class="GtkCheckButton" id="checkbutton_show_data_jump_run">
+                    <property name="label" translatable="yes">Show data of jump and run tests</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_checkbutton_show_data_jump_run_toggled" swapped="no"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkCheckButton" id="checkbutton_show_data_encoder">
+                    <property name="label" translatable="yes">Show data of encoder tests</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="draw_indicator">True</property>
+                    <signal name="toggled" handler="on_checkbutton_show_data_encoder_toggled" swapped="no"/>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">end</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
               </widget>
               <packing>
                 <property name="expand">False</property>
@@ -44096,22 +44681,6 @@ suitable for agility tests and RSA)</property>
                 <property name="position">0</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkCheckButton" id="checkbutton_show_data_jump_run">
-                <property name="label" translatable="yes">Show data of jump and run tests</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="draw_indicator">True</property>
-                <signal name="toggled" handler="on_checkbutton_show_data_jump_run_toggled" swapped="no"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="pack_type">end</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
           </widget>
           <packing>
             <property name="expand">False</property>
diff --git a/src/constants.cs b/src/constants.cs
index 0bc592e..21cc26e 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -796,6 +796,8 @@ public class Constants
 
        public static string MeanSpeed = "Mean speed";
        public static string MaxSpeed = "Max speed";
+       public static string MeanForce = "Mean force";
+       public static string MaxForce = "Max force";
        public static string MeanPower = "Mean power";
        public static string PeakPower = "Peak power";
                
diff --git a/src/encoder.cs b/src/encoder.cs
index b5565a2..748d9c7 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -845,12 +845,16 @@ public class EncoderCaptureCurveArray {
 public class EncoderBarsData {
        public double MeanSpeed;
        public double MaxSpeed;
+       public double MeanForce;
+       public double MaxForce;
        public double MeanPower;
        public double PeakPower;
        
-       public EncoderBarsData(double meanSpeed, double maxSpeed, double meanPower, double peakPower) {
+       public EncoderBarsData(double meanSpeed, double maxSpeed, double meanForce, double maxForce, double 
meanPower, double peakPower) {
                this.MeanSpeed = meanSpeed;
                this.MaxSpeed  = maxSpeed;
+               this.MeanForce = meanForce;
+               this.MaxForce  = maxForce;
                this.MeanPower = meanPower;
                this.PeakPower = peakPower;
        }
@@ -860,6 +864,10 @@ public class EncoderBarsData {
                        return MeanSpeed;
                else if(option == Constants.MaxSpeed)
                        return MaxSpeed;
+               else if(option == Constants.MeanForce)
+                       return MeanForce;
+               else if(option == Constants.MaxForce)
+                       return MaxForce;
                else if(option == Constants.MeanPower)
                        return MeanPower;
                else // option == Constants.PeakPower
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 69115e5..5d237c9 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -428,117 +428,23 @@ public partial class ChronoJumpWindow
                if(! encoderCheckPort())
                        return;
 
-               /*
-                * DEPRECATED
-               string analysisOptions = getEncoderAnalysisOptions();
-
-               double heightHigherCondition = -1;
-               if(repetitiveConditionsWin.EncoderHeightHigher)         
-                       heightHigherCondition = repetitiveConditionsWin.EncoderHeightHigherValue;
-               double heightLowerCondition = -1;
-               if(repetitiveConditionsWin.EncoderHeightLower)          
-                       heightLowerCondition = repetitiveConditionsWin.EncoderHeightLowerValue;
-       
-               double meanSpeedHigherCondition = -1;
-               if(repetitiveConditionsWin.EncoderMeanSpeedHigher)              
-                       meanSpeedHigherCondition = repetitiveConditionsWin.EncoderMeanSpeedHigherValue;
-               double meanSpeedLowerCondition = -1;
-               if(repetitiveConditionsWin.EncoderMeanSpeedLower)               
-                       meanSpeedLowerCondition = repetitiveConditionsWin.EncoderMeanSpeedLowerValue;
-       
-               double maxSpeedHigherCondition = -1;
-               if(repetitiveConditionsWin.EncoderMaxSpeedHigher)               
-                       maxSpeedHigherCondition = repetitiveConditionsWin.EncoderMaxSpeedHigherValue;
-               double maxSpeedLowerCondition = -1;
-               if(repetitiveConditionsWin.EncoderMaxSpeedLower)                
-                       maxSpeedLowerCondition = repetitiveConditionsWin.EncoderMaxSpeedLowerValue;
-       
-               int powerHigherCondition = -1;
-               if(repetitiveConditionsWin.EncoderPowerHigher)          
-                       powerHigherCondition = repetitiveConditionsWin.EncoderPowerHigherValue;
-               int powerLowerCondition = -1;
-               if(repetitiveConditionsWin.EncoderPowerLower)           
-                       powerLowerCondition = repetitiveConditionsWin.EncoderPowerLowerValue;
-               
-               int peakPowerHigherCondition = -1;
-               if(repetitiveConditionsWin.EncoderPeakPowerHigher)              
-                       peakPowerHigherCondition = repetitiveConditionsWin.EncoderPeakPowerHigherValue;
-               int peakPowerLowerCondition = -1;
-               if(repetitiveConditionsWin.EncoderPeakPowerLower)               
-                       peakPowerLowerCondition = repetitiveConditionsWin.EncoderPeakPowerLowerValue;
+               //This notebook has capture (signal plotting), and curves (shows R graph)       
+               if(notebook_encoder_capture.CurrentPage == 1)
+                       notebook_encoder_capture.PrevPage();
 
-               string exerciseNameShown = UtilGtk.ComboGetActive(combo_encoder_exercise);
+               radiobutton_video_encoder_capture.Active = true;
 
-               //capture data (Python)
-               EncoderParams ep = new EncoderParams(
-                               (int) encoderCaptureOptionsWin.spin_encoder_capture_time.Value, 
-                               (int) encoderCaptureOptionsWin.spin_encoder_capture_min_height.Value, 
-                               getExercisePercentBodyWeightFromCombo (),
-                               Util.ConvertToPoint(findMass(Constants.MassType.DISPLACED)),
-                               Util.ConvertToPoint(encoderSmoothCon),                  //R decimal: '.'
-                               findEccon(true),                                        //force ecS (ecc-conc 
separated)
-                               analysisOptions,
-                               heightHigherCondition, heightLowerCondition,
-                               meanSpeedHigherCondition, meanSpeedLowerCondition,
-                               maxSpeedHigherCondition, maxSpeedLowerCondition,
-                               powerHigherCondition, powerLowerCondition,
-                               peakPowerHigherCondition, peakPowerLowerCondition,
-                               encoderCaptureOptionsWin.GetMainVariable()//,
-                               //checkbutton_encoder_capture_inverted.Active
-                               ); 
+               sensitiveGuiEventDoing();
 
-               EncoderStruct es = new EncoderStruct(
-                               "",                                     //no data input
-                               "",                                     //no graph ouptut
-                               UtilEncoder.GetEncoderDataTempFileName(),       //OutputData1
-                               "",                                     //OutputData2
-                               "",                                     //SpecialData
-                               ep);                            
-                               
-               //Update inertia momentum of encoder if needed
-               //SqlitePreferences.Update("inertialmomentum", 
-               //              Util.ConvertToPoint((double) spin_encoder_capture_inertial.Value), false);
+               LogB.Debug("Calling encoderThreadStart for capture");
 
-               if (encoderCaptureOptionsWin.radiobutton_encoder_capture_external.Active) {
-                       encoderStartVideoRecord();
-               
-                       //wait to ensure label "Rec" has been shown
-                       //Thread.Sleep(100);    
-                       //Does not work. Basically it records, but Rec message is not shown because we would 
need to open a new thread here
-                       
-                       //title to sen to python software has to be without spaces
-                       UtilEncoder.RunEncoderCapturePython( 
-                                       Util.ChangeSpaceAndMinusForUnderscore(currentPerson.Name) + "----" + 
-                                       Util.ChangeSpaceAndMinusForUnderscore(exerciseNameShown) + "----(" + 
-                                       Util.ConvertToPoint(findMass(Constants.MassType.DISPLACED)) + "Kg)",
-                                       es, chronopicWin.GetEncoderPort());
-                       
-                       //entry_encoder_signal_comment.Text = "";
-                       
-                       encoderStopVideoRecord();
-                       
-                       encoderCalculeCurves(encoderActions.CAPTURE_EXTERNAL); //deprecated
-               }
-               else if (encoderCaptureOptionsWin.radiobutton_encoder_capture_safe.Active) {
-               */
-                       //tis notebook has capture (signal plotting), and curves (shows R graph)        
-                       if(notebook_encoder_capture.CurrentPage == 1)
-                               notebook_encoder_capture.PrevPage();
-                               
-                       radiobutton_video_encoder_capture.Active = true;
-                       
-                       sensitiveGuiEventDoing();
+               needToCallPrepareEncoderGraphs = false;
+               encoderProcessFinish = false;
+               encoderThreadStart(encoderActions.CAPTURE);
 
-                       LogB.Debug("Calling encoderThreadStart for capture");
-                       
-                       needToCallPrepareEncoderGraphs = false;
-                       encoderProcessFinish = false;
-                       encoderThreadStart(encoderActions.CAPTURE);
-                       
-                       textview_encoder_signal_comment.Buffer.Text = "";
+               textview_encoder_signal_comment.Buffer.Text = "";
 
-                       LogB.Debug("end of Calling encoderThreadStart for capture");
-               //}
+               LogB.Debug("end of Calling encoderThreadStart for capture");
        }
        
        void on_button_encoder_capture_calcule_im () 
@@ -4305,7 +4211,7 @@ public partial class ChronoJumpWindow
                                string mainVariable = encoderCaptureOptionsWin.GetMainVariable();
                                double mainVariableHigher = 
encoderCaptureOptionsWin.GetMainVariableHigher(mainVariable);
                                double mainVariableLower = 
encoderCaptureOptionsWin.GetMainVariableLower(mainVariable);
-                               captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, maxSpeed, meanPower, 
peakPower));
+                               captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, maxSpeed, 0, 0, 
meanPower, peakPower)); //0,0: meanForce, maxForce
 
                                plotCurvesGraphDoPlot(mainVariable, mainVariableHigher, mainVariableLower, 
captureCurvesBarsData, 
                                                true);  //capturing
@@ -4335,7 +4241,7 @@ public partial class ChronoJumpWindow
 
        //if we are capturing, play sounds
        void plotCurvesGraphDoPlot(string mainVariable, double mainVariableHigher, double mainVariableLower, 
-                       ArrayList data4Variables, bool capturing) 
+                       ArrayList data6Variables, bool capturing) 
        {
                //LogB.Information("at plotCurvesGraphDoPlot");
                UtilGtk.ErasePaint(encoder_capture_curves_bars_drawingarea, 
encoder_capture_curves_bars_pixmap);
@@ -4343,8 +4249,8 @@ public partial class ChronoJumpWindow
                int graphWidth=encoder_capture_curves_bars_drawingarea.Allocation.Width;
                int graphHeight=encoder_capture_curves_bars_drawingarea.Allocation.Height;
        
-               ArrayList data = new ArrayList (data4Variables.Count);
-               foreach(EncoderBarsData ebd in data4Variables)
+               ArrayList data = new ArrayList (data6Variables.Count);
+               foreach(EncoderBarsData ebd in data6Variables)
                        data.Add(ebd.GetValue(mainVariable));
 
 
@@ -4497,7 +4403,7 @@ public partial class ChronoJumpWindow
                        //write the result      
                        if(mainVariable == Constants.MeanSpeed || mainVariable == Constants.MaxSpeed)
                                layout_encoder_capture_curves_bars.SetMarkup(Util.TrimDecimals(d,2));
-                       else //powers
+                       else //force and powers
                                layout_encoder_capture_curves_bars.SetMarkup(Util.TrimDecimals(d,0));
                        
                        textWidth = 1;
@@ -4572,6 +4478,9 @@ public partial class ChronoJumpWindow
                if(mainVariable == Constants.MeanSpeed || mainVariable == Constants.MaxSpeed) {
                        units = "m/s";
                        decimals = 2;
+               } else if(mainVariable == Constants.MeanForce || mainVariable == Constants.MaxForce) {
+                       units = "N";
+                       decimals = 1;
                }
                else { //powers
                        units =  "W";
@@ -5231,9 +5140,11 @@ LogB.Debug("D");
 
                        double meanSpeed = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[2]));
                        double maxSpeed = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[3]));
+                       double meanForce = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[9]));
+                       double maxForce = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[10]));
                        double meanPower = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[5]));
                        double peakPower = Convert.ToDouble(Util.ChangeDecimalSeparator(strs[6]));
-                       captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, maxSpeed, meanPower, 
peakPower));
+                       captureCurvesBarsData.Add(new EncoderBarsData(meanSpeed, maxSpeed, meanForce, 
maxForce, meanPower, peakPower));
                        
                        LogB.Information("activating needToRefreshTreeviewCapture");
 
@@ -5557,6 +5468,8 @@ LogB.Debug("D");
                                        captureCurvesBarsData.Add(new EncoderBarsData(
                                                                Convert.ToDouble(curve.MeanSpeed), 
                                                                Convert.ToDouble(curve.MaxSpeed), 
+                                                               Convert.ToDouble(curve.MeanForce), 
+                                                               Convert.ToDouble(curve.MaxForce), 
                                                                Convert.ToDouble(curve.MeanPower), 
                                                                Convert.ToDouble(curve.PeakPower)
                                                                ));
@@ -5966,7 +5879,7 @@ public class EncoderCaptureOptionsWindow {
 
        private void createCombo() {
                combo_main_variable = ComboBox.NewText ();
-               string [] values = { Constants.MeanSpeed, Constants.MaxSpeed, Constants.MeanPower, 
Constants.PeakPower };
+               string [] values = { Constants.MeanSpeed, Constants.MaxSpeed, Constants.MeanForce, 
Constants.MaxForce, Constants.MeanPower, Constants.PeakPower };
                UtilGtk.ComboUpdate(combo_main_variable, values, "");
                combo_main_variable.Active = UtilGtk.ComboMakeActive(combo_main_variable, "Mean power");
                
@@ -5986,6 +5899,10 @@ public class EncoderCaptureOptionsWindow {
                                return repetitiveConditionsWin.EncoderMeanSpeedHigherValue;
                        else if(mainVariable == Constants.MaxSpeed && 
repetitiveConditionsWin.EncoderMaxSpeedHigher)
                                return repetitiveConditionsWin.EncoderMaxSpeedHigherValue;
+                       else if(mainVariable == Constants.MeanForce && 
repetitiveConditionsWin.EncoderMeanForceHigher)
+                               return repetitiveConditionsWin.EncoderMeanForceHigherValue;
+                       else if(mainVariable == Constants.MaxForce && 
repetitiveConditionsWin.EncoderMaxForceHigher)
+                               return repetitiveConditionsWin.EncoderMaxForceHigherValue;
                        else if(mainVariable == Constants.MeanPower && 
repetitiveConditionsWin.EncoderPowerHigher)
                                return repetitiveConditionsWin.EncoderPowerHigherValue;
                        else if(mainVariable == Constants.PeakPower && 
repetitiveConditionsWin.EncoderPeakPowerHigher)
@@ -6002,6 +5919,10 @@ public class EncoderCaptureOptionsWindow {
                                return repetitiveConditionsWin.EncoderMeanSpeedLowerValue;
                        else if(mainVariable == Constants.MaxSpeed && 
repetitiveConditionsWin.EncoderMaxSpeedLower)
                                return repetitiveConditionsWin.EncoderMaxSpeedLowerValue;
+                       else if(mainVariable == Constants.MeanForce && 
repetitiveConditionsWin.EncoderMeanForceLower)
+                               return repetitiveConditionsWin.EncoderMeanForceLowerValue;
+                       else if(mainVariable == Constants.MaxForce && 
repetitiveConditionsWin.EncoderMaxForceLower)
+                               return repetitiveConditionsWin.EncoderMaxForceLowerValue;
                        else if(mainVariable == Constants.MeanPower && 
repetitiveConditionsWin.EncoderPowerLower)
                                return repetitiveConditionsWin.EncoderPowerLowerValue;
                        else if(mainVariable == Constants.PeakPower && 
repetitiveConditionsWin.EncoderPeakPowerLower)
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index d9d2068..2dda555 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -1018,15 +1018,37 @@ public partial class ChronoJumpWindow
        private void RenderMeanForce (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
+               string myColor = assignColor(
+                               Convert.ToDouble(curve.MeanForce),
+                               repetitiveConditionsWin.EncoderMeanForceHigher, 
+                               repetitiveConditionsWin.EncoderMeanForceLower, 
+                               repetitiveConditionsWin.EncoderMeanForceHigherValue,
+                               repetitiveConditionsWin.EncoderMeanForceLowerValue);
+               if(myColor != "")
+                       (cell as Gtk.CellRendererText).Foreground = myColor;
+               else
+                       (cell as Gtk.CellRendererText).Foreground = null;       //will show default color
+
                (cell as Gtk.CellRendererText).Text = 
-                       
String.Format(UtilGtk.TVNumPrint(curve.MeanPower,7,1),Convert.ToDouble(curve.MeanForce));
+                       
String.Format(UtilGtk.TVNumPrint(curve.MeanForce,7,1),Convert.ToDouble(curve.MeanForce));
        }
 
        private void RenderMaxForce (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
+               string myColor = assignColor(
+                               Convert.ToDouble(curve.MaxForce),
+                               repetitiveConditionsWin.EncoderMaxForceHigher, 
+                               repetitiveConditionsWin.EncoderMaxForceLower, 
+                               repetitiveConditionsWin.EncoderMaxForceHigherValue,
+                               repetitiveConditionsWin.EncoderMaxForceLowerValue);
+               if(myColor != "")
+                       (cell as Gtk.CellRendererText).Foreground = myColor;
+               else
+                       (cell as Gtk.CellRendererText).Foreground = null;       //will show default color
+
                (cell as Gtk.CellRendererText).Text = 
-                       
String.Format(UtilGtk.TVNumPrint(curve.MeanPower,7,1),Convert.ToDouble(curve.MaxForce));
+                       
String.Format(UtilGtk.TVNumPrint(curve.MaxForce,7,1),Convert.ToDouble(curve.MaxForce));
        }
        
        private void RenderMaxForceT (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 622bb0d..658e6f6 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -70,21 +70,29 @@ public class RepetitiveConditionsWindow
        /* encoder */
        [Widget] Gtk.Box hbox_encoder_conditions;
        [Widget] Gtk.CheckButton checkbutton_encoder_height_higher;
+       [Widget] Gtk.CheckButton checkbutton_encoder_height_lower;
        [Widget] Gtk.CheckButton checkbutton_encoder_mean_speed_higher;
        [Widget] Gtk.CheckButton checkbutton_encoder_max_speed_higher;
-       [Widget] Gtk.CheckButton checkbutton_encoder_height_lower;
        [Widget] Gtk.CheckButton checkbutton_encoder_mean_speed_lower;
        [Widget] Gtk.CheckButton checkbutton_encoder_max_speed_lower;
+       [Widget] Gtk.CheckButton checkbutton_encoder_mean_force_higher;
+       [Widget] Gtk.CheckButton checkbutton_encoder_max_force_higher;
+       [Widget] Gtk.CheckButton checkbutton_encoder_mean_force_lower;
+       [Widget] Gtk.CheckButton checkbutton_encoder_max_force_lower;
+       [Widget] Gtk.CheckButton checkbutton_encoder_power_higher;
+       [Widget] Gtk.CheckButton checkbutton_encoder_peakpower_higher;
+       [Widget] Gtk.CheckButton checkbutton_encoder_power_lower;
+       [Widget] Gtk.CheckButton checkbutton_encoder_peakpower_lower;
        [Widget] Gtk.SpinButton spinbutton_encoder_height_higher;
+       [Widget] Gtk.SpinButton spinbutton_encoder_height_lower;
        [Widget] Gtk.SpinButton spinbutton_encoder_mean_speed_higher;
        [Widget] Gtk.SpinButton spinbutton_encoder_max_speed_higher;
-       [Widget] Gtk.SpinButton spinbutton_encoder_height_lower;
        [Widget] Gtk.SpinButton spinbutton_encoder_mean_speed_lower;
        [Widget] Gtk.SpinButton spinbutton_encoder_max_speed_lower;
-       [Widget] Gtk.CheckButton checkbutton_encoder_power_higher;
-       [Widget] Gtk.CheckButton checkbutton_encoder_peakpower_higher;
-       [Widget] Gtk.CheckButton checkbutton_encoder_power_lower;
-       [Widget] Gtk.CheckButton checkbutton_encoder_peakpower_lower;
+       [Widget] Gtk.SpinButton spinbutton_encoder_mean_force_higher;
+       [Widget] Gtk.SpinButton spinbutton_encoder_max_force_higher;
+       [Widget] Gtk.SpinButton spinbutton_encoder_mean_force_lower;
+       [Widget] Gtk.SpinButton spinbutton_encoder_max_force_lower;
        [Widget] Gtk.SpinButton spinbutton_encoder_power_higher;
        [Widget] Gtk.SpinButton spinbutton_encoder_peakpower_higher;
        [Widget] Gtk.SpinButton spinbutton_encoder_power_lower;
@@ -109,6 +117,8 @@ public class RepetitiveConditionsWindow
        [Widget] Gtk.Image image_encoder_height_higher;
        [Widget] Gtk.Image image_encoder_mean_speed_higher;
        [Widget] Gtk.Image image_encoder_max_speed_higher;
+       [Widget] Gtk.Image image_encoder_mean_force_higher;
+       [Widget] Gtk.Image image_encoder_max_force_higher;
        [Widget] Gtk.Image image_encoder_power_higher;
        [Widget] Gtk.Image image_encoder_peakpower_higher;
        [Widget] Gtk.Image image_repetitive_test_good;
@@ -123,6 +133,8 @@ public class RepetitiveConditionsWindow
        [Widget] Gtk.Image image_encoder_height_lower;
        [Widget] Gtk.Image image_encoder_mean_speed_lower;
        [Widget] Gtk.Image image_encoder_max_speed_lower;
+       [Widget] Gtk.Image image_encoder_mean_force_lower;
+       [Widget] Gtk.Image image_encoder_max_force_lower;
        [Widget] Gtk.Image image_encoder_power_lower;
        [Widget] Gtk.Image image_encoder_peakpower_lower;
        [Widget] Gtk.Image image_repetitive_test_bad;
@@ -208,6 +220,8 @@ public class RepetitiveConditionsWindow
                image_encoder_height_higher.Pixbuf = pixbuf;
                image_encoder_mean_speed_higher.Pixbuf = pixbuf;
                image_encoder_max_speed_higher.Pixbuf = pixbuf;
+               image_encoder_mean_force_higher.Pixbuf = pixbuf;
+               image_encoder_max_force_higher.Pixbuf = pixbuf;
                image_encoder_power_higher.Pixbuf = pixbuf;
                image_encoder_peakpower_higher.Pixbuf = pixbuf;
                image_repetitive_test_good.Pixbuf = pixbuf;
@@ -223,6 +237,8 @@ public class RepetitiveConditionsWindow
                image_encoder_height_lower.Pixbuf = pixbuf;
                image_encoder_mean_speed_lower.Pixbuf = pixbuf;
                image_encoder_max_speed_lower.Pixbuf = pixbuf;
+               image_encoder_mean_force_lower.Pixbuf = pixbuf;
+               image_encoder_max_force_lower.Pixbuf = pixbuf;
                image_encoder_power_lower.Pixbuf = pixbuf;
                image_encoder_peakpower_lower.Pixbuf = pixbuf;
                image_repetitive_test_bad.Pixbuf = pixbuf;
@@ -323,6 +339,20 @@ public class RepetitiveConditionsWindow
                checkbutton_encoder_max_speed_lower.Active = true;
        }
        
+       void on_spinbutton_encoder_mean_force_higher_value_changed (object o, EventArgs args) {
+               checkbutton_encoder_mean_force_higher.Active = true;
+       }
+       void on_spinbutton_encoder_mean_force_lower_value_changed (object o, EventArgs args) {
+               checkbutton_encoder_mean_force_lower.Active = true;
+       }
+       
+       void on_spinbutton_encoder_max_force_higher_value_changed (object o, EventArgs args) {
+               checkbutton_encoder_max_force_higher.Active = true;
+       }
+       void on_spinbutton_encoder_max_force_lower_value_changed (object o, EventArgs args) {
+               checkbutton_encoder_max_force_lower.Active = true;
+       }
+       
        void on_spinbutton_encoder_power_higher_value_changed (object o, EventArgs args) {
                checkbutton_encoder_power_higher.Active = true;
        }
@@ -426,6 +456,7 @@ public class RepetitiveConditionsWindow
 
        /* ENCODER */
 
+       //height
        public bool EncoderHeightHigher {
                get { return checkbutton_encoder_height_higher.Active; }
        }
@@ -440,6 +471,7 @@ public class RepetitiveConditionsWindow
                get { return Convert.ToDouble(spinbutton_encoder_height_lower.Value); }
        }
 
+       //speed
        public bool EncoderMeanSpeedHigher {
                get { return checkbutton_encoder_mean_speed_higher.Active; }
        }
@@ -468,6 +500,36 @@ public class RepetitiveConditionsWindow
                get { return Convert.ToDouble(spinbutton_encoder_max_speed_lower.Value); }
        }
 
+       //force
+       public bool EncoderMeanForceHigher {
+               get { return checkbutton_encoder_mean_force_higher.Active; }
+       }
+       public double EncoderMeanForceHigherValue {
+               get { return Convert.ToDouble(spinbutton_encoder_mean_force_higher.Value); }
+       }
+       
+       public bool EncoderMeanForceLower {
+               get { return checkbutton_encoder_mean_force_lower.Active; }
+       }
+       public double EncoderMeanForceLowerValue {
+               get { return Convert.ToDouble(spinbutton_encoder_mean_force_lower.Value); }
+       }
+
+       public bool EncoderMaxForceHigher {
+               get { return checkbutton_encoder_max_force_higher.Active; }
+       }
+       public double EncoderMaxForceHigherValue {
+               get { return Convert.ToDouble(spinbutton_encoder_max_force_higher.Value); }
+       }
+       
+       public bool EncoderMaxForceLower {
+               get { return checkbutton_encoder_max_force_lower.Active; }
+       }
+       public double EncoderMaxForceLowerValue {
+               get { return Convert.ToDouble(spinbutton_encoder_max_force_lower.Value); }
+       }
+
+       //power & peakPower
        public bool EncoderPowerHigher {
                get { return checkbutton_encoder_power_higher.Active; }
        }



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