Merge pull request #102 from XPila/MK3

Fixed bug - unload filament restarts the printer.
This commit is contained in:
XPila 2017-11-26 17:20:40 +01:00 committed by GitHub
commit efba30b77e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}
#else
bool old_fsensor_enabled = fsensor_enabled;
fsensor_enabled = false;
custom_message = true;
custom_message_type = 2;
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);
custom_message = false;
custom_message_type = 0;
fsensor_enabled = old_fsensor_enabled;
#endif
}
break;

View file

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