|
@@ -9,6 +9,7 @@
|
|
#include "Configuration_prusa.h"
|
|
#include "Configuration_prusa.h"
|
|
#include "fsensor.h"
|
|
#include "fsensor.h"
|
|
#include "cardreader.h"
|
|
#include "cardreader.h"
|
|
|
|
+#include "sound.h"
|
|
|
|
|
|
|
|
|
|
extern const char* lcd_display_message_fullscreen_P(const char *msg);
|
|
extern const char* lcd_display_message_fullscreen_P(const char *msg);
|
|
@@ -410,6 +411,43 @@ void mmu_load_to_nozzle()
|
|
if (!saved_e_relative_mode) axis_relative_modes[E_AXIS] = false;
|
|
if (!saved_e_relative_mode) axis_relative_modes[E_AXIS] = false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void mmu_M600_wait_and_beep() {
|
|
|
|
+ //Beep and wait for user to remove old filament and prepare new filament for load
|
|
|
|
+
|
|
|
|
+ KEEPALIVE_STATE(PAUSED_FOR_USER);
|
|
|
|
+
|
|
|
|
+ int counterBeep = 0;
|
|
|
|
+ lcd_display_message_fullscreen_P(_i("Remove old filament and press the knob to start loading new filament."));
|
|
|
|
+ bool bFirst=true;
|
|
|
|
+
|
|
|
|
+ while (!lcd_clicked()){
|
|
|
|
+ manage_heater();
|
|
|
|
+ manage_inactivity(true);
|
|
|
|
+
|
|
|
|
+ #if BEEPER > 0
|
|
|
|
+ if (counterBeep == 500) {
|
|
|
|
+ counterBeep = 0;
|
|
|
|
+ }
|
|
|
|
+ SET_OUTPUT(BEEPER);
|
|
|
|
+ if (counterBeep == 0) {
|
|
|
|
+ if((eSoundMode==e_SOUND_MODE_LOUD)||((eSoundMode==e_SOUND_MODE_ONCE)&&bFirst))
|
|
|
|
+ {
|
|
|
|
+ bFirst=false;
|
|
|
|
+ WRITE(BEEPER, HIGH);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (counterBeep == 20) {
|
|
|
|
+ WRITE(BEEPER, LOW);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ counterBeep++;
|
|
|
|
+ #endif //BEEPER > 0
|
|
|
|
+
|
|
|
|
+ delay_keep_alive(4);
|
|
|
|
+ }
|
|
|
|
+ WRITE(BEEPER, LOW);
|
|
|
|
+}
|
|
|
|
+
|
|
void mmu_M600_load_filament(bool automatic)
|
|
void mmu_M600_load_filament(bool automatic)
|
|
{
|
|
{
|
|
//load filament for mmu v2
|
|
//load filament for mmu v2
|
|
@@ -417,10 +455,14 @@ void mmu_M600_load_filament(bool automatic)
|
|
bool response = false;
|
|
bool response = false;
|
|
bool yes = false;
|
|
bool yes = false;
|
|
if (!automatic) {
|
|
if (!automatic) {
|
|
|
|
+ mmu_M600_wait_and_beep();
|
|
|
|
+#ifdef MMU_M600_SWITCH_EXTRUDER
|
|
yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false);
|
|
yes = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Do you want to switch extruder?"), false);
|
|
if(yes) tmp_extruder = choose_extruder_menu();
|
|
if(yes) tmp_extruder = choose_extruder_menu();
|
|
else tmp_extruder = mmu_extruder;
|
|
else tmp_extruder = mmu_extruder;
|
|
-
|
|
|
|
|
|
+#else
|
|
|
|
+ tmp_extruder = mmu_extruder;
|
|
|
|
+#endif //MMU_M600_SWITCH_EXTRUDER
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
tmp_extruder = (tmp_extruder+1)%5;
|
|
tmp_extruder = (tmp_extruder+1)%5;
|