Skip to content

Commit 02713a5

Browse files
authored
Merge pull request #18 from azsde/master
Disable stepper motor deactivation timeout for M600/M601 or filament runout
2 parents 0872c96 + 212c66c commit 02713a5

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

TFT/src/User/API/extend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void loopFrontEndFILRunoutDetect(void)
145145
{
146146
if (!getPrintRunout()) return;
147147

148-
if (setPrintPause(true,false, false))
148+
if (setPrintPause(true,false, true))
149149
{
150150
setPrintRunout(false);
151151
popupReminder(textSelect(LABEL_WARNING), textSelect(LABEL_FILAMENT_RUNOUT));

TFT/src/User/API/interfaceCmd.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,17 @@ void sendQueueCmd(void)
532532
break;
533533
case 18: //M18/M84 disable steppers
534534
case 84:
535-
coordinateSetKnown(false);
535+
if(cmd_seen('S') && !cmd_seen('Y') && !cmd_seen('Z') && !cmd_seen('E'))
536+
{
537+
// Do not mark coordinate as unknown in this case as this is a M18/M84 S<timeout>
538+
// command that doesn't disable the motors right away but will set their idling
539+
// timeout.
540+
}
541+
else
542+
{
543+
// This is something else than an "M18/M84 S<timeout>", this will disable at least one stepper, set coordinate as unknown
544+
coordinateSetKnown(false);
545+
}
536546
break;
537547

538548
case 27: //M27

TFT/src/User/Menu/BabyStep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ MENUITEMS babyStepItems = {
77
LABEL_BABYSTEP,
88
//icon label
99
{
10-
{ICON_INC, LABEL_INC},
10+
{ICON_Z_INC, LABEL_Z_INC},
1111
{ICON_BACKGROUND, LABEL_BACKGROUND},
1212
{ICON_BACKGROUND, LABEL_BACKGROUND},
13-
{ICON_DEC, LABEL_DEC},
13+
{ICON_Z_DEC, LABEL_Z_DEC},
1414
{ICON_BACKGROUND, LABEL_BACKGROUND},
1515
{ICON_001_MM, LABEL_001_MM},
1616
{ICON_RESET_VALUE, LABEL_RESET},

TFT/src/User/Menu/Printing.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,12 @@ bool setPrintPause(bool is_pause, bool is_m0pause, bool M600)
375375
}
376376
resumeToPause(is_pause);
377377
pauseLock = false;
378-
if(M600){
378+
379+
if (M600 && is_pause)
380+
{
381+
// Disable stepper_motors_timeout.
382+
// Otherwise bed or printhead risk to be moved when inserting filament, causing layer shifting when resuming print.
383+
mustStoreCmd("M84 S0\n");
379384
Buzzer_play(sound_notify);
380385
popupReminder((u8 *)"M600/M601", textSelect(LABEL_FILAMENT_CHANGE));
381386
}

0 commit comments

Comments
 (0)