diff --git a/configuration.cc b/configuration.cc index 6b3fcc4..4c8fab6 100644 --- a/configuration.cc +++ b/configuration.cc @@ -2,12 +2,14 @@ #include "configuration.h" #include "video.h" #include "gui.h" +#include "detect.h" #include #include // extern VideoDev *videodev; extern GtkBuilder *_builder_; // work around for threads +extern PosCtl posctl; Configuration::Configuration() { @@ -64,6 +66,9 @@ void Configuration::SaveConfig(std::string filename) { GtkWidget *cb; GtkWidget *cbe; + std::string s = setlocale(LC_ALL, NULL); + setlocale (LC_ALL, "C"); + // // Add resolution, format and video device to config json element cb = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "cb-videores")); @@ -76,13 +81,32 @@ void Configuration::SaveConfig(std::string filename) { cbe = gtk_bin_get_child(GTK_BIN(cb)); jp.AddObject("device", (string) gtk_entry_get_text(GTK_ENTRY(cbe))); + // + // save posctl settings + double amin, amax, akp, aki, akd; + JSONParse jaxis; + + posctl.LockMutex(); + for (i = 0; i < 2; i++) { + posctl.GetAxisParam(i, &amin, &amax, &akp, &aki, &akd); + jaxis.Clear(); + jaxis.AddObject("min", amin); + jaxis.AddObject("max", amax); + jaxis.AddObject("kp", akp); + jaxis.AddObject("ki", aki); + jaxis.AddObject("kd", akd); + printf ("%s:%d save config axis %d Out Range: %f - %f kP:%f kI:%f kD:%f\n", + __FILE__, __LINE__, i, amin, amax, akp, aki, akd); + jp.AddObject("posctl_axis" + to_string(i), jaxis); + } + jp.AddObject("posctl_device", posctl.GetDevice()); + posctl.UnLockMutex(); // // histogram settings and debayer mode jp.AddObject("histogram_log", histogram_log); jp.AddObject("debayer_mode", debayer_mode); - // // save button config for (i = 0; i < BTN_PRESET_MAX; i++) { @@ -135,7 +159,6 @@ void Configuration::SaveConfig(std::string filename) { break; } - GtkWidget *wnd = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), name.c_str())); if (wnd) { g_object_get (wnd, "visible", &show, NULL); @@ -157,6 +180,8 @@ void Configuration::SaveConfig(std::string filename) { printf ("%s:%d %s could not save to file [%s] Error: %s\n", __FILE__, __LINE__, __FUNCTION__, filename.c_str(), strerror(errno)); } + + setlocale (LC_ALL, s.c_str()); }; @@ -166,6 +191,9 @@ void Configuration::LoadConfig(std::string filename) { int i; JSONElement je; + std::string s = setlocale(LC_ALL, NULL); + setlocale (LC_ALL, "C"); + if (jp.LoadFromFile(filename)) { printf ("%s:%d %s could not load from file [%s] Error: %s\n", __FILE__, __LINE__, __FUNCTION__, filename.c_str(), strerror(errno)); @@ -187,6 +215,28 @@ void Configuration::LoadConfig(std::string filename) { gtk_entry_set_text(GTK_ENTRY(cbdevice), vstr.c_str()); } + // + // load posctl + double amin, amax, akp, aki, akd; + JSONParse jaxis; + + posctl.LockMutex(); + for (i = 0; i < 2; i++) { + if (jp.GetObject("posctl_axis"+to_string(i), &jaxis)) { + jaxis.GetValueDouble("min", &amin); + jaxis.GetValueDouble("max", &amax); + jaxis.GetValueDouble("kp", &akp); + jaxis.GetValueDouble("ki", &aki); + jaxis.GetValueDouble("kd", &akd); + } + printf ("%s:%d load config axis %d Out Range: %f - %f kP:%f kI:%f kD:%f\n", + __FILE__, __LINE__, i, amin, amax, akp, aki, akd); + posctl.SetAxisParam(i, amin, amax, akp, aki, akd); + } + if (jp.GetValue("posctl_device", &vstr)) + posctl.SetDevice(vstr); + posctl.UnLockMutex(); + jp.GetValueInt("histogram_log", &i); SetHistogramLog(i); @@ -295,6 +345,11 @@ void Configuration::LoadConfig(std::string filename) { } } } + setlocale (LC_ALL, s.c_str()); + + // we need to update the gui so floating numbers will displayed with the correct + // language setting. + gdk_threads_add_idle(cb_thread_posctl, NULL); }; diff --git a/detect.h b/detect.h index eb1e7ff..3b56a2c 100644 --- a/detect.h +++ b/detect.h @@ -52,6 +52,8 @@ class PosCtl { GMutex mutex; int mode; PID pid_axis[2]; + std::string device; + int device_fd; struct timeval calib_timestamp; int calib_mode; position_2d calib_pos; @@ -61,6 +63,8 @@ class PosCtl { void CalibModeAxis(int x, int y); void CalibModeFinish(); + void OutputClose(); + void OutputOpen(); public: PosCtl(); ~PosCtl() {}; @@ -76,6 +80,8 @@ class PosCtl { double calib_axis2_lenmi; double calib_axis2_lenma; + double out[2]; + void LockMutex() { g_mutex_lock(&mutex); }; void UnLockMutex() { g_mutex_unlock(&mutex); }; @@ -85,7 +91,13 @@ class PosCtl { int GetMode () { return mode; }; void SetAxisParam (int axis, double min, double max, double k, double i, double d); void GetAxisParam (int axis, double *min, double *max, double *k, double *i, double *d); + void SetDevice(std::string d); + std::string GetDevice() { return device; }; + void Loop (int posx, int posy); + void OutputWriteValue (int axis, double value); + void OutputWriteStop (int axis); + void OutputWriteStart (int axis); }; diff --git a/gui.h b/gui.h index a4bcfbb..352c052 100644 --- a/gui.h +++ b/gui.h @@ -125,11 +125,16 @@ G_MODULE_EXPORT void cb_histogram_show_window (GtkWidget *widget, gpointer data) // // position control elements +G_MODULE_EXPORT void cb_posctl_show (GtkWidget *widget, gpointer data); G_MODULE_EXPORT void cb_posctl_show_window (GtkWidget *widget, gpointer data); G_MODULE_EXPORT void cb_posctl_btncalib (GtkWidget *widget, gpointer data); G_MODULE_EXPORT void cb_posctl_angles_draw (GtkWidget *area, cairo_t *cr, int w, int h, gpointer data); G_MODULE_EXPORT void cb_posctl_entryanglelen (GtkWidget *widget, gpointer data); G_MODULE_EXPORT void cb_posctl_axis_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer data); +G_MODULE_EXPORT void cb_posctl_change_entry (GtkWidget *widget, gpointer data); +G_MODULE_EXPORT void cb_posctl_btn_axismove (GtkWidget *widget, gpointer data); + + // // menu elements diff --git a/json.cc b/json.cc index ffeff35..9e55f0a 100644 --- a/json.cc +++ b/json.cc @@ -210,6 +210,17 @@ int JSONParse::GetValueInt(string varname, int *dest) { }; +int JSONParse::GetValueDouble(string varname, double *dest) { + string s; + int res = GetValue(varname, &s); + if (res) { + *dest = atof (s.c_str()); + return 1; + } + return 0; +}; + + int JSONParse::GetValueInt64(string varname, int64_t *dest) { string s; int res = GetValue(varname, &s); @@ -521,4 +532,3 @@ string JSONElement::GetString () { return output; }; - diff --git a/json.h b/json.h index a235a32..ea351c9 100644 --- a/json.h +++ b/json.h @@ -54,6 +54,7 @@ public: int GetValue(string varname, string *dest); int GetValueInt(string varname, int *dest); + int GetValueDouble(string varname, double *dest); int GetValueInt64(string varname, int64_t *dest); int GetObject(string varname, JSONParse *dest); diff --git a/pid.cc b/pid.cc index ae9bf09..0f5e92f 100644 --- a/pid.cc +++ b/pid.cc @@ -134,11 +134,11 @@ void PID::SetParam (double mi, double ma, double p, double i, double d) { void PID::GetParam (double *mi, double *ma, double *p, double *i, double *d) { - *p = Kp; - *i = Ki; - *d = Kd; - *mi = Min; - *ma = Max; + if (p != NULL) *p = Kp; + if (i != NULL) *i = Ki; + if (d != NULL) *d = Kd; + if (mi != NULL) *mi = Min; + if (ma != NULL) *ma = Max; }; diff --git a/pid.h b/pid.h index b589b44..70c260b 100644 --- a/pid.h +++ b/pid.h @@ -5,9 +5,9 @@ class PID { private: double Min, Max; - double Kp; // proportional factor - double Ki; // integral factor - double Kd; // derivative factor + double Kp; // proportional factor + double Ki; // integral factor + double Kd; // derivative factor double Integral; double PreviousError; int64_t PreviousTime; diff --git a/posctl.cc b/posctl.cc index 449e3a4..6fdf34f 100644 --- a/posctl.cc +++ b/posctl.cc @@ -34,6 +34,7 @@ void cb_posctl_show_window (GtkWidget *widget, gpointer data) { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); GtkWidget *wnd = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "window-posctl")); + gtk_widget_show(wnd); } @@ -48,6 +49,81 @@ void cb_posctl_btncalib (GtkWidget *widget, gpointer data) { posctl_gui_update(); } + +void cb_posctl_show (GtkWidget *widget, gpointer data) { + printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); + posctl_gui_update(); +} + + +void cb_posctl_btn_axismove (GtkWidget *widget, gpointer data) { + GtkWidget *btn_a1min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a1_min")); + GtkWidget *btn_a1center = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a1_center")); + GtkWidget *btn_a1max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a1_max")); + GtkWidget *btn_a2min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a2_min")); + GtkWidget *btn_a2center = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a2_center")); + GtkWidget *btn_a2max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a2_max")); + double a1min, a2min, a1max, a2max; + + printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); + + posctl.GetAxisParam(0, &a1min, &a1max, NULL, NULL, NULL); + posctl.GetAxisParam(1, &a2min, &a2max, NULL, NULL, NULL); + + if (widget == btn_a1min) posctl.OutputWriteValue(0, a1min); + else if (widget == btn_a1center) posctl.OutputWriteValue(0, (a1max-a1min)/2.0+a1min); + else if (widget == btn_a1max) posctl.OutputWriteValue(0, a1max); + else if (widget == btn_a2min) posctl.OutputWriteValue(1, a1min); + else if (widget == btn_a2center) posctl.OutputWriteValue(1, (a1max-a1min)/2.0+a1min); + else if (widget == btn_a2max) posctl.OutputWriteValue(1, a1max); + + posctl_gui_update(); +} + + +void cb_posctl_change_entry (GtkWidget *widget, gpointer data) { + double a1min, a1max, a1p, a1i, a1d; + double a2min, a2max, a2p, a2i, a2d; + + GtkWidget *e_posdevice = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_device")); + GtkWidget *a1_min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_min")); + GtkWidget *a1_max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_max")); + GtkWidget *a1_kp = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_kp")); + GtkWidget *a1_ki = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_ki")); + GtkWidget *a1_kd = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_kd")); + GtkWidget *a2_min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_min")); + GtkWidget *a2_max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_max")); + GtkWidget *a2_kp = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_kp")); + GtkWidget *a2_ki = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_ki")); + GtkWidget *a2_kd = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_kd")); + const char *s; + + posctl.GetAxisParam(0, &a1min, &a1max, &a1p, &a1i, &a1d); + posctl.GetAxisParam(1, &a2min, &a2max, &a2p, &a2i, &a2d); + + printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); + s = gtk_entry_get_text(GTK_ENTRY(widget)); + + posctl.LockMutex(); + if (e_posdevice == widget) posctl.SetDevice(s); + else if (a1_min == widget) a1min = atof(s); + else if (a1_max == widget) a1max = atof(s); + else if (a1_kp == widget) a1p = atof(s); + else if (a1_ki == widget) a1i = atof(s); + else if (a1_kd == widget) a1d = atof(s); + else if (a2_min == widget) a2min = atof(s); + else if (a2_max == widget) a2max = atof(s); + else if (a2_kp == widget) a2p = atof(s); + else if (a2_ki == widget) a2i = atof(s); + else if (a2_kd == widget) a2d = atof(s); + + posctl.SetAxisParam(0, a1min, a1max, a1p, a1i, a1d); + posctl.SetAxisParam(1, a2min, a2max, a2p, a2i, a2d); + + posctl.UnLockMutex(); +} + + void cb_posctl_angles_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer data) { int clientw, clienth; @@ -218,6 +294,7 @@ void cb_posctl_axis_draw(GtkWidget *area, cairo_t *cr, int w, int h, gpointer da */ void posctl_gui_update() { char txt[255]; + double kp, ki, kd, mi, ma; GtkWidget *caliblabel = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_calib_label")); @@ -235,12 +312,40 @@ void posctl_gui_update() { GtkWidget *e_cal_a2lenmi = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2lenmi")); GtkWidget *e_cal_a2lenma = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2lenma")); + GtkWidget *e_posdevice = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_device")); + GtkWidget *btn_a1min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a1_min")); + GtkWidget *btn_a1center = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a1_center")); + GtkWidget *btn_a1max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a1_max")); + GtkWidget *btn_a2min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a2_min")); + GtkWidget *btn_a2center = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a2_center")); + GtkWidget *btn_a2max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_btn_a2_max")); + + GtkWidget *a1_min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_min")); + GtkWidget *a1_max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_max")); + GtkWidget *a1_kp = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_kp")); + GtkWidget *a1_ki = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_ki")); + GtkWidget *a1_kd = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a1_kd")); + GtkWidget *a1_out = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_lb_outx")); + GtkWidget *a2_min = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_min")); + GtkWidget *a2_max = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_max")); + GtkWidget *a2_kp = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_kp")); + GtkWidget *a2_ki = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_ki")); + GtkWidget *a2_kd = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_entry_a2_kd")); + GtkWidget *a2_out = GTK_WIDGET(gtk_builder_get_object (GTK_BUILDER(_builder_), "posctl_lb_outy")); + posctl.LockMutex(); int m = posctl.GetMode(); if (m == POSCTL_MODE_OFF) { gtk_widget_set_sensitive(btnclib, true); + gtk_widget_set_sensitive(btn_a1min, true); + gtk_widget_set_sensitive(btn_a1center, true); + gtk_widget_set_sensitive(btn_a1max, true); + gtk_widget_set_sensitive(btn_a2min, true); + gtk_widget_set_sensitive(btn_a2center, true); + gtk_widget_set_sensitive(btn_a2max, true); gtk_widget_set_sensitive(cbenable, true); + gtk_widget_set_sensitive(e_posdevice, true); gtk_label_set_label(GTK_LABEL(caliblabel), (char *) ""); } else { @@ -249,6 +354,13 @@ void posctl_gui_update() { } gtk_widget_set_sensitive(btnclib, false); gtk_widget_set_sensitive(cbenable, false); + gtk_widget_set_sensitive(btn_a1min, false); + gtk_widget_set_sensitive(btn_a1center, false); + gtk_widget_set_sensitive(btn_a1max, false); + gtk_widget_set_sensitive(btn_a2min, false); + gtk_widget_set_sensitive(btn_a2center, false); + gtk_widget_set_sensitive(btn_a2max, false); + gtk_widget_set_sensitive(e_posdevice, false); } strfromd (txt, sizeof(txt-1), (const char *)"%f", posctl.calib_rot_angle); @@ -270,6 +382,35 @@ void posctl_gui_update() { strfromd (txt, sizeof(txt-1), (const char *)"%f", posctl.calib_axis2_lenma); gtk_entry_set_text (GTK_ENTRY(e_cal_a2lenma), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", posctl.out[0]); + gtk_label_set_text(GTK_LABEL(a1_out), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", posctl.out[1]); + gtk_label_set_text(GTK_LABEL(a2_out), txt); + + posctl.GetAxisParam(0, &mi, &ma, &kp, &ki, &kd); + strfromd (txt, sizeof(txt-1), (const char *)"%f", mi); + gtk_entry_set_text (GTK_ENTRY(a1_min), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", ma); + gtk_entry_set_text (GTK_ENTRY(a1_max), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", kp); + gtk_entry_set_text (GTK_ENTRY(a1_kp), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", ki); + gtk_entry_set_text (GTK_ENTRY(a1_ki), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", kd); + gtk_entry_set_text (GTK_ENTRY(a1_kd), txt); + + posctl.GetAxisParam(1, &mi, &ma, &kp, &ki, &kd); + strfromd (txt, sizeof(txt-1), (const char *)"%f", mi); + gtk_entry_set_text (GTK_ENTRY(a2_min), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", ma); + gtk_entry_set_text (GTK_ENTRY(a2_max), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", kp); + gtk_entry_set_text (GTK_ENTRY(a2_kp), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", ki); + gtk_entry_set_text (GTK_ENTRY(a2_ki), txt); + strfromd (txt, sizeof(txt-1), (const char *)"%f", kd); + gtk_entry_set_text (GTK_ENTRY(a2_kd), txt); + posctl.UnLockMutex(); } @@ -296,9 +437,10 @@ PosCtl::PosCtl() { calib_axis2_angle = 0.0; calib_axis2_lenmi = 0.0; calib_axis2_lenma = 0.0; + device_fd = -1; + device = ""; }; - /* * stop the control or the calibration */ @@ -345,6 +487,7 @@ void PosCtl::SetAxisParam ( int axis, double min, double max, pid_axis[axis].SetParam(min, max, k, i, d); }; + void PosCtl::GetAxisParam ( int axis, double *min, double *max, double *k, double *i, double *d) { @@ -453,3 +596,37 @@ void PosCtl::Loop (int posx, int posy) { } }; + +void PosCtl::SetDevice (std::string d) { + printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); + OutputClose(); + device = d; +}; + + +void PosCtl::OutputClose() { + printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); + if (device_fd > 0) close(device_fd); + device_fd = -1; +}; + + +void PosCtl::OutputOpen() { + printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); +}; + + +void PosCtl::OutputWriteValue (int axis, double value) { + printf ("%s:%d %s Axis %d Value:%f\n", __FILE__, __LINE__, __FUNCTION__, axis, value); +} + +void PosCtl::OutputWriteStop (int axis) { + printf ("%s:%d %s Axis %d\n", __FILE__, __LINE__, __FUNCTION__, axis); +} + +void PosCtl::OutputWriteStart (int axis) { + printf ("%s:%d %s Axis %d\n", __FILE__, __LINE__, __FUNCTION__, axis); +} + + + diff --git a/simpleskycam.ui b/simpleskycam.ui index 9b5d584..6ef3980 100644 --- a/simpleskycam.ui +++ b/simpleskycam.ui @@ -655,6 +655,7 @@ 4 Position Control + True @@ -1022,30 +1023,249 @@ True False - 4 + vertical - + True False - 0 - none + 10 + 6 + 4 - + True False - 12 + Device: + + + False + True + 0 + + + + + True + True + 15 + /dev/ttyUSB0 + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + 4 + + + True + False + vertical + 4 + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 4 + + + 100 + 150 + True + False + + + + False + True + 0 + + + + + + True + False + 2 + + + True + False + Min + + + 0 + 0 + + + + + True + False + Max + + + 0 + 1 + + + + + True + False + Kp + + + 0 + 2 + + + + + True + False + Ki + + + 0 + 3 + + + + + True + False + Kd + + + 0 + 4 + + + + + True + True + 4 + + + + 1 + 0 + + + + + True + True + 4 + + + + 1 + 1 + + + + + True + True + 4 + + + + 1 + 2 + + + + + True + True + 4 + + + + 1 + 3 + + + + + True + True + 4 + + + + 1 + 4 + + + + + False + True + 1 + + + + + + + + + True + False + Axis 1 + + + + + False + True + 0 + + True False 4 + True - - 100 - 150 + + Min True - False - + True + True + True + + False @@ -1054,121 +1274,13 @@ - - + + C True - False - 2 - - - True - False - Min - - - 0 - 0 - - - - - True - False - Max - - - 0 - 1 - - - - - True - False - Kp - - - 0 - 2 - - - - - True - False - Ki - - - 0 - 3 - - - - - True - False - Kd - - - 0 - 4 - - - - - True - True - 4 - - - 1 - 0 - - - - - True - True - 4 - - - 1 - 1 - - - - - True - True - 4 - - - 1 - 2 - - - - - True - True - 4 - - - 1 - 3 - - - - - True - True - 4 - - - 1 - 4 - - + True + True + + False @@ -1176,58 +1288,242 @@ 1 + + + Max + True + True + True + + + + + False + True + 2 + + + + False + True + 1 + + + False + True + 0 + - - + + True False - Axis 1 + + False + True + 1 + - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - 0 - none - + True False - 12 + vertical + 4 + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 4 + + + 100 + 150 + True + False + + + + False + True + 0 + + + + + + True + False + 2 + + + True + False + Min + + + 0 + 0 + + + + + True + False + Max + + + 0 + 1 + + + + + True + False + Kp + + + 0 + 2 + + + + + True + False + Ki + + + 0 + 3 + + + + + True + False + Kd + + + 0 + 4 + + + + + True + True + 4 + + + + 1 + 0 + + + + + True + True + 4 + + + + 1 + 1 + + + + + True + True + 4 + + + + 1 + 2 + + + + + True + True + 4 + + + + 1 + 3 + + + + + True + True + 4 + + + + 1 + 4 + + + + + False + True + 1 + + + + + + + + + True + False + Axis 2 + + + + + False + True + 0 + + True False 4 + True - - 100 - 150 + + Min True - False - + True + True + + False @@ -1236,121 +1532,13 @@ - - + + C True - False - 2 - - - True - False - Min - - - 0 - 0 - - - - - True - False - Max - - - 0 - 1 - - - - - True - False - Kp - - - 0 - 2 - - - - - True - False - Ki - - - 0 - 3 - - - - - True - False - Kd - - - 0 - 4 - - - - - True - True - 4 - - - 1 - 0 - - - - - True - True - 4 - - - 1 - 1 - - - - - True - True - 4 - - - 1 - 2 - - - - - True - True - 4 - - - 1 - 3 - - - - - True - True - 4 - - - 1 - 4 - - + True + True + + False @@ -1358,184 +1546,202 @@ 1 + + + Max + True + True + True + + + + + False + True + 2 + + + + False + True + 1 + + + False + True + 2 + - - - True - False - Axis 2 - - - - - False - True - 2 - - - - - True - False - - - False - True - 3 - - - - - True - False - vertical - 4 - + True False - Values False True - 0 + 3 - - + True False - 4 - 4 - - - True - False - X - - - 0 - 1 - - - - - True - False - Y - - - 0 - 2 - - - - - True - False - d - - - 1 - 0 - - + vertical + 4 True False - out + Values - 3 - 0 - - - - - True - False - --- - - - - - - 1 - 1 - - - - - True - False - --- - - - - - - 1 - 2 - - - - - True - False - --- - - - - - - 3 - 1 + False + True + 0 - + + True False - --- - - - + 4 + 4 + + + True + False + X + + + 0 + 1 + + + + + True + False + Y + + + 0 + 2 + + + + + True + False + d + + + 1 + 0 + + + + + True + False + out + + + 3 + 0 + + + + + True + False + --- + + + + + + 1 + 1 + + + + + True + False + --- + + + + + + 1 + 2 + + + + + True + False + --- + + + + + + 3 + 1 + + + + + True + False + --- + + + + + + 3 + 2 + + + + + + + + + + + + + + - 3 - 2 + False + True + 1 - - - - - - - - - - - - False True - 1 + 4 False True - 4 + 1