diff options
author | sharpTrick <psharp.x13@gmail.com> | 2022-02-16 18:16:52 -0700 |
---|---|---|
committer | sharpTrick <psharp.x13@gmail.com> | 2022-02-16 18:16:52 -0700 |
commit | 7ac30c677d9a68b2acba08bbc0d8fc8a52552e58 (patch) | |
tree | cce75829d08f5c571a0137ce38d59e180723a67b | |
parent | bb773720e9cfd78bdba7190867fd221b767b90da (diff) |
Added more max_clamp options
-rw-r--r-- | gui/mapping-dialog.cpp | 23 | ||||
-rw-r--r-- | gui/mapping-dialog.ui | 69 | ||||
-rw-r--r-- | spline/axis-opts.hpp | 8 |
3 files changed, 98 insertions, 2 deletions
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index af35c999..cdbf532e 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -59,6 +59,10 @@ mapping_dialog::mapping_dialog(Mappings& m) : m(m), widgets{} tie_setting(s.a_y.clamp_x_, ui.max_y_translation); tie_setting(s.a_z.clamp_x_, ui.max_z_translation); + tie_setting(s.a_x.clamp_y_, ui.max_x_out); + tie_setting(s.a_y.clamp_y_, ui.max_y_out); + tie_setting(s.a_z.clamp_y_, ui.max_z_out); + tie_setting(s.a_pitch.clamp_y_, ui.max_pitch_output); } @@ -96,9 +100,13 @@ void mapping_dialog::load() x->addItem(tr("%1°").arg(y), y); for (QComboBox* x : { ui.max_x_translation, ui.max_y_translation, ui.max_z_translation }) - for (a y : { a::t30, a::t20, a::t15, a::t10, a::t100 }) + for (a y : { a::t30, a::t20, a::t15, a::t10, a::t75, a::t100, a::t150, a::t300, a::t600 }) x->addItem(tr("%1 cm").arg(int(y)), y); + for (QComboBox* x : { ui.max_x_out, ui.max_y_out, ui.max_z_out }) + for (a y : { a::o_t75, a::o_t100, a::o_t150, a::o_t300, a::o_t600 }) + x->addItem(tr("%1 cm").arg(abs(int(y))), y); + for (int i = 0; qfcs[i].qfc; i++) { const bool altp = qfcs[i].altp; @@ -122,8 +130,12 @@ void mapping_dialog::load() value = 1; else if (clamp_x <= a::r45) value = 5; - else + else if (clamp_x <= a::t150) value = 10; + else if (clamp_x <= a::t300) + value = 25; + else + value = 50; qfc.set_x_step(value); }; @@ -139,6 +151,13 @@ void mapping_dialog::load() value = 10; break; case a::o_t75: value = 5; break; + case a::o_t100: + case a::o_t150: + value = 10; break; + case a::o_t300: + value = 50; break; + case a::o_t600: + value = 100; break; } qfc.set_y_step(value); }; diff --git a/gui/mapping-dialog.ui b/gui/mapping-dialog.ui index 8d72533d..545b5ae5 100644 --- a/gui/mapping-dialog.ui +++ b/gui/mapping-dialog.ui @@ -352,6 +352,29 @@ </property> </widget> </item> + <item> + <widget class="QLabel" name="label4out"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Max output</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="max_x_out"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> </layout> </widget> </item> @@ -432,6 +455,29 @@ </property> </widget> </item> + <item> + <widget class="QLabel" name="label5out"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Max output</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="max_y_out"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> </layout> </widget> </item> @@ -512,6 +558,29 @@ </property> </widget> </item> + <item> + <widget class="QLabel" name="label6out"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Max output</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="max_z_out"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> </layout> </widget> </item> diff --git a/spline/axis-opts.hpp b/spline/axis-opts.hpp index c773dd61..b389f4b9 100644 --- a/spline/axis-opts.hpp +++ b/spline/axis-opts.hpp @@ -29,7 +29,11 @@ public: r15 = 15, r10 = 10, + t600 = 600, + t300 = 300, + t150 = 150, t100 = 100, + t75 = 75, t30 = 30, t20 = 20, t15 = 15, @@ -38,6 +42,10 @@ public: o_r180 = -180, o_r90 = -90, o_t75 = -75, + o_t100 = -100, + o_t150 = -150, + o_t300 = -300, + o_t600 = -600, x1000 = 1000, }; |