Merge pull request #6511 from Bob-the-Kuhn/UBL--G26-minor-improvements

UBL: G26 minor improvements
This commit is contained in:
Scott Lahteine 2017-05-02 16:06:22 -05:00 committed by GitHub
commit 806f670092

View file

@ -179,6 +179,7 @@
* nozzle in a problem area and doing a G29 P4 R command. * nozzle in a problem area and doing a G29 P4 R command.
*/ */
void gcode_G26() { void gcode_G26() {
SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s).");
float tmp, start_angle, end_angle; float tmp, start_angle, end_angle;
int i, xi, yi; int i, xi, yi;
mesh_index_pair location; mesh_index_pair location;
@ -766,6 +767,7 @@
* wait for them to get up to temperature. * wait for them to get up to temperature.
*/ */
bool turn_on_heaters() { bool turn_on_heaters() {
millis_t next;
#if HAS_TEMP_BED #if HAS_TEMP_BED
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
if (bed_temp > 25) { if (bed_temp > 25) {
@ -774,8 +776,13 @@
#endif #endif
ubl.has_control_of_lcd_panel = true; ubl.has_control_of_lcd_panel = true;
thermalManager.setTargetBed(bed_temp); thermalManager.setTargetBed(bed_temp);
next = millis() + 5000UL;
while (abs(thermalManager.degBed() - bed_temp) > 3) { while (abs(thermalManager.degBed() - bed_temp) > 3) {
if (ubl_lcd_clicked()) return exit_from_g26(); if (ubl_lcd_clicked()) return exit_from_g26();
if (PENDING(millis(), next)) {
next = millis() + 5000UL;
print_heaterstates();
}
idle(); idle();
} }
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
@ -789,6 +796,10 @@
thermalManager.setTargetHotend(hotend_temp, 0); thermalManager.setTargetHotend(hotend_temp, 0);
while (abs(thermalManager.degHotend(0) - hotend_temp) > 3) { while (abs(thermalManager.degHotend(0) - hotend_temp) > 3) {
if (ubl_lcd_clicked()) return exit_from_g26(); if (ubl_lcd_clicked()) return exit_from_g26();
if (PENDING(millis(), next)) {
next = millis() + 5000UL;
print_heaterstates();
}
idle(); idle();
} }