Skip to content

Instantly share code, notes, and snippets.

@ibressler
Last active February 10, 2017 11:51
Show Gist options
  • Save ibressler/2693a5a225606121aef385420c984f7f to your computer and use it in GitHub Desktop.
Save ibressler/2693a5a225606121aef385420c984f7f to your computer and use it in GitHub Desktop.
LinuxCNC MDI queue quick fix
diff --git a/src/emc/motion/command.c b/src/emc/motion/command.c
index da081d4..58cd81d 100644
--- a/src/emc/motion/command.c
+++ b/src/emc/motion/command.c
@@ -1026,7 +1026,7 @@ void emcmotCommandHandler(void *arg, long period)
emcmotStatus->atspeed_next_feed = 1;
}
/* append it to the emcmotDebug->coord_tp */
- tpSetId(&emcmotDebug->coord_tp, emcmotCommand->id);
+// tpSetId(&emcmotDebug->coord_tp, emcmotCommand->id);
int res_addline = tpAddLine(&emcmotDebug->coord_tp, emcmotCommand->pos, emcmotCommand->motion_type,
emcmotCommand->vel, emcmotCommand->ini_maxvel,
emcmotCommand->acc, emcmotStatus->enables_new, issue_atspeed,
diff --git a/src/emc/tp/tp.c b/src/emc/tp/tp.c
index e3429a1..cbfa57f 100644
--- a/src/emc/tp/tp.c
+++ b/src/emc/tp/tp.c
@@ -2512,6 +2512,7 @@ STATIC int tpCompleteSegment(TP_STRUCT * const tp,
// done with this move
tcqRemove(&tp->queue, 1);
tp_debug_print("Finished tc id %d\n", tc->id);
+ tp->depth = tcqLen(&tp->queue);
return TP_ERR_OK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment