This test verifies that stat->task.queuedMDIcommands (aka
stat.queued_mdi_command in python-land) grows as we add MDI commands to
Task's MDI queue and shrinks as Task executes them.
This test currently fails because queuedMDIcommands is always 0. I fix
Task in the following commit to set it correctly.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This test verifies that the "active g-codes" F-word is correct after
a synch (eg, after an Abort or after a switch into and back out of
Manual mode). It replicates github Issue #180, reported by @fixerslo.
The test is marked "skip" for now, i'll remove the skip marker after I
fix it in the next few commits.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This test tries to hit a race condition where an MDI command is
executed when a queue buster is waiting to be restarted after
INTERP_EXEC_FINISH.
I don't know how to hit this condition reliably, and this test may not
hit the race on other systems. On my Intel Core 2 laptop in sim mode,
it hits the race by the third iteration about 90% of the time.
Fix is to follow.
Signed-off-by: John Morris <john@zultron.com>
CNC milling machines primarily use Z axis TLO.
Also add comments to help sort out identical sections of tests in test
diff output.
Signed-off-by: John Morris <john@zultron.com>
Enable cutter comp then turn it off again without a cutter comp entry
move: the next move goes to the wrong location.
This reproduces issue #160.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This was accidentally using the global name of the status buffer,
instead of the local, passed in name.
It worked, but it was still wrong.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Before this patch, sluggish startup of Task & Interp could cause false
failures of this test.
Wait for Task to finish initializing the Stat buffer, and for Interp to
be Idle, before asserting that the RS274NGC_STARTUP_CODE ran successfully.
Verified by (temporarily) changing the tests's startup code to "G4 P15",
the wait code timed out and threw an exception.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
TimeoutException was added in Python 3. Python 2 doesn't have anything
quite like it, so just use the catch-all general-purpose RuntimeException
instead.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Remove a line mistakenly added to `control_back_to()`. Comment item 3
was the tipoff that this used to work:
// 3 -- skip to the o_word (will be an error if not found)
Signed-off-by: John Morris <john@zultron.com>
M30 and M02 reset interp's `remap_level`. Combining in a block with a
remapped code triggers the error 'BUG: remap_level < 0 : -1'.
Signed-off-by: John Morris <john@zultron.com>
In very specific circumstances, a "duplicate O-word label" error may
be triggered in remapped codes. See README file for details.
Signed-off-by: John Morris <john@zultron.com>
Verify that sequence numbers are restored properly *at all levels*
after returning from remap.
In second-level and deeper remaps, a regression causes
`sequence_number` to be reset to that of the top-level file after
return from the remap. This causes subtle bugs in rare cases, such as
one triggering the "duplicate O-word label" sanity check.
Signed-off-by: John Morris <john@zultron.com>
The RS274NGC_STARTUP_CODE is a tool offset load; the test confirms
this value is loaded from the tool table and shows up in the stat
buffer upon startup.
Signed-off-by: Chris Radek <chris@timeguy.com>
In b996c77 Seb correctly determined that emcTaskPlanInit() was being
called twice, and removed the second one. However, this second call
was working around a problem where Interp::init() placed important
startup messages on the interp list, and then they were discarded by
emcTaskSetState() calling emcTaskAbort() which clears the interp list.
Since I think it's important for SetState and SetMode to still
TaskAbort in non-startup situations, I remove those calls from startup
and call directly the things startup needs.
This restores the correct behavior of the stat buffer having nonzero
g5x index and corresponding offsets at startup (and therefore AXIS's
DRO and preview are correct), and also the operation of
RS274NGC_STARTUP_CODE.
The two tests needed adjusting because task startup no longer calls
emcMotionAbort() twice.
Signed-off-by: Chris Radek <chris@timeguy.com>
drain the interp_list after Task init and Abort.
Don't clear the interp_list on Abort, if we're draining.
Fixes#49.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This commit doesn't change any test content, it only adds comments to
try to make sense of the Motion commands generated during test startup.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This augments the motion-logger/basic test to allow comments in the
'expected' files. The 'expected' files are preprocessed to remove
comment lines and empty lines before being compared to the actual output.
The 'expected.builtin-startup' file is renamed with a '.in' extension to
trigger this kind of preprocessing. No actual test content was changed
with this commit.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
The symptom is that after aborting a program that changes which G5x
coordinate system is active, the stat buffer still has the old g5x_index
and g5x_offsets.
The interp parameters have the correct values, it's just the stat buffer
that's affected.
Fixed in the commits that follow.
Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>