Skip to content

Commit

Permalink
Release UI on G26 priming timeout (#16449)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot authored and thinkyhead committed Jan 21, 2020
1 parent b57ef4b commit c8ac908
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Marlin/src/gcode/bedlevel/G26.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,13 @@ inline bool turn_on_heaters() {
inline bool prime_nozzle() {

const feedRate_t fr_slow_e = planner.settings.max_feedrate_mm_s[E_AXIS] / 15.0f;
#if HAS_LCD_MENU
#if HAS_LCD_MENU && DISABLED(TOUCH_BUTTONS) // ui.button_pressed issue with touchscreen
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
float Total_Prime = 0.0;
#endif

if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
#if HAS_LCD_MENU
ui.capture();
#endif
ui.capture();
ui.set_status_P(GET_TEXT(MSG_G26_MANUAL_PRIME), 99);
ui.chirp();

Expand All @@ -439,7 +437,10 @@ inline bool prime_nozzle() {
destination.e += 0.25;
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
Total_Prime += 0.25;
if (Total_Prime >= EXTRUDE_MAXLENGTH) return G26_ERR;
if (Total_Prime >= EXTRUDE_MAXLENGTH) {
ui.release();
return G26_ERR;
}
#endif
prepare_internal_move_to_destination(fr_slow_e);
destination = current_position;
Expand Down

0 comments on commit c8ac908

Please sign in to comment.