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

Fix for the PR #5088 (Handle M108 in M1 also with ULTIPANEL) #5094

Merged
merged 1 commit into from Oct 27, 2016
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
2 changes: 1 addition & 1 deletion Marlin/Marlin.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ extern bool axis_known_position[XYZ]; // axis[n].is_known
extern bool axis_homed[XYZ]; // axis[n].is_homed
extern volatile bool wait_for_heatup;

#if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
extern volatile bool wait_for_user;
#endif

Expand Down
14 changes: 8 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static bool relative_mode = false;
volatile bool wait_for_heatup = true;

// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
#if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
volatile bool wait_for_user = false;
#endif

Expand Down Expand Up @@ -4390,7 +4390,7 @@ inline void gcode_G92() {
report_current_position();
}

#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)

/**
* M0: Unconditional stop - Wait for user button press on LCD
Expand Down Expand Up @@ -4470,7 +4470,9 @@ inline void gcode_G92() {

#endif

ExitM1:
#if ENABLED(ULTIPANEL)
ExitM1:
#endif

#if ENABLED(EMERGENCY_PARSER)
wait_for_user = false;
Expand All @@ -4479,7 +4481,7 @@ inline void gcode_G92() {
KEEPALIVE_STATE(IN_HANDLER);
}

#endif // ULTIPANEL || EMERGENCY_PARSER
#endif // EMERGENCY_PARSER || ULTIPANEL

/**
* M17: Enable power on all stepper motors
Expand Down Expand Up @@ -4721,7 +4723,7 @@ inline void gcode_M42() {
pin_state[pin - first_pin] = digitalRead(pin);
}

#if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
wait_for_user = true;
#endif

Expand All @@ -4739,7 +4741,7 @@ inline void gcode_M42() {
}
}

#if ENABLED(EMERGENCY_PARSER) && DISABLED(ULTIPANEL)
#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
if (!wait_for_user) break;
#endif

Expand Down