mmu M600: dont use change extruder posibility; unload starts always imidiately

This commit is contained in:
PavelSindler 2018-08-27 16:12:10 +02:00
parent 2b32b41969
commit 191e5dfddd
3 changed files with 45 additions and 3 deletions

View file

@ -3097,7 +3097,7 @@ void gcode_M600(bool automatic, float x_position, float y_position, float z_shif
st_synchronize();
//Beep, manage nozzle heater and wait for user to start unload filament
if(!automatic) M600_wait_for_user();
if(!mmu_enabled) M600_wait_for_user();
lcd_change_fil_state = 0;

View file

@ -9,6 +9,7 @@
#include "Configuration_prusa.h"
#include "fsensor.h"
#include "cardreader.h"
#include "sound.h"
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;
}
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)
{
//load filament for mmu v2
@ -417,10 +455,14 @@ void mmu_M600_load_filament(bool automatic)
bool response = false;
bool yes = false;
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);
if(yes) tmp_extruder = choose_extruder_menu();
else tmp_extruder = mmu_extruder;
#else
tmp_extruder = mmu_extruder;
#endif //MMU_M600_SWITCH_EXTRUDER
}
else {
tmp_extruder = (tmp_extruder+1)%5;

View file

@ -56,7 +56,7 @@ extern void manage_response(bool move_axes, bool turn_off_nozzle);
extern void mmu_load_to_nozzle();
extern void mmu_M600_load_filament(bool automatic);
extern void mmu_M600_wait_and_beep();
extern void extr_mov(float shift, float feed_rate);
extern void change_extr(int extr);