2019-05-29 01:11:51 +02:00
|
|
|
# Test config with macros
|
|
|
|
[stepper_x]
|
2021-10-25 03:11:53 +02:00
|
|
|
step_pin: PF0
|
|
|
|
dir_pin: PF1
|
|
|
|
enable_pin: !PD7
|
2021-10-25 02:53:36 +02:00
|
|
|
microsteps: 16
|
|
|
|
rotation_distance: 40
|
2021-10-25 03:11:53 +02:00
|
|
|
endstop_pin: ^PE5
|
2019-05-29 01:11:51 +02:00
|
|
|
position_endstop: 0
|
|
|
|
position_max: 200
|
|
|
|
homing_speed: 50
|
|
|
|
|
|
|
|
[stepper_y]
|
2021-10-25 03:11:53 +02:00
|
|
|
step_pin: PF6
|
|
|
|
dir_pin: !PF7
|
|
|
|
enable_pin: !PF2
|
2021-10-25 02:53:36 +02:00
|
|
|
microsteps: 16
|
|
|
|
rotation_distance: 40
|
2021-10-25 03:11:53 +02:00
|
|
|
endstop_pin: ^PJ1
|
2019-05-29 01:11:51 +02:00
|
|
|
position_endstop: 0
|
|
|
|
position_max: 200
|
|
|
|
homing_speed: 50
|
|
|
|
|
|
|
|
[stepper_z]
|
2021-10-25 03:11:53 +02:00
|
|
|
step_pin: PL3
|
|
|
|
dir_pin: PL1
|
|
|
|
enable_pin: !PK0
|
2021-10-25 02:53:36 +02:00
|
|
|
microsteps: 16
|
|
|
|
rotation_distance: 8
|
2021-10-25 03:11:53 +02:00
|
|
|
endstop_pin: ^PD3
|
2019-05-29 01:11:51 +02:00
|
|
|
position_endstop: 0.5
|
|
|
|
position_max: 200
|
|
|
|
|
|
|
|
[extruder]
|
2021-10-25 03:11:53 +02:00
|
|
|
step_pin: PA4
|
|
|
|
dir_pin: PA6
|
|
|
|
enable_pin: !PA2
|
2021-10-25 02:53:36 +02:00
|
|
|
microsteps: 16
|
|
|
|
rotation_distance: 33.5
|
2019-05-29 01:11:51 +02:00
|
|
|
nozzle_diameter: 0.500
|
|
|
|
filament_diameter: 3.500
|
2021-10-25 03:11:53 +02:00
|
|
|
heater_pin: PB4
|
2019-05-29 01:11:51 +02:00
|
|
|
sensor_type: EPCOS 100K B57560G104F
|
2021-10-25 03:11:53 +02:00
|
|
|
sensor_pin: PK5
|
2019-05-29 01:11:51 +02:00
|
|
|
control: pid
|
|
|
|
pid_Kp: 22.2
|
|
|
|
pid_Ki: 1.08
|
|
|
|
pid_Kd: 114
|
|
|
|
min_temp: 0
|
|
|
|
max_temp: 210
|
|
|
|
|
|
|
|
[heater_bed]
|
2021-10-25 03:11:53 +02:00
|
|
|
heater_pin: PH5
|
2019-05-29 01:11:51 +02:00
|
|
|
sensor_type: EPCOS 100K B57560G104F
|
2021-10-25 03:11:53 +02:00
|
|
|
sensor_pin: PK6
|
2019-05-29 01:11:51 +02:00
|
|
|
control: watermark
|
|
|
|
min_temp: 0
|
|
|
|
max_temp: 110
|
|
|
|
|
|
|
|
[mcu]
|
|
|
|
serial: /dev/ttyACM0
|
|
|
|
|
|
|
|
[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:
|
2020-08-05 17:43:45 +02:00
|
|
|
{% if printer.gcode_move.gcode_position.x != 0.0 %}
|
2019-05-29 01:11:51 +02:00
|
|
|
M112
|
|
|
|
{% else %}
|
2020-08-16 21:39:30 +02:00
|
|
|
{ action_respond_info("TEST_expression") }
|
2019-05-29 01:11:51 +02:00
|
|
|
{% 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:
|
2020-08-16 21:39:30 +02:00
|
|
|
{ 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:
|
2020-08-16 21:39:30 +02:00
|
|
|
{ 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:
|
2020-08-16 21:39:30 +02:00
|
|
|
{ action_respond_info("TEST_param") }
|
2019-05-29 01:11:51 +02:00
|
|
|
{% if params.T != "123" %}
|
|
|
|
M112
|
|
|
|
{% endif %}
|
|
|
|
|
2019-06-04 18:41:28 +02:00
|
|
|
[gcode_macro TEST_in]
|
|
|
|
gcode:
|
2020-08-05 17:43:45 +02:00
|
|
|
{% if "abc" in printer or "toolhead" not in printer %}
|
2019-06-04 18:41:28 +02:00
|
|
|
M112
|
|
|
|
{% endif %}
|
|
|
|
|
2021-10-10 01:57:55 +02:00
|
|
|
# A utf8 test (with utf8 characters such as ° )
|
|
|
|
[gcode_macro TEST_unicode] ; Also test end-of-line comments ( ° )
|
|
|
|
variable_ABC: 25 # Another end-of-line comment test ( ° )
|
|
|
|
description: A unicode test °
|
|
|
|
gcode: G28
|
|
|
|
|
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
|
2021-10-10 01:57:55 +02:00
|
|
|
TEST_unicode
|
2019-06-04 18:41:28 +02:00
|
|
|
TEST_in
|