diff options
author | Jason S. McMullan <jason.mcmullan@gmail.com> | 2021-04-17 06:54:12 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2021-05-26 11:57:57 -0400 |
commit | 913649de2e8057e849be2a54e08d34302ee37dad (patch) | |
tree | b7461d6351d46c73a5ad10e3aa49e7b8ad8facae /test/klippy/sdcard_loop.cfg | |
parent | 4ea434796bb1f5bcc9d44bfcd0d9d66b8476faa9 (diff) | |
download | kutter-913649de2e8057e849be2a54e08d34302ee37dad.tar.gz kutter-913649de2e8057e849be2a54e08d34302ee37dad.tar.xz kutter-913649de2e8057e849be2a54e08d34302ee37dad.zip |
loop_sdcard: Add loopable SD card file sections
To support continuous belt printing, add nestable repeat
loop support via an `[sdcard_loop]` module.
Supported G-Code:
- SDCARD_LOOP_BEGIN COUNT=n ; Loop for N times, or infinitely if N is 0
- SDCARD_LOOP_END ; End of loop
- SDCARD_LOOP_DESIST ; Complete all loops without iterating
Marlin M808 compatibility example in `config/sample-macros.cfg`:
- M808 Ln ; Loop for N times, or infinitely if N is 0
- M808 ; End of loop
- M808 K ; Complete all loops without iterating
Added unit tests in test/klippy/sdcard_loop.test
See https://reprap.org/wiki/G-code#M808:_Set_or_Goto_Repeat_Marker
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
Diffstat (limited to 'test/klippy/sdcard_loop.cfg')
-rw-r--r-- | test/klippy/sdcard_loop.cfg | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/test/klippy/sdcard_loop.cfg b/test/klippy/sdcard_loop.cfg new file mode 100644 index 00000000..27844512 --- /dev/null +++ b/test/klippy/sdcard_loop.cfg @@ -0,0 +1,89 @@ +# Test config for sdcard_loop +[virtual_sdcard] +path: test/klippy/sdcard_loop + +[display_status] + +# Override to support unlimited belt size +# (homing Z simply resets its virtual position to 0.0) +[homing_override] +axes: xyz +set_position_x: 0 +set_position_y: 0 +set_position_z: 0 +gcode: + G92 X0 Y0 Z0 + + +[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: 200000000 + +[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 + +[sdcard_loop] + +[gcode_macro M808] +gcode: + {% if params.K is not defined and params.L is defined %}SDCARD_LOOP_BEGIN COUNT={params.L|int}{% endif %} + {% if params.K is not defined and params.L is not defined %}SDCARD_LOOP_END{% endif %} + {% if params.K is defined and params.L is not defined %}SDCARD_LOOP_DESIST{% endif %} |