Merge pull request #1321 from PavelSindler/M600_load_fix

M600 load messages synchronization fixed
This commit is contained in:
XPila 2018-11-09 15:40:00 +01:00 committed by GitHub
commit 10b79e918b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 24 deletions

View File

@ -3081,6 +3081,7 @@ void gcode_M701()
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400 / 60, active_extruder); //fast sequence
load_filament_final_feed(); //slow sequence
st_synchronize();
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) tone(BEEPER, 500);
delay_keep_alive(50);
@ -8968,7 +8969,6 @@ void load_filament_final_feed()
st_synchronize();
current_position[E_AXIS]+= FILAMENTCHANGE_FINALFEED;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 200/60, active_extruder);
st_synchronize();
}
void M600_check_state()
@ -8991,10 +8991,9 @@ void M600_check_state()
// Filament loaded properly but color is not clear
case 3:
st_synchronize();
current_position[E_AXIS]+= FILAMENTCHANGE_FINALFEED;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 200/60, active_extruder);
load_filament_final_feed();
lcd_loading_color();
st_synchronize();
break;
// Everything good
@ -9114,6 +9113,7 @@ void M600_load_filament_movements()
#endif
load_filament_final_feed();
lcd_loading_filament();
st_synchronize();
}
void M600_load_filament() {

View File

@ -574,6 +574,7 @@ void mmu_M600_load_filament(bool automatic)
mmu_extruder = tmp_extruder; //filament change is finished
mmu_load_to_nozzle();
load_filament_final_feed();
st_synchronize();
}
@ -1077,6 +1078,7 @@ void lcd_mmu_load_to_nozzle(uint8_t filament_nr)
mmu_extruder = tmp_extruder; //filament change is finished
mmu_load_to_nozzle();
load_filament_final_feed();
st_synchronize();
custom_message_type = CUSTOM_MSG_TYPE_F_LOAD;
lcd_setstatuspgm(_T(MSG_LOADING_FILAMENT));
lcd_return_to_status();

View File

@ -2254,19 +2254,7 @@ void lcd_change_success() {
}
void lcd_loading_color() {
//we are extruding 25mm with feedrate 200mm/min -> 7.5 seconds for whole action, 0.375 s for one character
lcd_clear();
lcd_set_cursor(0, 0);
lcd_puts_P(_i("Loading color"));////MSG_LOADING_COLOR c=0 r=0
lcd_set_cursor(0, 2);
lcd_puts_P(_T(MSG_PLEASE_WAIT));
static void lcd_loading_progress_bar() {
for (int i = 0; i < 20; i++) {
lcd_set_cursor(i, 3);
@ -2281,7 +2269,20 @@ void lcd_loading_color() {
}
}
void lcd_loading_color() {
//we are extruding 25mm with feedrate 200mm/min -> 7.5 seconds for whole action, 0.375 s for one character
lcd_clear();
lcd_set_cursor(0, 0);
lcd_puts_P(_i("Loading color"));////MSG_LOADING_COLOR c=0 r=0
lcd_set_cursor(0, 2);
lcd_puts_P(_T(MSG_PLEASE_WAIT));
lcd_loading_progress_bar();
}
@ -2295,7 +2296,7 @@ void lcd_loading_filament() {
lcd_puts_P(_T(MSG_LOADING_FILAMENT));
lcd_set_cursor(0, 2);
lcd_puts_P(_T(MSG_PLEASE_WAIT));
#ifdef SNMM
for (int i = 0; i < 20; i++) {
lcd_set_cursor(i, 3);
@ -2303,17 +2304,15 @@ void lcd_loading_filament() {
for (int j = 0; j < 10 ; j++) {
manage_heater();
manage_inactivity(true);
#ifdef SNMM
delay(153);
#else
delay(137);
#endif
delay(153);
}
}
#else //SNMM
lcd_loading_progress_bar();
#endif //SNMM
}
@ -2425,6 +2424,7 @@ void lcd_load_filament_color_check()
lcd_update_enable(true);
lcd_update(2);
load_filament_final_feed();
st_synchronize();
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, true);
}
}