Merge pull request #1077 from PavelSindler/M600_change_extruder
Multi material M600: change extruder posibility removed; unload starts imidiately
This commit is contained in:
commit
41e9e8e720
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -4496,6 +4496,7 @@ void lcd_settings_linearity_correction_menu(void)
|
||||
{
|
||||
MENU_BEGIN();
|
||||
MENU_ITEM_BACK_P(_T(MSG_SETTINGS));
|
||||
#ifdef TMC2130
|
||||
#ifdef TMC2130_LINEARITY_CORRECTION_XYZ
|
||||
//tmc2130_wave_fac[X_AXIS]
|
||||
|
||||
@ -4504,6 +4505,7 @@ void lcd_settings_linearity_correction_menu(void)
|
||||
MENU_ITEM_EDIT_int3_P(_i("Z-correct"), &tmc2130_wave_fac[Z_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0
|
||||
#endif //TMC2130_LINEARITY_CORRECTION_XYZ
|
||||
MENU_ITEM_EDIT_int3_P(_i("E-correct"), &tmc2130_wave_fac[E_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0
|
||||
#endif
|
||||
MENU_END();
|
||||
if(menu_leaving)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user