|
|
|
@ -653,6 +653,10 @@ void PosCtl::Loop (int posx, int posy) {
|
|
|
|
|
out1 = pid_axis[0].Update(0.0, dist_axis2);
|
|
|
|
|
out2 = pid_axis[1].Update(0.0, dist_axis1);
|
|
|
|
|
|
|
|
|
|
printf ("%s:%d %s", __FILE__, __LINE__, __FUNCTION__);
|
|
|
|
|
printf ("Axis 1 dist: %5.3f out 2: %5.3f ", dist_axis2, out1);
|
|
|
|
|
printf ("Axis 2 dist: %5.3f out 1: %5.3f\n", dist_axis1, out2);
|
|
|
|
|
|
|
|
|
|
OutputWriteValue(0, out1);
|
|
|
|
|
OutputWriteValue(1, out2);
|
|
|
|
|
|
|
|
|
@ -755,7 +759,7 @@ int PosCtl::ReadTTY (char * inbuf, int length) {
|
|
|
|
|
|
|
|
|
|
int PosCtl::OutputWriteValue (int axis, double value) {
|
|
|
|
|
char outbuf[255];
|
|
|
|
|
printf ("%s:%d %s Axis %d Value:%f\n", __FILE__, __LINE__, __FUNCTION__, axis, value);
|
|
|
|
|
// printf ("%s:%d %s Axis %d Value:%f\n", __FILE__, __LINE__, __FUNCTION__, axis, value);
|
|
|
|
|
|
|
|
|
|
if (isnan(value)) return -1;
|
|
|
|
|
if (device_type == POSCTL_DEVTYPE_SIM) {
|
|
|
|
|