diff --git a/README.md b/README.md index f2f0364..0c17971 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,15 @@ QIDI PLUS4 is a 3D printer that uses Klipper as its foundation. This repository For convenience, QIDI provides version-specific packaged files. Please download the necessary compressed package file prefixed with "PLUS4." Select the appropriate branch for download, with each branch name reflecting the corresponding version. -## V1.7.0 Update Content +## V1.7.1 Update Content **Note:** After updating, the Klipper configuration file will be replaced. The previous configuration file will be backed up as `printer_{datetime}.cfg`, printer recalibration will be required. If you have a multi-color box, it is recommended to disconnect the box power supply. After the firmware update is completed, connect the multi-color box again, and the box will automatically update the firmware -1. Support multi-color printing related functions. -2. Fixed the bug that printing cannot be paused during printing. +1. Optimized the resume printing function. +2. Optimized the error message for material wrapping during printing. ## The online update version will be uploaded later. If you have already updated this version earlier, please ignore the online update prompt. diff --git a/UI/xindi_800_480.HMI b/UI/xindi_800_480.HMI index 7d2a9d2..0ccaf7c 100644 Binary files a/UI/xindi_800_480.HMI and b/UI/xindi_800_480.HMI differ diff --git a/UI/xindi_800_480.tft b/UI/xindi_800_480.tft index 2fc26c7..cde0604 100644 Binary files a/UI/xindi_800_480.tft and b/UI/xindi_800_480.tft differ diff --git a/config/box1.cfg b/config/box1.cfg index acb3158..9bfb138 100644 --- a/config/box1.cfg +++ b/config/box1.cfg @@ -57,6 +57,7 @@ target_max_temp: 90 [verify_heater heater_box1] max_error: 400 check_gain_time: 600 +is_box_heter: True [temperature_sensor heater_temp_a_box1] sensor_type: NTC 100K MGB18-104F39050L32 @@ -70,15 +71,17 @@ sensor_pin: mcu_box1:PC2 min_temp: -100 max_temp: 130 -[controller_fan heater_fan_a_box1] +[box_heater_fan heater_fan_a_box1] pin: mcu_box1:PA4 heater: heater_box1 +heater_temp: 35 stepper: idle_timeout: 60 -[controller_fan heater_fan_b_box1] +[box_heater_fan heater_fan_b_box1] pin: mcu_box1:PA5 heater: heater_box1 +heater_temp: 35 stepper: idle_timeout: 60 diff --git a/config/box2.cfg b/config/box2.cfg index b97b6d8..ee23ea6 100644 --- a/config/box2.cfg +++ b/config/box2.cfg @@ -57,6 +57,7 @@ target_max_temp: 90 [verify_heater heater_box2] max_error: 400 check_gain_time: 600 +is_box_heter: True [temperature_sensor heater_temp_a_box2] sensor_type: NTC 100K MGB18-104F39050L32 @@ -70,15 +71,17 @@ sensor_pin: mcu_box2:PC2 min_temp: -100 max_temp: 130 -[controller_fan heater_fan_a_box2] +[box_heater_fan heater_fan_a_box2] pin: mcu_box2:PA4 heater: heater_box2 +heater_temp: 35 stepper: idle_timeout: 60 -[controller_fan heater_fan_b_box2] +[box_heater_fan heater_fan_b_box2] pin: mcu_box2:PA5 heater: heater_box2 +heater_temp: 35 stepper: idle_timeout: 60 diff --git a/config/box3.cfg b/config/box3.cfg index a48ab06..0e2e9e1 100644 --- a/config/box3.cfg +++ b/config/box3.cfg @@ -57,6 +57,7 @@ target_max_temp: 90 [verify_heater heater_box3] max_error: 400 check_gain_time: 600 +is_box_heter: True [temperature_sensor heater_temp_a_box3] sensor_type: NTC 100K MGB18-104F39050L32 @@ -70,15 +71,17 @@ sensor_pin: mcu_box3:PC2 min_temp: -100 max_temp: 130 -[controller_fan heater_fan_a_box3] +[box_heater_fan heater_fan_a_box3] pin: mcu_box3:PA4 heater: heater_box3 +heater_temp: 35 stepper: idle_timeout: 60 -[controller_fan heater_fan_b_box3] +[box_heater_fan heater_fan_b_box3] pin: mcu_box3:PA5 heater: heater_box3 +heater_temp: 35 stepper: idle_timeout: 60 diff --git a/config/box4.cfg b/config/box4.cfg index 6b1650a..303eb50 100644 --- a/config/box4.cfg +++ b/config/box4.cfg @@ -57,6 +57,7 @@ target_max_temp: 90 [verify_heater heater_box4] max_error: 400 check_gain_time: 600 +is_box_heter: True [temperature_sensor heater_temp_a_box4] sensor_type: NTC 100K MGB18-104F39050L32 @@ -70,15 +71,17 @@ sensor_pin: mcu_box4:PC2 min_temp: -100 max_temp: 130 -[controller_fan heater_fan_a_box4] +[box_heater_fan heater_fan_a_box4] pin: mcu_box4:PA4 heater: heater_box4 +heater_temp: 35 stepper: idle_timeout: 60 -[controller_fan heater_fan_b_box4] +[box_heater_fan heater_fan_b_box4] pin: mcu_box4:PA5 heater: heater_box4 +heater_temp: 35 stepper: idle_timeout: 60 diff --git a/config/gcode_macro.cfg b/config/gcode_macro.cfg index bf83376..7acc675 100644 --- a/config/gcode_macro.cfg +++ b/config/gcode_macro.cfg @@ -205,15 +205,50 @@ gcode: _CG28 M204 S10000 {% if (printer.gcode_move.position.y) > 305 %} - G1 X82 Y324 F6000 + G1 X82.5 Y324 F6000 G1 X95 {% else %} - G1 X82 F12000 + G1 X82.5 F12000 G1 Y310 F12000 G1 Y324 F600 G1 X95 F6000 {% endif %} +[gcode_macro EXTRUSION_AND_FLUSH] +gcode: + {% set hotendtemp = params.HOTEND|int %} + MOVE_TO_TRASH + M109 S{hotendtemp} + M83 + G1 E1 F50 + G1 E28.13 F611 + G1 E0.97 F50 + G1 E8.73 F611 + G1 E0.97 F50 + G1 E8.73 F611 + G1 E0.97 F50 + G1 E-2 F1800 + {% for i in range(1,5) %} + M106 S255 + M400 + G4 P6000 + CLEAR_FLUSH + M106 S60 + G1 E34.8 F611 + G1 E1.2 F50 + G1 E10.8 F611 + G1 E1.2 F50 + G1 E10.8 F611 + G1 E1.2 F50 + G1 E-2 F1800 + {% endfor %} + M106 S255 + M400 + G4 P6000 + CLEAR_FLUSH + M106 S60 + + # Excute when start printing, prior to gcode file [gcode_macro PRINT_START] gcode: @@ -247,139 +282,11 @@ gcode: SAVE_VARIABLE VARIABLE=runout_{i} VALUE=0 G4 P100 {% endfor %} + SAVE_VARIABLE VARIABLE=extrude_state VALUE=-1 {% if printer.save_variables.variables.enable_box == 1 %} - {% set last_load_slot = printer.save_variables.variables.last_load_slot|default("slot-1") %} - {% set value_t = printer.save_variables.variables["value_t" ~ extruder]|default("slot" ~ extruder) %} - {% if printer['hall_filament_width_sensor'].Diameter > 0.5 %} - {% if last_load_slot != value_t and last_load_slot != "slot-1" %} - CUT_FILAMENT - MOVE_TO_TRASH - M109 S{hotendtemp} - EXTRUDER_UNLOAD SLOT={last_load_slot} - M83 - G1 E18 F300 - T{extruder} - G1 E1 F50 - G1 E28.13 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E-2 F1800 - {% for i in range(1,5) %} - M106 S255 - M400 - G91 - G1 X-3 F60 - G1 X3 F60 - G90 - CLEAR_FLUSH - M106 S60 - G1 E34.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E-2 F1800 - {% endfor %} - {% elif last_load_slot == value_t and printer.save_variables.variables.slot_sync == "slot-1" %} - MOVE_TO_TRASH - M109 S{hotendtemp} - T{extruder} - M83 - G1 E1 F50 - G1 E28.13 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E-2 F1800 - {% for i in range(1,5) %} - M106 S255 - M400 - G91 - G1 X-3 F60 - G1 X3 F60 - G90 - CLEAR_FLUSH - M106 S60 - G1 E34.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E-2 F1800 - {% endfor %} - {% endif %} - {% else %} - {% if last_load_slot != "slot-1" %} - MOVE_TO_TRASH - M109 S{hotendtemp} - M400 - EXTRUDER_UNLOAD SLOT={last_load_slot} - T{extruder} - M83 - G1 E1 F50 - G1 E28.13 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E-2 F1800 - {% for i in range(1,5) %} - M106 S255 - M400 - G91 - G1 X-3 F60 - G1 X3 F60 - G90 - CLEAR_FLUSH - M106 S60 - G1 E34.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E-2 F1800 - {% endfor %} - {% else %} - MOVE_TO_TRASH - M109 S{hotendtemp} - T{extruder} - M83 - G1 E1 F50 - G1 E28.13 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E8.73 F611 - G1 E0.97 F50 - G1 E-2 F1800 - {% for i in range(1,5) %} - M106 S255 - M400 - G91 - G1 X-3 F60 - G1 X3 F60 - G90 - CLEAR_FLUSH - M106 S60 - G1 E34.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E10.8 F611 - G1 E1.2 F50 - G1 E-2 F1800 - {% endfor %} - {% endif %} - {% endif %} + BOX_PRINT_START EXTRUDER={extruder} HOTENDTEMP={hotendtemp} + M400 + EXTRUSION_AND_FLUSH HOTEND={hotendtemp} {% endif %} {% endif %} M106 S0 @@ -746,41 +653,19 @@ gcode: {% if printer['pause_resume'].is_paused|int == 1 %} {% if printer.save_variables.variables.box_count >= 1 %} {% if printer.save_variables.variables.enable_box == 1 %} - {% set retry_val = printer.save_variables.variables.retry_step %} - {% if retry_val == None %} - {% if printer['hall_filament_width_sensor'].Diameter > 0.5 %} - RESUME_PRINT - {% else %} - {% if printer.save_variables.variables.is_tool_change == 1 %} - RESUME_PRINT - {% endif %} - {% endif %} - {% else %} - {% if (retry_val.startswith('QDE_004_002') - or retry_val.startswith('QDE_004_003') - or retry_val.startswith('QDE_004_004') - or retry_val.startswith('QDE_004_005') - or retry_val.startswith('QDE_004_006') - or retry_val.startswith('QDE_004_009')) %} - TRY_MOVE_AGAIN - {% else %} - {% if printer['hall_filament_width_sensor'].Diameter > 0.5 %} - RESUME_PRINT - {% else %} - {% if printer.save_variables.variables.is_tool_change == 1 %} - RESUME_PRINT - {% endif %} - {% endif %} - {% endif %} - {% endif %} + TRY_RESUME_PRINT {% else %} {% if printer['hall_filament_width_sensor'].Diameter > 0.5 %} RESUME_PRINT + {% else %} + M118 Printer resume failed {% endif %} {% endif %} {% else %} {% if printer['hall_filament_width_sensor'].Diameter > 0.5 %} RESUME_PRINT + {% else %} + M118 Printer resume failed {% endif %} {% endif %} {% endif %} diff --git a/klipper b/klipper index ff03522..4bb7c63 160000 --- a/klipper +++ b/klipper @@ -1 +1 @@ -Subproject commit ff035227c2dc74a767e93786933a4560a790728a +Subproject commit 4bb7c6337936ef273e621d1f55bc0ef92114785d