Maybe this might be of interest:
I’m venturing a guess that you are running your gcode from the SD Card on the TFT.
If yes, that pause dialog you see is displayed by the TFT firmware when it sees an
M0/M1 command from the file you’re printing off the SD.
The TFT intercepts the M0/M1 command from the SD card stream during printing and posts
it’s own Pause dialog box, and it also suppresses the M0/M1 command from going to the
printer. Furthermore, the TFT Pause dialog ignores any text from the M0/M1 command.
In older versions of the TFT firmware the M0/M1 and text were passed on to the printer.
Recent pushes to the BTT repository past V.x.x27 release have changed things in file
interfaceCmd.c in the function sendQueueCmd().
Look for the following portion of code around “// parse M-codes case ‘M’:”
switch (cmd_ptr[cmd_base_index])
{
// parse M-codes
case 'M':
switch (cmd_value())
{
case 0: // M0
case 1: // M1
if (isPrinting() && infoMachineSettings.firmwareType != FW_REPRAPFW) // abort printing by "M0" i
{
// pause if printing from TFT media and purge M0/M1 command
if (infoFile.source < FS_ONBOARD_MEDIA)
{
---->> sendCmd(true, avoid_terminal); <<---- THIS doesn't send the M0/M1 command, it purges it from the buffer
pausePrint(true, PAUSE_M0);
return;
}
}
break;
If your version looks like the code above, then it has these latest changes
which stopped the M0/M1 commands from being forwarded to the printer.
Typically, when Marlin receives the M0/M1 command it sends an “Action” message
to the host (HOST_PROMPT_SUPPORT must be enabled in Configuration_adv.h for
this to work).
You should see these “Action” messages if you send an M0 from a remote like
Pronterface or Repetier.
To see them on the TFT you can change the 1st argument in the line
‘sendCmd(true, avoid_terminal);’ from true to false and re-compile the firmware,
then the M0/M1 commands will be sent to Marlin and should show up on the TFT as
host “Action” messages.
However, the TFT will still try to display it’s own “Pause” dialog too. It gets
quickly overwritten by the M0 “Action” dialog box so you may not notice it. But
after clicking Continue on the “Action” dialog, you’ll see that the TFT “Resume”
button will also need to be pressed to continue. This is a result of the TFT
pause dialog.
Of course you could comment out the line ‘pausePrint(true, PAUSE_M0);’ and the
TFT won’t put up it’s pause dialog box or set the Resume button. There is a slight
catch to doing that. When the TFT puts up it’s Pause dialog box it also enters
a ‘pause’ state (that’s why the resume button appears). During this pause the print
time and the progress bar are frozen until you press the Resume button.
If you suppress the TFT pause dialog box but do pass the M0/M1 command to Marlin,
Marlin pauses operation. However, the TFT timer keeps running. After you press
Continue on the M0 Action dialog box, Marlin and the TFT will resume running gcode,
but the timer will now include the duration of the pause. (You also won’t need to
perform the extra Resume button press on the TFT since the TFT pause dialog box
wasn’t displayed).
I’m still playing with this whole mess and if I come up with a better solution
I’ll report back here.