Skip to content

Commit

Permalink
Merge pull request #18 from azsde/master
Browse files Browse the repository at this point in the history
Disable stepper motor deactivation timeout for M600/M601 or filament runout
  • Loading branch information
wgcv committed Jan 23, 2021
2 parents 0872c96 + 212c66c commit 02713a5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TFT/src/User/API/extend.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void loopFrontEndFILRunoutDetect(void)
{
if (!getPrintRunout()) return;

if (setPrintPause(true,false, false))
if (setPrintPause(true,false, true))
{
setPrintRunout(false);
popupReminder(textSelect(LABEL_WARNING), textSelect(LABEL_FILAMENT_RUNOUT));
Expand Down
12 changes: 11 additions & 1 deletion TFT/src/User/API/interfaceCmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,17 @@ void sendQueueCmd(void)
break;
case 18: //M18/M84 disable steppers
case 84:
coordinateSetKnown(false);
if(cmd_seen('S') && !cmd_seen('Y') && !cmd_seen('Z') && !cmd_seen('E'))
{
// Do not mark coordinate as unknown in this case as this is a M18/M84 S<timeout>
// command that doesn't disable the motors right away but will set their idling
// timeout.
}
else
{
// This is something else than an "M18/M84 S<timeout>", this will disable at least one stepper, set coordinate as unknown
coordinateSetKnown(false);
}
break;

case 27: //M27
Expand Down
4 changes: 2 additions & 2 deletions TFT/src/User/Menu/BabyStep.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ MENUITEMS babyStepItems = {
LABEL_BABYSTEP,
//icon label
{
{ICON_INC, LABEL_INC},
{ICON_Z_INC, LABEL_Z_INC},
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_DEC, LABEL_DEC},
{ICON_Z_DEC, LABEL_Z_DEC},
{ICON_BACKGROUND, LABEL_BACKGROUND},
{ICON_001_MM, LABEL_001_MM},
{ICON_RESET_VALUE, LABEL_RESET},
Expand Down
7 changes: 6 additions & 1 deletion TFT/src/User/Menu/Printing.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,12 @@ bool setPrintPause(bool is_pause, bool is_m0pause, bool M600)
}
resumeToPause(is_pause);
pauseLock = false;
if(M600){

if (M600 && is_pause)
{
// Disable stepper_motors_timeout.
// Otherwise bed or printhead risk to be moved when inserting filament, causing layer shifting when resuming print.
mustStoreCmd("M84 S0\n");
Buzzer_play(sound_notify);
popupReminder((u8 *)"M600/M601", textSelect(LABEL_FILAMENT_CHANGE));
}
Expand Down

0 comments on commit 02713a5

Please sign in to comment.