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

Change cancel_heatup to wait_for_heatup #4223

Merged
merged 1 commit into from
Jul 6, 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
16 changes: 7 additions & 9 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ uint8_t active_extruder = 0;
// Relative Mode. Enable with G91, disable with G90.
static bool relative_mode = false;

bool cancel_heatup = false;
bool wait_for_heatup = true;

const char errormagic[] PROGMEM = "Error:";
const char echomagic[] PROGMEM = "echo:";
Expand Down Expand Up @@ -1107,7 +1107,7 @@ inline void get_serial_commands() {

// If command was e-stop process now
if (strcmp(command, "M112") == 0) kill(PSTR(MSG_KILLED));
if (strcmp(command, "M108") == 0) cancel_heatup = true;
if (strcmp(command, "M108") == 0) wait_for_heatup = false;

#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
last_command_time = ms;
Expand Down Expand Up @@ -4520,9 +4520,7 @@ inline void gcode_M105() {
/**
* M108: Cancel heatup and wait for the hotend and bed, this G-code is asynchronously handled in the get_serial_commands() parser
*/
inline void gcode_M108() {
cancel_heatup = true;
}
inline void gcode_M108() { wait_for_heatup = false; }

/**
* M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
Expand Down Expand Up @@ -4582,7 +4580,7 @@ inline void gcode_M109() {

float theTarget = -1.0, old_temp = 9999.0;
bool wants_to_cool = false;
cancel_heatup = false;
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;

KEEPALIVE_STATE(NOT_BUSY);
Expand Down Expand Up @@ -4646,7 +4644,7 @@ inline void gcode_M109() {
}
}

} while (!cancel_heatup && TEMP_CONDITIONS);
} while (wait_for_heatup && TEMP_CONDITIONS);

LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
KEEPALIVE_STATE(IN_HANDLER);
Expand Down Expand Up @@ -4676,7 +4674,7 @@ inline void gcode_M109() {

float theTarget = -1.0, old_temp = 9999.0;
bool wants_to_cool = false;
cancel_heatup = false;
wait_for_heatup = true;
millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;

KEEPALIVE_STATE(NOT_BUSY);
Expand Down Expand Up @@ -4740,7 +4738,7 @@ inline void gcode_M109() {
}
}

} while (!cancel_heatup && TEMP_BED_CONDITIONS);
} while (wait_for_heatup && TEMP_BED_CONDITIONS);

LCD_MESSAGEPGM(MSG_BED_DONE);
KEEPALIVE_STATE(IN_HANDLER);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static void lcd_status_screen() {
stepper.quick_stop();
print_job_timer.stop();
thermalManager.autotempShutdown();
cancel_heatup = true;
wait_for_heatup = false;
lcd_setstatus(MSG_PRINT_ABORTED, true);
#if DISABLED(DELTA) && DISABLED(SCARA)
set_current_position_from_planner();
Expand Down
2 changes: 1 addition & 1 deletion Marlin/ultralcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
extern int absPreheatHPBTemp;
extern int absPreheatFanSpeed;

extern bool cancel_heatup;
extern bool wait_for_heatup;

#if ENABLED(FILAMENT_LCD_DISPLAY)
extern millis_t previous_lcd_status_ms;
Expand Down