M600 load messages synchronization fixed

This commit is contained in:
PavelSindler 2018-11-09 15:31:44 +01:00
parent 5f166374ab
commit 22cf2c6b6b
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 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 load_filament_final_feed(); //slow sequence
st_synchronize();
if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) tone(BEEPER, 500); if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) tone(BEEPER, 500);
delay_keep_alive(50); delay_keep_alive(50);
@ -8968,7 +8969,6 @@ void load_filament_final_feed()
st_synchronize(); st_synchronize();
current_position[E_AXIS]+= FILAMENTCHANGE_FINALFEED; 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); 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() void M600_check_state()
@ -8991,10 +8991,9 @@ void M600_check_state()
// Filament loaded properly but color is not clear // Filament loaded properly but color is not clear
case 3: case 3:
st_synchronize(); load_filament_final_feed();
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);
lcd_loading_color(); lcd_loading_color();
st_synchronize();
break; break;
// Everything good // Everything good
@ -9114,6 +9113,7 @@ void M600_load_filament_movements()
#endif #endif
load_filament_final_feed(); load_filament_final_feed();
lcd_loading_filament(); lcd_loading_filament();
st_synchronize();
} }
void M600_load_filament() { 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_extruder = tmp_extruder; //filament change is finished
mmu_load_to_nozzle(); mmu_load_to_nozzle();
load_filament_final_feed(); 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_extruder = tmp_extruder; //filament change is finished
mmu_load_to_nozzle(); mmu_load_to_nozzle();
load_filament_final_feed(); load_filament_final_feed();
st_synchronize();
custom_message_type = CUSTOM_MSG_TYPE_F_LOAD; custom_message_type = CUSTOM_MSG_TYPE_F_LOAD;
lcd_setstatuspgm(_T(MSG_LOADING_FILAMENT)); lcd_setstatuspgm(_T(MSG_LOADING_FILAMENT));
lcd_return_to_status(); lcd_return_to_status();

View File

@ -2254,19 +2254,7 @@ void lcd_change_success() {
} }
static void lcd_loading_progress_bar() {
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));
for (int i = 0; i < 20; i++) { for (int i = 0; i < 20; i++) {
lcd_set_cursor(i, 3); 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_puts_P(_T(MSG_LOADING_FILAMENT));
lcd_set_cursor(0, 2); lcd_set_cursor(0, 2);
lcd_puts_P(_T(MSG_PLEASE_WAIT)); lcd_puts_P(_T(MSG_PLEASE_WAIT));
#ifdef SNMM
for (int i = 0; i < 20; i++) { for (int i = 0; i < 20; i++) {
lcd_set_cursor(i, 3); lcd_set_cursor(i, 3);
@ -2303,17 +2304,15 @@ void lcd_loading_filament() {
for (int j = 0; j < 10 ; j++) { for (int j = 0; j < 10 ; j++) {
manage_heater(); manage_heater();
manage_inactivity(true); manage_inactivity(true);
#ifdef SNMM
delay(153); delay(153);
#else
delay(137);
#endif
} }
} }
#else //SNMM
lcd_loading_progress_bar();
#endif //SNMM
} }
@ -2425,6 +2424,7 @@ void lcd_load_filament_color_check()
lcd_update_enable(true); lcd_update_enable(true);
lcd_update(2); lcd_update(2);
load_filament_final_feed(); load_filament_final_feed();
st_synchronize();
clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, true); clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, true);
} }
} }