[chronojump] ForceSensor repetitive conditions manage path
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor repetitive conditions manage path
- Date: Wed, 19 May 2021 13:52:00 +0000 (UTC)
commit 44f1094609aaf8575bbd3f3ce4695a847cc84984
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed May 19 15:51:32 2021 +0200
ForceSensor repetitive conditions manage path
glade/repetitive_conditions.glade | 599 ++++++++++++++++++++-----------------
src/gui/app1/chronojump.cs | 3 +
src/gui/app1/forceSensor.cs | 10 +-
src/gui/app1/forceSensorAnalyze.cs | 6 +-
src/gui/repetitiveConditions.cs | 45 +--
src/preferences.cs | 3 +-
src/sqlite/main.cs | 2 +-
src/sqlite/preferences.cs | 14 +-
8 files changed, 385 insertions(+), 297 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index 5c284f0d2..9fe62a48a 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -4575,36 +4575,109 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">14</property>
- <property name="spacing">16</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkVBox" id="vbox18">
+ <widget class="GtkHBox" id="hbox55">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">12</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkCheckButton"
id="check_force_sensor_capture_feedback_rectangle">
- <property name="label" translatable="yes">Show feedback rectangle</property>
+ <widget class="GtkRadioButton" id="radio_force_sensor_capture_feedback_no">
+ <property name="label" translatable="yes">Do not show feedback</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="active">True</property>
<property name="draw_indicator">True</property>
- <signal name="toggled"
handler="on_check_force_sensor_capture_feedback_rectangle_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_force_sensor_capture_feedback_no_toggled" swapped="no"/>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment29">
+ <widget class="GtkRadioButton"
id="radio_force_sensor_capture_feedback_show_rectangle">
+ <property name="label" translatable="yes">Show rectangle</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_force_sensor_capture_feedback_no</property>
+ <signal name="toggled"
handler="on_radio_force_sensor_capture_feedback_show_rectangle_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_force_sensor_capture_feedback_show_path">
+ <property name="label" translatable="yes">Show path</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_force_sensor_capture_feedback_no</property>
+ <signal name="toggled"
handler="on_radio_force_sensor_capture_feedback_show_path_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkNotebook" id="notebook_force_sensor_feedback">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <widget class="GtkVBox" id="vbox21">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label70">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">do not show</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox20">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">20</property>
<child>
<widget class="GtkHBox" id="hbox_force_sensor_capture_feedback_rectangle">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
<child>
@@ -4722,159 +4795,64 @@
</packing>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox19">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
<child>
- <widget class="GtkCheckButton" id="check_force_sensor_capture_feedback_path">
- <property name="label" translatable="yes">Show path</property>
+ <widget class="GtkLabel" id="label68">
<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_check_force_sensor_capture_feedback_path_toggled" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="label">rectangle</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment18">
+ <widget class="GtkVBox" id="vbox_force_sensor_capture_feedback_path">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="left_padding">20</property>
+ <property name="spacing">12</property>
<child>
- <widget class="GtkVBox" id="vbox_force_sensor_capture_feedback_path">
+ <widget class="GtkHBox" id="hbox50">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="spacing">12</property>
+ <property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox50">
+ <widget class="GtkLabel" id="label58">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label58">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Maximum</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_max">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">100 0 9999 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label61">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">N</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Maximum</property>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox51">
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_max">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Minimum</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_min">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">50 0 9999 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">N</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">100 0 9999 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -4883,170 +4861,255 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox52">
+ <widget class="GtkLabel" id="label61">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">Master points</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_masters">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">6 3 20 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label">N</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox51">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label62">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Minimum</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_min">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">50 0 9999 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label63">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">N</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox52">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox53">
+ <widget class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">Seconds between masters</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_master_seconds">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">2 1 10 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label66">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">s</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="label">Master points</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_masters">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">6 3 20 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">1</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox53">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
<child>
- <widget class="GtkHBox" id="hbox54">
+ <widget class="GtkLabel" id="label64">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkLabel" id="label65">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">Line width</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_line_width">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="invisible_char_set">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">100 1 400 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label67">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">px</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <property name="label">Seconds between masters</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_master_seconds">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">2 1 10 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label66">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">s</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox54">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label65">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Line width</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_force_sensor_capture_feedback_path_line_width">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">100 1 400 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label67">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">px</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label69">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">path</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
</packing>
</child>
</widget>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 5f04e74f8..235bc0dbf 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -7391,6 +7391,8 @@ LogB.Debug("mc finished 5");
}
else if(m == Constants.Menuitem_modes.FORCESENSOR)
{
+ // TODO: fix this with path
+ /*
bool feedbackActive = repetitiveConditionsWin.GetForceSensorFeedbackRectangleActive;
if(preferences.forceSensorCaptureFeedbackActive != feedbackActive)
{
@@ -7415,6 +7417,7 @@ LogB.Debug("mc finished 5");
preferences.forceSensorCaptureFeedbackRange = feedbackRange;
}
}
+ */
}
}
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 9c0bbf5b9..874030011 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1083,7 +1083,7 @@ public partial class ChronoJumpWindow
forcePaintHVLines(ForceSensorGraphs.CAPTURE, fscPoints.RealHeightG,
ForceSensorCapturePoints.DefaultRealHeightGNeg, 10, false);
//draw horizontal rectangle of feedback
- if(preferences.forceSensorCaptureFeedbackActive)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
forceSensorSignalPlotFeedbackRectangle(fscPoints,
force_capture_drawingarea.Allocation.Width,
force_capture_drawingarea, force_capture_pixmap,
pen_blue_light_force_capture);
@@ -1596,7 +1596,7 @@ LogB.Information(" fs I ");
//draw horizontal rectangle of feedback
- if(preferences.forceSensorCaptureFeedbackActive)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
forceSensorSignalPlotFeedbackRectangle(fscPoints,
force_capture_drawingarea.Allocation.Width,
force_capture_drawingarea, force_capture_pixmap,
pen_blue_light_force_capture);
@@ -1713,7 +1713,7 @@ LogB.Information(" fs R ");
LogB.Information(" fs N0 ");
UtilGtk.ErasePaint(force_capture_drawingarea, force_capture_pixmap);
- if(preferences.forceSensorCaptureFeedbackActive)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
forceSensorSignalPlotFeedbackRectangle(fscPoints,
force_capture_drawingarea.Allocation.Width,
force_capture_drawingarea, force_capture_pixmap,
pen_blue_light_force_capture);
@@ -2501,7 +2501,7 @@ LogB.Information(" fs R ");
false);
//draw horizontal rectangle of feedback
- if(preferences.forceSensorCaptureFeedbackActive)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
forceSensorSignalPlotFeedbackRectangle(fscPoints,
force_capture_drawingarea.Allocation.Width,
force_capture_drawingarea, force_capture_pixmap,
pen_blue_light_force_capture);
@@ -2584,7 +2584,7 @@ LogB.Information(" fs R ");
private void setForceSensorTopAtOperationStart()
{
- if(preferences.forceSensorCaptureFeedbackActive)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
forceSensorTopRectangleAtOperationStart =
Convert.ToInt32(preferences.forceSensorCaptureFeedbackAt + preferences.forceSensorCaptureFeedbackRange /2);
else
forceSensorTopRectangleAtOperationStart = 0;
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index f07a4447f..946be778f 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -1340,7 +1340,8 @@ public partial class ChronoJumpWindow
int xPxEnd = fsAI.FscAIPoints.GetTimeInPx(fsAI.FscAIPoints.GetLastTime());
//draw horizontal rectangle of feedback
- if(preferences.forceSensorCaptureFeedbackActive)
+ //if(preferences.forceSensorCaptureFeedbackActive)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
forceSensorSignalPlotFeedbackRectangle(fsAI.FscAIPoints, xPxEnd,
force_sensor_ai_drawingarea, force_sensor_ai_pixmap,
pen_blue_light_force_ai);
@@ -2200,7 +2201,8 @@ public partial class ChronoJumpWindow
label_force_sensor_ai_variability_values.Text = Math.Round(variability, 3).ToString();
// 12) calculate Accuracy (Feedback difference)
- if(preferences.forceSensorCaptureFeedbackActive && feedbackF > 0)
+ //if(preferences.forceSensorCaptureFeedbackActive && feedbackF > 0)
+ if(preferences.forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE && feedbackF > 0)
{
label_force_sensor_ai_feedback_values.Text = Math.Round(feedbackDiff,
3).ToString();
label_force_sensor_ai_feedback.Visible = true;
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 87431b323..70c5555fd 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -186,14 +186,14 @@ public class RepetitiveConditionsWindow
[Widget] Gtk.CheckButton check_rhythm_rest_reps;
//forceSensor
+ [Widget] Gtk.Notebook notebook_force_sensor_feedback;
+ [Widget] Gtk.RadioButton radio_force_sensor_capture_feedback_no;
+ [Widget] Gtk.RadioButton radio_force_sensor_capture_feedback_show_rectangle;
+ [Widget] Gtk.RadioButton radio_force_sensor_capture_feedback_show_path;
//rectangle
- [Widget] Gtk.CheckButton check_force_sensor_capture_feedback_rectangle;
- [Widget] Gtk.HBox hbox_force_sensor_capture_feedback_rectangle;
[Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_rectangle_at;
[Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_rectangle_range;
//path
- [Widget] Gtk.CheckButton check_force_sensor_capture_feedback_path;
- [Widget] Gtk.VBox vbox_force_sensor_capture_feedback_path;
[Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_max;
[Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_min;
[Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_masters;
@@ -307,7 +307,8 @@ public class RepetitiveConditionsWindow
Preferences.EncoderPhasesEnum encoderCaptureFeedbackEccon,
bool encoderCaptureShowLoss,
EncoderRhythm encoderRhythm,
- bool forceSensorCaptureFeedbackActive,
+ //bool forceSensorCaptureFeedbackActive,
+ Preferences.ForceSensorCaptureFeedbackActiveEnum forceSensorCaptureFeedbackActive,
int forceSensorCaptureFeedbackAt,
int forceSensorCaptureFeedbackRange)
{
@@ -415,13 +416,18 @@ public class RepetitiveConditionsWindow
}
else if(bellMode == Constants.BellModes.FORCESENSOR)
{
- if(forceSensorCaptureFeedbackActive)
+ if(forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.NO)
{
- check_force_sensor_capture_feedback_rectangle.Active = true;
- hbox_force_sensor_capture_feedback_rectangle.Sensitive = true;
+ radio_force_sensor_capture_feedback_no.Active = true;
+ notebook_force_sensor_feedback.Page = 0;
+ }
+ else if(forceSensorCaptureFeedbackActive ==
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE)
+ {
+ radio_force_sensor_capture_feedback_show_rectangle.Active = true;
+ notebook_force_sensor_feedback.Page = 1;
} else {
- check_force_sensor_capture_feedback_rectangle.Active = false;
- hbox_force_sensor_capture_feedback_rectangle.Sensitive = false;
+ radio_force_sensor_capture_feedback_show_path.Active = true;
+ notebook_force_sensor_feedback.Page = 2;
}
spin_force_sensor_capture_feedback_rectangle_at.Value = forceSensorCaptureFeedbackAt;
@@ -597,7 +603,7 @@ public class RepetitiveConditionsWindow
return true;
}
else if(bellMode == Constants.BellModes.FORCESENSOR)
- return check_force_sensor_capture_feedback_rectangle.Active;
+ return ! radio_force_sensor_capture_feedback_no.Active;
return false;
}
@@ -956,19 +962,22 @@ public class RepetitiveConditionsWindow
/* FORCESENSOR */
- private void on_check_force_sensor_capture_feedback_rectangle_toggled (object o, EventArgs args)
+ private void on_radio_force_sensor_capture_feedback_no_toggled (object o, EventArgs args)
{
- hbox_force_sensor_capture_feedback_rectangle.Sensitive =
check_force_sensor_capture_feedback_rectangle.Active;
+ notebook_force_sensor_feedback.Page = 0;
}
-
- private void on_check_force_sensor_capture_feedback_path_toggled (object o, EventArgs args)
+ private void on_radio_force_sensor_capture_feedback_show_rectangle_toggled (object o, EventArgs args)
+ {
+ notebook_force_sensor_feedback.Page = 1;
+ }
+ private void on_radio_force_sensor_capture_feedback_show_path_toggled (object o, EventArgs args)
{
- vbox_force_sensor_capture_feedback_path.Sensitive =
check_force_sensor_capture_feedback_path.Active;
+ notebook_force_sensor_feedback.Page = 2;
}
//force sensor feedback rectangle
public bool GetForceSensorFeedbackRectangleActive {
- get { return check_force_sensor_capture_feedback_rectangle.Active; }
+ get { return radio_force_sensor_capture_feedback_show_rectangle.Active; }
}
public int GetForceSensorFeedbackRectangleAt {
get { return Convert.ToInt32(spin_force_sensor_capture_feedback_rectangle_at.Value); }
@@ -979,7 +988,7 @@ public class RepetitiveConditionsWindow
//force sensor feedback path
public bool GetForceSensorFeedbackPathActive {
- get { return check_force_sensor_capture_feedback_path.Active; }
+ get { return radio_force_sensor_capture_feedback_show_path.Active; }
//get { return true; }
}
public int GetForceSensorFeedbackPathMax {
diff --git a/src/preferences.cs b/src/preferences.cs
index d9b8c6799..eade633cd 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -246,7 +246,8 @@ public class Preferences
public string forceSensorCalibrationDateTime;
public double forceSensorCalibrationWeight;
public double forceSensorCalibrationFactor;
- public bool forceSensorCaptureFeedbackActive; //rectangle
+ public enum ForceSensorCaptureFeedbackActiveEnum { NO, RECTANGLE, PATH };
+ public ForceSensorCaptureFeedbackActiveEnum forceSensorCaptureFeedbackActive; //rectangle
public int forceSensorCaptureFeedbackAt; //rectangle
public int forceSensorCaptureFeedbackRange; //rectangle
public bool forceSensorStartEndOptimized;
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index fb5a184be..896352354 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -2606,7 +2606,7 @@ class Sqlite
{
LogB.SQL("Inserted forceSensorCaptureFeedbackActive /At /Range");
- SqlitePreferences.Insert (SqlitePreferences.ForceSensorCaptureFeedbackActive,
"False");
+ SqlitePreferences.Insert (SqlitePreferences.ForceSensorCaptureFeedbackActive,
Preferences.ForceSensorCaptureFeedbackActiveEnum.NO.ToString());
SqlitePreferences.Insert (SqlitePreferences.ForceSensorCaptureFeedbackAt,
"100");
SqlitePreferences.Insert (SqlitePreferences.ForceSensorCaptureFeedbackRange,
"40");
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 326a59ef1..5fe88199e 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -294,7 +294,7 @@ class SqlitePreferences : Sqlite
Insert (ForceSensorNotElasticConMinForce, "100", dbcmdTr);
Insert (ForceSensorGraphsLineWidth, "2", dbcmdTr);
Insert (ForceSensorVariabilityMethod,
Preferences.VariabilityMethodEnum.CVRMSSD.ToString(), dbcmdTr);
- Insert (ForceSensorCaptureFeedbackActive, "False", dbcmdTr);
+ Insert (ForceSensorCaptureFeedbackActive,
Preferences.ForceSensorCaptureFeedbackActiveEnum.NO.ToString(), dbcmdTr);
Insert (ForceSensorCaptureFeedbackAt, "100", dbcmdTr);
Insert (ForceSensorCaptureFeedbackRange, "40", dbcmdTr);
Insert (ForceSensorTareDateTimeStr, "", dbcmdTr);
@@ -704,7 +704,17 @@ class SqlitePreferences : Sqlite
preferences.forceSensorVariabilityMethod = (Preferences.VariabilityMethodEnum)
Enum.Parse(typeof(Preferences.VariabilityMethodEnum),
reader[1].ToString());
else if(reader[0].ToString() == ForceSensorCaptureFeedbackActive)
- preferences.forceSensorCaptureFeedbackActive = reader[1].ToString() == "True";
+ {
+ //preferences.forceSensorCaptureFeedbackActive = reader[1].ToString() ==
"True";
+ //note first it was a boolean "False" or "True"
+ if(reader[1].ToString() == "False")
+ preferences.forceSensorCaptureFeedbackActive =
Preferences.ForceSensorCaptureFeedbackActiveEnum.NO;
+ else if(reader[1].ToString() == "True")
+ preferences.forceSensorCaptureFeedbackActive =
Preferences.ForceSensorCaptureFeedbackActiveEnum.RECTANGLE;
+ else
+ preferences.forceSensorCaptureFeedbackActive =
(Preferences.ForceSensorCaptureFeedbackActiveEnum)
+
Enum.Parse(typeof(Preferences.ForceSensorCaptureFeedbackActiveEnum), reader[1].ToString());
+ }
else if(reader[0].ToString() == ForceSensorCaptureFeedbackAt)
preferences.forceSensorCaptureFeedbackAt =
Convert.ToInt32(reader[1].ToString());
else if(reader[0].ToString() == ForceSensorCaptureFeedbackRange)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]