|
@@ -643,89 +643,86 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
|
643
|
643
|
select_multiplexed_stepper(tmp_extruder);
|
644
|
644
|
#endif
|
645
|
645
|
|
646
|
|
- #if EXTRUDERS > 1
|
|
646
|
+ #if ENABLED(SINGLENOZZLE)
|
647
|
647
|
|
648
|
|
- #if ENABLED(SINGLENOZZLE)
|
|
648
|
+ #if ENABLED(PREVENT_COLD_EXTRUSION)
|
|
649
|
+ if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder) && sn_settings.swap_length) {
|
|
650
|
+ SERIAL_ERROR_START();
|
|
651
|
+ SERIAL_ERRORLNPGM(MSG_HOTEND_TOO_COLD);
|
|
652
|
+ active_extruder = tmp_extruder;
|
|
653
|
+ return;
|
|
654
|
+ }
|
|
655
|
+ #endif
|
649
|
656
|
|
650
|
|
- #if ENABLED(PREVENT_COLD_EXTRUSION)
|
651
|
|
- if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder) && sn_settings.swap_length) {
|
652
|
|
- SERIAL_ERROR_START();
|
653
|
|
- SERIAL_ERRORLNPGM(MSG_HOTEND_TOO_COLD);
|
654
|
|
- active_extruder = tmp_extruder;
|
655
|
|
- return;
|
656
|
|
- }
|
657
|
|
- #endif
|
|
657
|
+ #if FAN_COUNT > 0
|
|
658
|
+ singlenozzle_fan_speed[active_extruder] = fan_speed[0];
|
|
659
|
+ fan_speed[0] = singlenozzle_fan_speed[tmp_extruder];
|
|
660
|
+ #endif
|
658
|
661
|
|
659
|
|
- #if FAN_COUNT > 0
|
660
|
|
- singlenozzle_fan_speed[active_extruder] = fan_speed[0];
|
661
|
|
- fan_speed[0] = singlenozzle_fan_speed[tmp_extruder];
|
662
|
|
- #endif
|
|
662
|
+ if (!no_move) set_destination_from_current();
|
663
|
663
|
|
664
|
|
- if (!no_move) set_destination_from_current();
|
|
664
|
+ if (sn_settings.swap_length) {
|
|
665
|
+ #if ENABLED(ADVANCED_PAUSE_FEATURE)
|
|
666
|
+ do_pause_e_move(-sn_settings.swap_length, MMM_TO_MMS(sn_settings.retract_speed));
|
|
667
|
+ #else
|
|
668
|
+ current_position[E_AXIS] -= sn_settings.swap_length / planner.e_factor[active_extruder];
|
|
669
|
+ planner.buffer_line(current_position, MMM_TO_MMS(sn_settings.retract_speed), active_extruder);
|
|
670
|
+ #endif
|
|
671
|
+ }
|
665
|
672
|
|
666
|
|
- if (sn_settings.swap_length) {
|
667
|
|
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
|
668
|
|
- do_pause_e_move(-sn_settings.swap_length, MMM_TO_MMS(sn_settings.retract_speed));
|
|
673
|
+ if (!no_move) {
|
|
674
|
+ current_position[Z_AXIS] += (
|
|
675
|
+ #if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
|
676
|
+ singlenozzle_change_point.z
|
669
|
677
|
#else
|
670
|
|
- current_position[E_AXIS] -= sn_settings.swap_length / planner.e_factor[active_extruder];
|
671
|
|
- planner.buffer_line(current_position, MMM_TO_MMS(sn_settings.retract_speed), active_extruder);
|
|
678
|
+ SINGLENOZZLE_TOOLCHANGE_ZRAISE
|
672
|
679
|
#endif
|
673
|
|
- }
|
|
680
|
+ );
|
674
|
681
|
|
675
|
|
- if (!no_move) {
|
676
|
|
- current_position[Z_AXIS] += (
|
677
|
|
- #if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
678
|
|
- singlenozzle_change_point.z
|
679
|
|
- #else
|
680
|
|
- SINGLENOZZLE_TOOLCHANGE_ZRAISE
|
681
|
|
- #endif
|
682
|
|
- );
|
683
|
|
-
|
684
|
|
- planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
|
|
682
|
+ planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[Z_AXIS], active_extruder);
|
685
|
683
|
|
686
|
|
- #if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
687
|
|
- current_position[X_AXIS] = singlenozzle_change_point.x;
|
688
|
|
- current_position[Y_AXIS] = singlenozzle_change_point.y;
|
689
|
|
- planner.buffer_line(current_position, MMM_TO_MMS(SINGLENOZZLE_PARK_XY_FEEDRATE), active_extruder);
|
690
|
|
- #endif
|
691
|
|
- }
|
|
684
|
+ #if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
|
685
|
+ current_position[X_AXIS] = singlenozzle_change_point.x;
|
|
686
|
+ current_position[Y_AXIS] = singlenozzle_change_point.y;
|
|
687
|
+ planner.buffer_line(current_position, MMM_TO_MMS(SINGLENOZZLE_PARK_XY_FEEDRATE), active_extruder);
|
|
688
|
+ #endif
|
|
689
|
+ }
|
692
|
690
|
|
693
|
|
- singlenozzle_temp[active_extruder] = thermalManager.target_temperature[0];
|
694
|
|
- if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) {
|
695
|
|
- thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0);
|
696
|
|
- #if ENABLED(ULTRA_LCD)
|
697
|
|
- thermalManager.set_heating_message(0);
|
698
|
|
- #endif
|
699
|
|
- (void)thermalManager.wait_for_hotend(0, false); // Wait for heating or cooling
|
700
|
|
- }
|
|
691
|
+ singlenozzle_temp[active_extruder] = thermalManager.target_temperature[0];
|
|
692
|
+ if (singlenozzle_temp[tmp_extruder] && singlenozzle_temp[tmp_extruder] != singlenozzle_temp[active_extruder]) {
|
|
693
|
+ thermalManager.setTargetHotend(singlenozzle_temp[tmp_extruder], 0);
|
|
694
|
+ #if ENABLED(ULTRA_LCD)
|
|
695
|
+ thermalManager.set_heating_message(0);
|
|
696
|
+ #endif
|
|
697
|
+ (void)thermalManager.wait_for_hotend(0, false); // Wait for heating or cooling
|
|
698
|
+ }
|
701
|
699
|
|
702
|
|
- active_extruder = tmp_extruder;
|
|
700
|
+ active_extruder = tmp_extruder;
|
703
|
701
|
|
704
|
|
- if (sn_settings.swap_length) {
|
705
|
|
- #if ENABLED(ADVANCED_PAUSE_FEATURE)
|
706
|
|
- do_pause_e_move(sn_settings.swap_length, sn_settings.prime_speed);
|
707
|
|
- #else
|
708
|
|
- current_position[E_AXIS] += sn_settings.swap_length / planner.e_factor[tmp_extruder];
|
709
|
|
- planner.buffer_line(current_position, sn_settings.prime_speed, tmp_extruder);
|
710
|
|
- #endif
|
711
|
|
- }
|
|
702
|
+ if (sn_settings.swap_length) {
|
|
703
|
+ #if ENABLED(ADVANCED_PAUSE_FEATURE)
|
|
704
|
+ do_pause_e_move(sn_settings.swap_length, sn_settings.prime_speed);
|
|
705
|
+ #else
|
|
706
|
+ current_position[E_AXIS] += sn_settings.swap_length / planner.e_factor[tmp_extruder];
|
|
707
|
+ planner.buffer_line(current_position, sn_settings.prime_speed, tmp_extruder);
|
|
708
|
+ #endif
|
|
709
|
+ }
|
712
|
710
|
|
713
|
|
- if (!no_move) {
|
714
|
|
- #if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
715
|
|
- current_position[X_AXIS] = destination[X_AXIS];
|
716
|
|
- current_position[Y_AXIS] = destination[Y_AXIS];
|
717
|
|
- planner.buffer_line(current_position, MMM_TO_MMS(SINGLENOZZLE_PARK_XY_FEEDRATE), active_extruder);
|
718
|
|
- #endif
|
|
711
|
+ if (!no_move) {
|
|
712
|
+ #if ENABLED(SINGLENOZZLE_SWAP_PARK)
|
|
713
|
+ current_position[X_AXIS] = destination[X_AXIS];
|
|
714
|
+ current_position[Y_AXIS] = destination[Y_AXIS];
|
|
715
|
+ planner.buffer_line(current_position, MMM_TO_MMS(SINGLENOZZLE_PARK_XY_FEEDRATE), active_extruder);
|
|
716
|
+ #endif
|
719
|
717
|
|
720
|
|
- do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
|
721
|
|
- }
|
722
|
|
- #else // !SINGLENOZZLE
|
|
718
|
+ do_blocking_move_to(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS]);
|
|
719
|
+ }
|
723
|
720
|
|
724
|
|
- active_extruder = tmp_extruder;
|
|
721
|
+ #elif EXTRUDERS > 1
|
725
|
722
|
|
726
|
|
- #endif // !SINGLENOZZLE
|
|
723
|
+ active_extruder = tmp_extruder;
|
727
|
724
|
|
728
|
|
- #endif // EXTRUDERS > 1
|
|
725
|
+ #endif
|
729
|
726
|
|
730
|
727
|
#endif // HOTENDS <= 1
|
731
|
728
|
|