2019-05-29 01:11:51 +02:00
|
|
|
# Test config with macros
|
|
|
|
[stepper_x]
|
|
|
|
step_pin: ar54
|
|
|
|
dir_pin: ar55
|
|
|
|
enable_pin: !ar38
|
|
|
|
step_distance: .0125
|
|
|
|
endstop_pin: ^ar3
|
|
|
|
position_endstop: 0
|
|
|
|
position_max: 200
|
|
|
|
homing_speed: 50
|
|
|
|
|
|
|
|
[stepper_y]
|
|
|
|
step_pin: ar60
|
|
|
|
dir_pin: !ar61
|
|
|
|
enable_pin: !ar56
|
|
|
|
step_distance: .0125
|
|
|
|
endstop_pin: ^ar14
|
|
|
|
position_endstop: 0
|
|
|
|
position_max: 200
|
|
|
|
homing_speed: 50
|
|
|
|
|
|
|
|
[stepper_z]
|
|
|
|
step_pin: ar46
|
|
|
|
dir_pin: ar48
|
|
|
|
enable_pin: !ar62
|
|
|
|
step_distance: .0025
|
|
|
|
endstop_pin: ^ar18
|
|
|
|
position_endstop: 0.5
|
|
|
|
position_max: 200
|
|
|
|
|
|
|
|
[extruder]
|
|
|
|
step_pin: ar26
|
|
|
|
dir_pin: ar28
|
|
|
|
enable_pin: !ar24
|
|
|
|
step_distance: .004242
|
|
|
|
nozzle_diameter: 0.500
|
|
|
|
filament_diameter: 3.500
|
|
|
|
heater_pin: ar10
|
|
|
|
sensor_type: EPCOS 100K B57560G104F
|
|
|
|
sensor_pin: analog13
|
|
|
|
control: pid
|
|
|
|
pid_Kp: 22.2
|
|
|
|
pid_Ki: 1.08
|
|
|
|
pid_Kd: 114
|
|
|
|
min_temp: 0
|
|
|
|
max_temp: 210
|
|
|
|
|
|
|
|
[heater_bed]
|
|
|
|
heater_pin: ar8
|
|
|
|
sensor_type: EPCOS 100K B57560G104F
|
|
|
|
sensor_pin: analog14
|
|
|
|
control: watermark
|
|
|
|
min_temp: 0
|
|
|
|
max_temp: 110
|
|
|
|
|
|
|
|
[mcu]
|
|
|
|
serial: /dev/ttyACM0
|
|
|
|
pin_map: arduino
|
|
|
|
|
|
|
|
[printer]
|
|
|
|
kinematics: cartesian
|
|
|
|
max_velocity: 300
|
|
|
|
max_accel: 3000
|
|
|
|
max_z_velocity: 5
|
|
|
|
max_z_accel: 100
|
|
|
|
|
|
|
|
[gcode_macro TEST_SAVE_RESTORE]
|
|
|
|
gcode:
|
|
|
|
SAVE_GCODE_STATE NAME=TESTIT1
|
|
|
|
G92 Z10
|
|
|
|
RESTORE_GCODE_STATE NAME=TESTIT1
|
|
|
|
G92 Z0
|
|
|
|
|
|
|
|
[gcode_macro TEST_expression]
|
|
|
|
gcode:
|
|
|
|
{% if printer.gcode.gcode_position.x != 0.0 %}
|
|
|
|
M112
|
|
|
|
{% else %}
|
|
|
|
{ printer.gcode.action_respond_info("TEST_expression") }
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
[gcode_macro TEST_variable]
|
2019-06-08 01:30:17 +02:00
|
|
|
variable_t: 12.0
|
2019-05-29 01:11:51 +02:00
|
|
|
gcode:
|
|
|
|
{ printer.gcode.action_respond_info("TEST_variable") }
|
2019-06-08 01:30:17 +02:00
|
|
|
{% if t - 12.0 != printer.toolhead.position.y %}
|
2019-05-29 01:11:51 +02:00
|
|
|
M112
|
|
|
|
{% endif %}
|
2019-06-08 01:30:17 +02:00
|
|
|
{% if printer["gcode_macro TEST_variable"].t - 12.0 != 0.0 %}
|
2019-05-29 01:11:51 +02:00
|
|
|
M112
|
|
|
|
{% endif %}
|
|
|
|
SET_GCODE_VARIABLE MACRO=TEST_variable VARIABLE=t VALUE=17
|
|
|
|
TEST_variable_part2
|
|
|
|
|
|
|
|
[gcode_macro TEST_variable_part2]
|
|
|
|
gcode:
|
|
|
|
{ printer.gcode.action_respond_info("TEST_variable_part2") }
|
2019-06-08 01:30:17 +02:00
|
|
|
{% if printer["gcode_macro TEST_variable"].t != 17.0 %}
|
2019-05-29 01:11:51 +02:00
|
|
|
M112
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
[gcode_macro TEST_param]
|
|
|
|
gcode:
|
|
|
|
{ printer.gcode.action_respond_info("TEST_param") }
|
|
|
|
{% if params.T != "123" %}
|
|
|
|
M112
|
|
|
|
{% endif %}
|
|
|
|
|
2019-06-04 18:41:28 +02:00
|
|
|
[gcode_macro TEST_in]
|
|
|
|
gcode:
|
|
|
|
{% if "abc" in printer or "gcode" not in printer %}
|
|
|
|
M112
|
|
|
|
{% endif %}
|
|
|
|
|
2019-05-29 01:11:51 +02:00
|
|
|
# Main test start point
|
|
|
|
[gcode_macro TESTIT]
|
|
|
|
gcode:
|
|
|
|
TEST_SAVE_RESTORE
|
|
|
|
TEST_expression
|
|
|
|
TEST_variable
|
|
|
|
TEST_param T=123
|
2019-06-04 18:41:28 +02:00
|
|
|
TEST_in
|