Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve/ignored commands #4128

Merged
merged 2 commits into from
May 18, 2021

Conversation

StevilKnevil
Copy link
Contributor

@StevilKnevil StevilKnevil commented May 6, 2021

What does this PR do and why is it necessary?

Added Ignored Commands to the Serial Protocol settings
This is an exact duplicate of the Blocked Commands setting except that emitted event is severity info not warn. The result of this is that there isn't a red popup displayed when the GCode is encountered, the information is just logged to the logfile.

This is important if you are intentionally producing GCode that contains codes that your printer cannot handle (e.g M600 for filament change on a printer with a single extruder - see below for further context)

How was it tested? How can it be tested by the reviewer?

Change the blocked commands to be M0 and the ignored command to be M1. Sending M0 and M1 in the terminal should have exactly the same effect, except that there should be no popup for the M1 command

Any background context you want to provide?

To generate multicolour prints, I can specfiy that my printer has 2 extruders so that the sliced GCode will contain command like

...
M600 ; Filament Change
T1 ; Tool change
...

The physical printer only has a single extruder, so I can set M600 as a pausing command (with a GCODE script to move the head safe) and manually perform a filament change.
However the M600 and T1 commands in the sliced GCode will cause scary red popups to appear in the octoprint window, despite them being entirely expected and allowed for. Setting M600 and T1 as ignored commands (rather than blocked commands) will avoid the popups being displayed

What are the relevant tickets if any?

None

Screenshots (if appropriate)

image

Further notes

Note that by default no GCode commands are set as Ignored Commands

@github-actions github-actions bot added docs Related to documentation approved Issue has been approved by the bot or manually for further processing labels May 6, 2021
@StevilKnevil StevilKnevil deleted the improve/ignored_commands branch May 6, 2021 20:26
@StevilKnevil StevilKnevil restored the improve/ignored_commands branch May 6, 2021 20:36
@StevilKnevil
Copy link
Contributor Author

Accidentally closed this PR!

@StevilKnevil StevilKnevil reopened this May 6, 2021
@cp2004 cp2004 added the needs review This PR needs a review label May 11, 2021
@foosel foosel merged commit bce1b02 into OctoPrint:maintenance May 18, 2021
@foosel
Copy link
Member

foosel commented May 18, 2021

I'm slightly worried that will once again lead to people complaining that "OctoPrint should not refuse to send commands to my printer without me knowing about it" (which is why the notifications about blocked commands was introduced in the first place), but considering that we ship it empty and a log entry and event are still generated (albeit the latter is usually ignored) this feels low risk enough.

Thanks!

@foosel foosel added this to the 1.7.0 milestone May 18, 2021
@StevilKnevil StevilKnevil deleted the improve/ignored_commands branch May 18, 2021 10:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Issue has been approved by the bot or manually for further processing docs Related to documentation needs review This PR needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants