Preserve LinuxCNC M61 tool-number line
This commit is contained in:
@@ -38,6 +38,7 @@ CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linux
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/basic_mill.ngc >/tmp/cnc_sim_linuxcnc_basic_mill.json
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_rtcp_controls.ngc >/tmp/cnc_sim_linuxcnc_rtcp_controls.json
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_spindle_direction.ngc >/tmp/cnc_sim_linuxcnc_spindle_direction.json
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_tool_number.ngc >/tmp/cnc_sim_linuxcnc_tool_number.json
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_canned_cycle.ngc >/tmp/cnc_sim_linuxcnc_canned_cycle.json
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_comments.ngc >/tmp/cnc_sim_linuxcnc_comments.json
|
||||
CNC_SIM_RS274_VAR="$var_file" "$build_dir/linuxcnc_rs274_dump" tests/gcode/linuxcnc_probe_no_error.ngc >/tmp/cnc_sim_linuxcnc_probe_no_error.json
|
||||
@@ -85,6 +86,15 @@ if (3, 1200, 2) not in spindle_states:
|
||||
if (4, 0, 0) not in spindle_states:
|
||||
raise SystemExit("missing M5 stopped spindle state")
|
||||
|
||||
tool_number = json.loads(Path("/tmp/cnc_sim_linuxcnc_tool_number.json").read_text())
|
||||
if not any(
|
||||
event["type"] == "tool-change" and
|
||||
event["line"] == 2 and
|
||||
event["tool"] == 1
|
||||
for event in tool_number
|
||||
):
|
||||
raise SystemExit("missing M61 Q1 tool-number event line")
|
||||
|
||||
cycle = json.loads(Path("/tmp/cnc_sim_linuxcnc_canned_cycle.json").read_text())
|
||||
motions = [event for event in cycle if event["type"] in {"rapid", "linear-feed"}]
|
||||
expected_cycle = [
|
||||
@@ -161,6 +171,7 @@ echo "dumped /tmp/cnc_sim_linuxcnc_basic_motion.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_basic_mill.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_rtcp_controls.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_spindle_direction.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_tool_number.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_canned_cycle.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_comments.json"
|
||||
echo "dumped /tmp/cnc_sim_linuxcnc_probe_no_error.json"
|
||||
|
||||
Reference in New Issue
Block a user