diff --git a/display_menu.cfg b/display_menu.cfg new file mode 100644 index 0000000..1e4eef7 --- /dev/null +++ b/display_menu.cfg @@ -0,0 +1,145 @@ +##################################################################### +# Display Menu definition +##################################################################### + +# Removed items +[menu __main __octoprint] +type: disabled + +## PreHeat +[menu __main __temp __preheat_pla] +type: disabled + +[menu __main __temp __preheat_abs] +type: disabled + +## use own load and unload macro +[menu __main __filament __loadf] +type: disabled + +[menu __main __filament __loads] +type: disabled + +[menu __main __filament __unloadf] +type: disabled + +[menu __main __filament __unloads] +type: disabled + +## Delta Calibration +[menu __main __setup __calib __delta_calib_auto] +type: disabled + +[menu __main __setup __calib __delta_calib_man] +type: disabled + + +# Added Items to the Stock menu +[menu __main __filament __preheat_pla] +type: command +name: Preheat for PLA +gcode: + PREHEAT EXTRUDER_TEMP=190 + +[menu __main __filament __preheat_abs] +type: command +name: Preheat for ABS +gcode: + PREHEAT EXTRUDER_TEMP=210 + +[menu __main __filament __load] +type: command +name: Load Filament +gcode: + FILAMENT_LOAD + +[menu __main __filament __unload] +type: command +name: Unload Filament +gcode: + FILAMENT_UNLOAD + +[menu __main __filament __purge] +type: command +name: Purge Filament (10mm) +gcode: + FILAMENT_PURGE + +## Probe & Endstop Z-Offset calibration +[menu __main __setup __calib __Z_offset] +type: list +enable: {not printer.idle_timeout.state == "Printing"} +name: Z offset + +[menu __main __setup __calib __Z_offset __start] +type: input +enable: {not printer.idle_timeout.state == "Printing"} +name: Do {['None','Probe','Endstop'][menu.input|int]} +input: 0 +input_min: 0 +input_max: 2 +input_step: 1 +gcode: + {%- if menu.event == 'long_click' -%} + {menu.back()} + {%- if menu.input|int == 1 -%} + {action_respond_info("Start Probe calibration")} + PROBE_CALIBRATE + {%- elif menu.input|int == 2 -%} + {action_respond_info(" Start Z-Endstop calibration")} + Z_ENDSTOP_CALIBRATE + {%- endif -%} + {%- endif -%} + +[menu __main __setup __calib __Z_offset __move_z] +type: input +name: Move Z: {'%03.2f' % menu.input} +input: {printer.gcode_move.gcode_position.z} +input_step: 1 +realtime: True +gcode: + {%- if menu.event == 'change' -%} + G1 Z{'%.2f' % menu.input} + {%- elif menu.event == 'long_click' -%} + G1 Z{'%.2f' % menu.input} + SAVE_GCODE_STATE NAME=__move__axis + G91 + G1 Z2 + G1 Z-2 + RESTORE_GCODE_STATE NAME=__move__axis + {%- endif -%} + +[menu __main __setup __calib __Z_offset __test_z] +type: input +name: Test Z: {['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]} +input: 5 +input_min: 0 +input_max: 11 +input_step: 1 +gcode: + {%- if menu.event == 'long_click' -%} + TESTZ Z={['++','+','+.01','+.05','+.1','+.5','-.5','-.1','-.05','-.01','-','--'][menu.input|int]} + {%- endif -%} + +[menu __main __setup __calib __Z_offset __test_z_live] +type: input +name: Test Z : {'%03.3f' % menu.input} +input: 0 +input_min: -5.0 +input_max: 5.0 +input_step: 0.01 +realtime: True +gcode: + {%- if menu.event == 'long_click' -%} + TESTZ Z={'%.3f' % menu.input} + {%- endif -%} + +[menu __main __setup __calib __Z_offset __accept] +type: command +name: Accept +gcode: ACCEPT + +[menu __main __setup __calib __Z_offset __abort] +type: command +name: Abort +gcode: ABORT diff --git a/macros.cfg b/macros.cfg index 4a4911c..e6fed9e 100644 --- a/macros.cfg +++ b/macros.cfg @@ -1,50 +1,87 @@ - [gcode_macro G32] gcode: - BED_MESH_CLEAR - G28 - QUAD_GANTRY_LEVEL - G28 - G0 X150 Y150 Z30 F3600 - + BED_MESH_CLEAR + G28 + QUAD_GANTRY_LEVEL + G28 + G0 X150 Y150 Z30 F3600 + + +[gcode_macro FILAMENT_UNLOAD] +description: unload filament +gcode: + {% if printer.extruder.can_extrude|lower == 'true' %} + M83 # e relative coordinates + G0 E-75 F3000 # unload + M82 # e absolute coordinates + {% else %} + {action_respond_info("extruder not hot enough")} + {% endif %} + + +[gcode_macro FILAMENT_LOAD] +description: load filament +gcode: + {% if printer.extruder.can_extrude|lower == 'true' %} + M83 # e relative coordinates + G0 E75 F3000 + G0 E30 F300 + M82 # e absolute coordinates + {% else %} + {action_respond_info("extruder not hot enough")} + {% endif %} + + +[gcode_macro FILAMENT_PURGE] +description: purge filament +gcode: + {% set e = params.e|default(10)|float %} + {% if printer.extruder.can_extrude|lower == 'true' %} + M83 # e relative coordinates + G1 E-{e} F300 + M82 # e absolute coordinates + {% else %} + {action_respond_info("extruder not hot enough")} + {% endif %} + [gcode_macro PRINT_START] -# Use PRINT_START for the slicer starting script - please customise for your slicer of choice gcode: - M140 S{BED} # start bed heating - M104 S{EXTRUDER} # start extruder heating + M117 >> configuring + SET_LED LED=caselight RED=0.00 GREEN=0.00 BLUE=0.50 + M140 S{BED} # start bed heating + M104 S{EXTRUDER} # start extruder heating + G92 E0 # reset extruder + G21 # set units to millimeters + G90 # use absolute coordinates + M83 # use relative distances for extrusion + G4 P1000 - M117 home - G32 ; home all axes - G1 Z20 F3000 ; move nozzle away from bed + M117 >> homing + SET_LED LED=caselight RED=0.00 GREEN=0.50 BLUE=0.00 + G32 # home all axes - M117 wait for heating - G92 E0 # reset extruder - M190 S{BED} # set and wait for bed temperature - M109 S{EXTRUDER} # set and wait for nozzle temperature + M117 >> heating + SET_LED LED=caselight RED=0.50 GREEN=0.00 BLUE=0.00 + G92 E0 # reset extruder + M190 S{BED} # set and wait for bed temperature + M109 S{EXTRUDER} # set and wait for nozzle temperature - M117 clean nozzle - G0 Z5 F300 # move Z to travel height - G0 X75 Y0 F5000 # move to start position - G0 Z0.2 F1500 # lower Z - G0 X225 Y0 Z0.2 E30 # draw line - G0 X225 Y0.8 Z0.2 # move to the side little - G0 X75 Y0.8 Z0.2 E15 # draw fine line + M117 >> starting + SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50 - M117 starting - [gcode_macro PRINT_END] -# Use PRINT_END for the slicer ending script - please customise for your slicer of choice gcode: - M400 ; wait for buffer to clear - G92 E0 ; zero the extruder - G1 E-10.0 F3600 ; retract filament - G91 ; relative positioning - G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing - TURN_OFF_HEATERS - M107 ; turn off fan - G1 Z2 F3000 ; move nozzle up 2mm - G90 ; absolute positioning - G0 X125 Y250 F3600 ; park nozzle at rear - BED_MESH_CLEAR + M117 >> finished + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-10.0 F3600 ; retract filament + G91 ; relative positioning + G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing + TURN_OFF_HEATERS + M107 ; turn off fan + G1 Z2 F3000 ; move nozzle up 2mm + G90 ; absolute positioning + G0 X125 Y250 F3600 ; park nozzle at rear + BED_MESH_CLEAR diff --git a/printer.cfg b/printer.cfg index 15f5e3b..3b5a3af 100644 --- a/printer.cfg +++ b/printer.cfg @@ -47,6 +47,7 @@ square_corner_velocity: 5.0 [include fluidd.cfg] [include macros.cfg] [include display.cfg] +[include display_menu.cfg] [include neopixel.cfg] [include fans.cfg]