Merge branch 'MK3' into fix_unable_to_compile
This commit is contained in:
commit
755baddb54
|
|
@ -3097,7 +3097,7 @@ void gcode_M600(bool automatic, float x_position, float y_position, float z_shif
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
//Beep, manage nozzle heater and wait for user to start unload filament
|
//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;
|
lcd_change_fil_state = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
#include "fsensor.h"
|
#include "fsensor.h"
|
||||||
#include "cardreader.h"
|
#include "cardreader.h"
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
|
#include "sound.h"
|
||||||
|
|
||||||
|
|
||||||
#define CHECK_FINDA ((IS_SD_PRINTING || is_usb_printing) && (mcode_in_progress != 600) && !saved_printing && e_active())
|
#define CHECK_FINDA ((IS_SD_PRINTING || is_usb_printing) && (mcode_in_progress != 600) && !saved_printing && e_active())
|
||||||
|
|
||||||
|
|
@ -403,6 +405,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
|
||||||
|
|
@ -410,10 +449,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;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ extern void manage_response(bool move_axes, bool turn_off_nozzle);
|
||||||
extern void mmu_load_to_nozzle();
|
extern void mmu_load_to_nozzle();
|
||||||
|
|
||||||
extern void mmu_M600_load_filament(bool automatic);
|
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 extr_mov(float shift, float feed_rate);
|
||||||
extern void change_extr(int extr);
|
extern void change_extr(int extr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue