Allow G26 to use the active extruder (#12387)
* Make lcd_quick_feedback argument optional * Add click_to_cancel option to wait_for_hotend/bed * Have G26 use the active nozzle and wait_for_hotend/bed * Use wait_for_release in UBL G29 * Add 'T' parameter to G26 for an initial tool-change
This commit is contained in:
@ -2441,7 +2441,11 @@ void Temperature::isr() {
|
||||
#define MIN_COOLING_SLOPE_TIME 60
|
||||
#endif
|
||||
|
||||
bool Temperature::wait_for_hotend(const uint8_t target_extruder, const bool no_wait_for_cooling/*=true*/) {
|
||||
bool Temperature::wait_for_hotend(const uint8_t target_extruder, const bool no_wait_for_cooling/*=true*/
|
||||
#if G26_CLICK_CAN_CANCEL
|
||||
, const bool click_to_cancel/*=false*/
|
||||
#endif
|
||||
) {
|
||||
#if TEMP_RESIDENCY_TIME > 0
|
||||
millis_t residency_start_ms = 0;
|
||||
// Loop until the temperature has stabilized
|
||||
@ -2525,6 +2529,13 @@ void Temperature::isr() {
|
||||
}
|
||||
}
|
||||
|
||||
#if G26_CLICK_CAN_CANCEL
|
||||
if (click_to_cancel && use_click()) {
|
||||
wait_for_heatup = false;
|
||||
lcd_quick_feedback();
|
||||
}
|
||||
#endif
|
||||
|
||||
} while (wait_for_heatup && TEMP_CONDITIONS);
|
||||
|
||||
if (wait_for_heatup) {
|
||||
@ -2552,7 +2563,11 @@ void Temperature::isr() {
|
||||
#define MIN_COOLING_SLOPE_TIME_BED 60
|
||||
#endif
|
||||
|
||||
void Temperature::wait_for_bed(const bool no_wait_for_cooling) {
|
||||
bool Temperature::wait_for_bed(const bool no_wait_for_cooling
|
||||
#if G26_CLICK_CAN_CANCEL
|
||||
, const bool click_to_cancel/*=false*/
|
||||
#endif
|
||||
) {
|
||||
#if TEMP_BED_RESIDENCY_TIME > 0
|
||||
millis_t residency_start_ms = 0;
|
||||
// Loop until the temperature has stabilized
|
||||
@ -2639,6 +2654,13 @@ void Temperature::isr() {
|
||||
}
|
||||
}
|
||||
|
||||
#if G26_CLICK_CAN_CANCEL
|
||||
if (click_to_cancel && use_click()) {
|
||||
wait_for_heatup = false;
|
||||
lcd_quick_feedback();
|
||||
}
|
||||
#endif
|
||||
|
||||
} while (wait_for_heatup && TEMP_BED_CONDITIONS);
|
||||
|
||||
if (wait_for_heatup) lcd_reset_status();
|
||||
@ -2646,6 +2668,8 @@ void Temperature::isr() {
|
||||
#if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE)
|
||||
gcode.busy_state = old_busy_state;
|
||||
#endif
|
||||
|
||||
return wait_for_heatup;
|
||||
}
|
||||
|
||||
#endif // HAS_HEATED_BED
|
||||
|
@ -138,6 +138,8 @@ enum ADCSensorState : char {
|
||||
#define unscalePID_d(d) ( float(d) * PID_dT )
|
||||
#endif
|
||||
|
||||
#define G26_CLICK_CAN_CANCEL (HAS_LCD_MENU && ENABLED(G26_MESH_VALIDATION))
|
||||
|
||||
class Temperature {
|
||||
|
||||
public:
|
||||
@ -426,7 +428,11 @@ class Temperature {
|
||||
}
|
||||
|
||||
#if HAS_TEMP_HOTEND
|
||||
static bool wait_for_hotend(const uint8_t target_extruder, const bool no_wait_for_cooling=true);
|
||||
static bool wait_for_hotend(const uint8_t target_extruder, const bool no_wait_for_cooling=true
|
||||
#if G26_CLICK_CAN_CANCEL
|
||||
, const bool click_to_cancel=false
|
||||
#endif
|
||||
);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
@ -459,7 +465,11 @@ class Temperature {
|
||||
static void start_watching_bed();
|
||||
#endif
|
||||
|
||||
static void wait_for_bed(const bool no_wait_for_cooling);
|
||||
static bool wait_for_bed(const bool no_wait_for_cooling
|
||||
#if G26_CLICK_CAN_CANCEL
|
||||
, const bool click_to_cancel=false
|
||||
#endif
|
||||
);
|
||||
|
||||
#endif // HAS_HEATED_BED
|
||||
|
||||
|
Reference in New Issue
Block a user