|
@@ -143,6 +143,8 @@ uint8_t MMU2::get_current_tool() {
|
143
|
143
|
#define FILAMENT_PRESENT() (READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE)
|
144
|
144
|
#endif
|
145
|
145
|
|
|
146
|
+inline void ATTN_BUZZ(const bool two=false) { BUZZ(200, 404); if (two) { BUZZ(10, 0); BUZZ(200, 404); } }
|
|
147
|
+
|
146
|
148
|
void MMU2::mmu_loop() {
|
147
|
149
|
|
148
|
150
|
switch (state) {
|
|
@@ -525,7 +527,7 @@ static void mmu2_not_responding() {
|
525
|
527
|
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
526
|
528
|
load_filament_to_nozzle(index);
|
527
|
529
|
#else
|
528
|
|
- BUZZ(400, 40);
|
|
530
|
+ ERR_BUZZ();
|
529
|
531
|
#endif
|
530
|
532
|
} break;
|
531
|
533
|
|
|
@@ -544,7 +546,7 @@ static void mmu2_not_responding() {
|
544
|
546
|
active_extruder = 0;
|
545
|
547
|
}
|
546
|
548
|
#else
|
547
|
|
- BUZZ(400, 40);
|
|
549
|
+ ERR_BUZZ();
|
548
|
550
|
#endif
|
549
|
551
|
} break;
|
550
|
552
|
|
|
@@ -613,7 +615,7 @@ static void mmu2_not_responding() {
|
613
|
615
|
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
614
|
616
|
load_filament_to_nozzle(index);
|
615
|
617
|
#else
|
616
|
|
- BUZZ(400, 40);
|
|
618
|
+ ERR_BUZZ();
|
617
|
619
|
#endif
|
618
|
620
|
} break;
|
619
|
621
|
|
|
@@ -633,7 +635,7 @@ static void mmu2_not_responding() {
|
633
|
635
|
extruder = index;
|
634
|
636
|
active_extruder = 0;
|
635
|
637
|
#else
|
636
|
|
- BUZZ(400, 40);
|
|
638
|
+ ERR_BUZZ();
|
637
|
639
|
#endif
|
638
|
640
|
} break;
|
639
|
641
|
|
|
@@ -707,7 +709,7 @@ static void mmu2_not_responding() {
|
707
|
709
|
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
|
708
|
710
|
load_filament_to_nozzle(index);
|
709
|
711
|
#else
|
710
|
|
- BUZZ(400, 40);
|
|
712
|
+ ERR_BUZZ();
|
711
|
713
|
#endif
|
712
|
714
|
} break;
|
713
|
715
|
|
|
@@ -726,7 +728,7 @@ static void mmu2_not_responding() {
|
726
|
728
|
extruder = index;
|
727
|
729
|
active_extruder = 0;
|
728
|
730
|
#else
|
729
|
|
- BUZZ(400, 40);
|
|
731
|
+ ERR_BUZZ();
|
730
|
732
|
#endif
|
731
|
733
|
} break;
|
732
|
734
|
|
|
@@ -811,25 +813,21 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) {
|
811
|
813
|
if (turn_off_nozzle && resume_hotend_temp) {
|
812
|
814
|
thermalManager.setTargetHotend(resume_hotend_temp, active_extruder);
|
813
|
815
|
LCD_MESSAGE(MSG_HEATING);
|
814
|
|
- BUZZ(200, 40);
|
|
816
|
+ ERR_BUZZ();
|
815
|
817
|
|
816
|
818
|
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(1000);
|
817
|
819
|
}
|
818
|
820
|
|
819
|
|
- if (move_axes && all_axes_homed()) {
|
820
|
|
- LCD_MESSAGE(MSG_MMU2_RESUMING);
|
821
|
|
- BUZZ(198, 404); BUZZ(4, 0); BUZZ(198, 404);
|
|
821
|
+ LCD_MESSAGE(MSG_MMU2_RESUMING);
|
|
822
|
+ ATTN_BUZZ(true);
|
822
|
823
|
|
|
824
|
+ if (move_axes && all_axes_homed()) {
|
823
|
825
|
// Move XY to starting position, then Z
|
824
|
826
|
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
825
|
827
|
|
826
|
828
|
// Move Z_AXIS to saved position
|
827
|
829
|
do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
828
|
830
|
}
|
829
|
|
- else {
|
830
|
|
- BUZZ(198, 404); BUZZ(4, 0); BUZZ(198, 404);
|
831
|
|
- LCD_MESSAGE(MSG_MMU2_RESUMING);
|
832
|
|
- }
|
833
|
831
|
}
|
834
|
832
|
}
|
835
|
833
|
}
|
|
@@ -898,7 +896,7 @@ void MMU2::load_filament(const uint8_t index) {
|
898
|
896
|
|
899
|
897
|
command(MMU_CMD_L0 + index);
|
900
|
898
|
manage_response(false, false);
|
901
|
|
- BUZZ(200, 404);
|
|
899
|
+ ATTN_BUZZ();
|
902
|
900
|
}
|
903
|
901
|
|
904
|
902
|
/**
|
|
@@ -909,7 +907,7 @@ bool MMU2::load_filament_to_nozzle(const uint8_t index) {
|
909
|
907
|
if (!_enabled) return false;
|
910
|
908
|
|
911
|
909
|
if (thermalManager.tooColdToExtrude(active_extruder)) {
|
912
|
|
- BUZZ(200, 404);
|
|
910
|
+ ATTN_BUZZ();
|
913
|
911
|
LCD_ALERTMESSAGE(MSG_HOTEND_TOO_COLD);
|
914
|
912
|
return false;
|
915
|
913
|
}
|
|
@@ -924,7 +922,7 @@ bool MMU2::load_filament_to_nozzle(const uint8_t index) {
|
924
|
922
|
extruder = index;
|
925
|
923
|
active_extruder = 0;
|
926
|
924
|
load_to_nozzle();
|
927
|
|
- BUZZ(200, 404);
|
|
925
|
+ ATTN_BUZZ();
|
928
|
926
|
}
|
929
|
927
|
return success;
|
930
|
928
|
}
|
|
@@ -945,7 +943,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) {
|
945
|
943
|
if (!_enabled) return false;
|
946
|
944
|
|
947
|
945
|
if (thermalManager.tooColdToExtrude(active_extruder)) {
|
948
|
|
- BUZZ(200, 404);
|
|
946
|
+ ATTN_BUZZ();
|
949
|
947
|
LCD_ALERTMESSAGE(MSG_HOTEND_TOO_COLD);
|
950
|
948
|
return false;
|
951
|
949
|
}
|
|
@@ -961,12 +959,11 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) {
|
961
|
959
|
|
962
|
960
|
if (recover) {
|
963
|
961
|
LCD_MESSAGE(MSG_MMU2_EJECT_RECOVER);
|
964
|
|
- BUZZ(200, 404);
|
|
962
|
+ ATTN_BUZZ();
|
965
|
963
|
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, F("MMU2 Eject Recover"), FPSTR(CONTINUE_STR)));
|
966
|
964
|
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("MMU2 Eject Recover")));
|
967
|
965
|
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response());
|
968
|
|
- BUZZ(200, 404);
|
969
|
|
- BUZZ(200, 404);
|
|
966
|
+ ATTN_BUZZ(true);
|
970
|
967
|
|
971
|
968
|
command(MMU_CMD_R0);
|
972
|
969
|
manage_response(false, false);
|
|
@@ -979,7 +976,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) {
|
979
|
976
|
|
980
|
977
|
set_runout_valid(false);
|
981
|
978
|
|
982
|
|
- BUZZ(200, 404);
|
|
979
|
+ ATTN_BUZZ();
|
983
|
980
|
|
984
|
981
|
stepper.disable_extruder();
|
985
|
982
|
|
|
@@ -994,7 +991,7 @@ bool MMU2::unload() {
|
994
|
991
|
if (!_enabled) return false;
|
995
|
992
|
|
996
|
993
|
if (thermalManager.tooColdToExtrude(active_extruder)) {
|
997
|
|
- BUZZ(200, 404);
|
|
994
|
+ ATTN_BUZZ();
|
998
|
995
|
LCD_ALERTMESSAGE(MSG_HOTEND_TOO_COLD);
|
999
|
996
|
return false;
|
1000
|
997
|
}
|
|
@@ -1005,7 +1002,7 @@ bool MMU2::unload() {
|
1005
|
1002
|
command(MMU_CMD_U0);
|
1006
|
1003
|
manage_response(false, true);
|
1007
|
1004
|
|
1008
|
|
- BUZZ(200, 404);
|
|
1005
|
+ ATTN_BUZZ();
|
1009
|
1006
|
|
1010
|
1007
|
// no active tool
|
1011
|
1008
|
extruder = MMU2_NO_TOOL;
|