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

M410 out of the UART IQR #19752

Merged
merged 3 commits into from
Oct 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Marlin/src/feature/e_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

// Static data members
bool EmergencyParser::killed_by_M112, // = false
EmergencyParser::quickstop_by_M410,
EmergencyParser::enabled;

#if ENABLED(HOST_PROMPT_SUPPORT)
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/feature/e_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class EmergencyParser {
};

static bool killed_by_M112;
static bool quickstop_by_M410;

#if ENABLED(HOST_PROMPT_SUPPORT)
static uint8_t M876_reason;
Expand Down Expand Up @@ -168,7 +169,7 @@ class EmergencyParser {
if (enabled) switch (state) {
case EP_M108: wait_for_user = wait_for_heatup = false; break;
case EP_M112: killed_by_M112 = true; break;
case EP_M410: quickstop_stepper(); break;
case EP_M410: quickstop_by_M410 = true; break;
#if ENABLED(HOST_PROMPT_SUPPORT)
case EP_M876SN: host_response_handler(M876_reason); break;
#endif
Expand Down
10 changes: 8 additions & 2 deletions Marlin/src/module/temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1032,8 +1032,14 @@ void Temperature::manage_heater() {
if (!inited) return watchdog_refresh();
#endif

if (TERN0(EMERGENCY_PARSER, emergency_parser.killed_by_M112))
kill(M112_KILL_STR, nullptr, true);
#if ENABLED(EMERGENCY_PARSER)
if (emergency_parser.killed_by_M112) kill(M112_KILL_STR, nullptr, true);

if (emergency_parser.quickstop_by_M410) {
emergency_parser.quickstop_by_M410 = false; // quickstop_stepper may call idle so clear this now!
quickstop_stepper();
}
#endif

if (!raw_temps_ready) return;

Expand Down