2 * Marlin 3D Printer Firmware
3 * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5 * Based on Sprinter and grbl.
6 * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
25 * feature/pause.h - Pause feature support functions
26 * This may be combined with related G-codes if features are consolidated.
30 float unload_length
, load_length
;
31 } fil_change_settings_t
;
33 #include "../inc/MarlinConfigPre.h"
35 #if ENABLED(ADVANCED_PAUSE_FEATURE)
37 #include "../libs/nozzle.h"
39 enum PauseMode
: char {
41 PAUSE_MODE_PAUSE_PRINT
,
42 PAUSE_MODE_CHANGE_FILAMENT
,
43 PAUSE_MODE_LOAD_FILAMENT
,
44 PAUSE_MODE_UNLOAD_FILAMENT
47 enum PauseMessage
: char {
48 PAUSE_MESSAGE_PARKING
,
49 PAUSE_MESSAGE_CHANGING
,
50 PAUSE_MESSAGE_WAITING
,
63 enum PauseMenuResponse
: char {
64 PAUSE_RESPONSE_WAIT_FOR
,
65 PAUSE_RESPONSE_EXTRUDE_MORE
,
66 PAUSE_RESPONSE_RESUME_PRINT
68 extern PauseMenuResponse pause_menu_response
;
69 extern PauseMode pause_mode
;
72 extern fil_change_settings_t fc_settings
[EXTRUDERS
];
74 extern uint8_t did_pause_print
;
76 #if ENABLED(DUAL_X_CARRIAGE)
77 #define DXC_PARAMS , const int8_t DXC_ext=-1
78 #define DXC_ARGS , const int8_t DXC_ext
79 #define DXC_PASS , DXC_ext
80 #define DXC_SAY , " dxc:", int(DXC_ext)
88 bool pause_print(const float &retract
, const xyz_pos_t
&park_point
, const float &unload_length
=0, const bool show_lcd
=false DXC_PARAMS
);
90 void wait_for_confirmation(const bool is_reload
=false, const int8_t max_beep_count
=0 DXC_PARAMS
);
92 void resume_print(const float &slow_load_length
=0, const float &fast_load_length
=0, const float &extrude_length
=ADVANCED_PAUSE_PURGE_LENGTH
, const int8_t max_beep_count
=0, int16_t targetTemp
=0 DXC_PARAMS
);
94 bool load_filament(const float &slow_load_length
=0, const float &fast_load_length
=0, const float &extrude_length
=0, const int8_t max_beep_count
=0, const bool show_lcd
=false,
95 const bool pause_for_user
=false, const PauseMode mode
=PAUSE_MODE_PAUSE_PRINT DXC_PARAMS
);
97 bool unload_filament(const float &unload_length
, const bool show_lcd
=false, const PauseMode mode
=PAUSE_MODE_PAUSE_PRINT
98 #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER)
99 , const float &mix_multiplier
=1.0
103 #endif // ADVANCED_PAUSE_FEATURE