All pastes #3248167 Raw Edit

Anonymous

public unlisted text v1 · immutable
#3248167 ·published 2015-11-11 20:32 UTC
rendered paste body
diff --git a/src/emc/motion/control.c b/src/emc/motion/control.c
index 9d5958e..571deff 100644
--- a/src/emc/motion/control.c
+++ b/src/emc/motion/control.c
@@ -1186,8 +1186,7 @@ static void get_pos_cmds(long period)
 
     case EMCMOT_MOTION_COORD:
        /* check joint 0 to see if the interpolators are empty */
-       while (cubicNeedNextPoint(&(joints[0].cubic))) {
-            EmcPose old_carte_pos_cmd;
+          {  EmcPose old_carte_pos_cmd;
            /* they're empty, pull next point(s) off Cartesian planner */
            /* run coordinated trajectory planning cycle */
            tpRunCycle(&emcmotDebug->coord_tp, period);
@@ -1226,7 +1225,7 @@ static void get_pos_cmds(long period)
                    /* spline joints up-- note that we may be adding points
                       that fail soft limits, but we'll abort at the end of
                       this cycle so it doesn't really matter */
-                   cubicAddPoint(&(joint->cubic), joint->coarse_pos);
+                   //cubicAddPoint(&(joint->cubic), joint->coarse_pos);
                }
            }
            else
@@ -1248,9 +1247,11 @@ static void get_pos_cmds(long period)
            /* save old command */
            old_pos_cmd = joint->pos_cmd;
            /* interpolate to get new one */
-           joint->pos_cmd = cubicInterpolate(&(joint->cubic), 0, 0, 0, 0);
+//         joint->pos_cmd = cubicInterpolate(&(joint->cubic), 0, 0, 0, 0);
+        joint->pos_cmd = joint->coarse_pos;
            joint->vel_cmd = (joint->pos_cmd - old_pos_cmd) * servo_freq;
        }
+//    rtapi_print("CUBIC ADD: %.12f, INTERP %.12f\n", joints[0].coarse_pos, joints[0].pos_cmd);
        /* report motion status */
        SET_MOTION_INPOS_FLAG(0);
        if (tpIsDone(&emcmotDebug->coord_tp)) {