-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[respond] | ||
|
||
[gcode_macro CARTOGRAPHER_CI_TEST] | ||
variable_stages = ["G28", "PROBE", "PROBE_ACCURACY", "BED_MESH_CALIBRATE", "CARTOGRAPHER_CALIBRATE METHOD=manual", "CARTOGRAPHER_THRESHOLD_SCAN", "CARTOGRAPHER_CALIBRATE", "CARTOGRAPHER_TOUCH"] | ||
variable_stage_index = 0 | ||
gcode: | ||
{% set stage_count = stages | length %} | ||
{action_respond_info("Executing %s" % (stages[stage_index]))} | ||
{stages[stage_index]} | ||
M400 | ||
G28 Z | ||
{% set next_index = stage_index + 1 %} | ||
RESPOND TYPE=command MSG='{"action:prompt_begin Cartographer CI Tests [%d / %d]" % (next_index, stage_count)}' | ||
{% if next_index < stage_count %} | ||
RESPOND TYPE=command MSG='{"action:prompt_text Next test is %s" % (stages[next_index])}' | ||
RESPOND TYPE=command MSG="action:prompt_footer_button ABORT|_CARTOGRAPHER_CI_TEST_ABORT|error" | ||
RESPOND TYPE=command MSG="action:prompt_footer_button Continue|_CARTOGRAPHER_CI_TEST_CONTINUE|primary" | ||
{% else %} | ||
RESPOND TYPE=command MSG="action:prompt_text All tests completed!!" | ||
SET_GCODE_VARIABLE MACRO=CARTOGRAPHER_CI_TEST VARIABLE=stage_index VALUE=0 | ||
{% endif %} | ||
RESPOND TYPE=command MSG="action:prompt_show" | ||
|
||
[gcode_macro _CARTOGRAPHER_CI_TEST_CONTINUE] | ||
gcode: | ||
RESPOND TYPE=command MSG="action:prompt_end" | ||
{% set vars = printer["gcode_macro CARTOGRAPHER_CI_TEST"]%} | ||
SET_GCODE_VARIABLE MACRO=CARTOGRAPHER_CI_TEST VARIABLE=stage_index VALUE={vars.stage_index + 1} | ||
CARTOGRAPHER_CI_TEST | ||
|
||
[gcode_macro _CARTOGRAPHER_CI_TEST_ABORT] | ||
gcode: | ||
RESPOND TYPE=command MSG="action:prompt_end" | ||
SET_GCODE_VARIABLE MACRO=CARTOGRAPHER_CI_TEST VARIABLE=stage_index VALUE=0 | ||
{action_respond_info("Cartographer CI tests aborted.")} | ||
|