Fixed bug - unload filament restarts the printer.

This commit is contained in:
Robert Pelnar 2017-11-26 17:14:39 +01:00
parent f2e9bdef24
commit e5fee387db
2 changed files with 5 additions and 0 deletions

View file

@ -5789,6 +5789,8 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
extr_unload_all(); //unload all filaments extr_unload_all(); //unload all filaments
} }
#else #else
bool old_fsensor_enabled = fsensor_enabled;
fsensor_enabled = false;
custom_message = true; custom_message = true;
custom_message_type = 2; custom_message_type = 2;
lcd_setstatuspgm(MSG_UNLOADING_FILAMENT); lcd_setstatuspgm(MSG_UNLOADING_FILAMENT);
@ -5798,6 +5800,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
lcd_setstatuspgm(WELCOME_MSG); lcd_setstatuspgm(WELCOME_MSG);
custom_message = false; custom_message = false;
custom_message_type = 0; custom_message_type = 0;
fsensor_enabled = old_fsensor_enabled;
#endif #endif
} }
break; break;

View file

@ -25,6 +25,8 @@ extern void fsensor_st_block_chunk(block_t* bl, int cnt);
extern int16_t fsensor_chunk_len; extern int16_t fsensor_chunk_len;
//M600 in progress //M600 in progress
extern bool fsensor_M600; extern bool fsensor_M600;
//enable/disable flag
extern bool fsensor_enabled;
#endif //FSENSOR_H #endif //FSENSOR_H