Marlin: EMERGENCY_PARSER logic seems to be flipped

Created on 18 May 2018  路  4Comments  路  Source: MarlinFirmware/Marlin

In the Configuration file, the EMERGENCY_PARSER documentation states that:
__Enable an emergency-command parser to intercept certain commands as they enter the serial receive buffer, so they cannot be blocked__

I assume that the intended behavior is that defining this flag would allow for M108, M112 and M410to be take effect as close to instantly as it gets.

But it seems that the logic is flipped, as shown here, here and here.

Shouldn't these DISABLED be actually ENABLED?

  • M112 works with EMERGENCY_PARSER both enabled and disable, taking effect instantly in the for former, and some time for the latter.
  • M108 to simulate a screen click does not work at all with the EMERGENCY_PARSER enabled, but with it disabled, it does work as expected.

If this is the case we will be more than happy to submit a PR, but we wanted to ask for an opinion first.

Question

All 4 comments

The reason those are DISABLED is because when EMERGENCY_PARSER is used those codes are handled directly in the emergency parser (emergency_parser.h) so it doesn't make sense to also check for those codes outside the emergency parser.

Learning every day :)
I'm currently working with 1.1.8 so that file does not exist, but I tracked that it comes from here.
Thanks @ManuelMcLure!
And sorry @thinkyhead for opening a dumb issue (still getting used to the codebase).

I think I ran into M108's behavior described in #9254 (or lack thereof), and assumed the whole logic was flipped, but it actually seems to just be an M108 problem (digging deeper and deeper into the code).

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ceturan picture ceturan  路  4Comments

Matts-Hub picture Matts-Hub  路  3Comments

spanner888 picture spanner888  路  4Comments

pubalan12 picture pubalan12  路  4Comments

Ciev picture Ciev  路  3Comments