Various fixes for MarlinUI and ExtUI (#12439)

This commit is contained in:
Marcio Teixeira
2018-11-17 21:21:44 -07:00
committed by Scott Lahteine
parent d3605cfc26
commit c1e17037e5
24 changed files with 226 additions and 216 deletions

View File

@ -164,7 +164,7 @@ int8_t g26_prime_flag;
*/
bool user_canceled() {
if (!ui.button_pressed()) return false; // Return if the button isn't pressed
ui.setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
ui.set_status_P(PSTR("Mesh Validation Stopped."), 99);
#if HAS_LCD_MENU
ui.quick_feedback();
#endif
@ -414,7 +414,7 @@ inline bool turn_on_heaters() {
if (g26_bed_temp > 25) {
#if ENABLED(ULTRA_LCD)
ui.setstatusPGM(PSTR("G26 Heating Bed."), 99);
ui.set_status_P(PSTR("G26 Heating Bed."), 99);
ui.quick_feedback();
#if HAS_LCD_MENU
ui.capture();
@ -435,7 +435,7 @@ inline bool turn_on_heaters() {
// Start heating the active nozzle
#if ENABLED(ULTRA_LCD)
ui.setstatusPGM(PSTR("G26 Heating Nozzle."), 99);
ui.set_status_P(PSTR("G26 Heating Nozzle."), 99);
ui.quick_feedback();
#endif
thermalManager.setTargetHotend(g26_hotend_temp, active_extruder);
@ -469,7 +469,7 @@ inline bool prime_nozzle() {
if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged
ui.capture();
ui.setstatusPGM(PSTR("User-Controlled Prime"), 99);
ui.set_status_P(PSTR("User-Controlled Prime"), 99);
ui.chirp();
set_destination_from_current();
@ -493,7 +493,7 @@ inline bool prime_nozzle() {
ui.wait_for_release();
ui.setstatusPGM(PSTR("Done Priming"), 99);
ui.set_status_P(PSTR("Done Priming"), 99);
ui.quick_feedback();
ui.release();
}
@ -501,7 +501,7 @@ inline bool prime_nozzle() {
#endif
{
#if ENABLED(ULTRA_LCD)
ui.setstatusPGM(PSTR("Fixed Length Prime."), 99);
ui.set_status_P(PSTR("Fixed Length Prime."), 99);
ui.quick_feedback();
#endif
set_destination_from_current();
@ -894,7 +894,7 @@ void GcodeSuite::G26() {
} while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0);
LEAVE:
ui.setstatusPGM(PSTR("Leaving G26"), -1);
ui.set_status_P(PSTR("Leaving G26"), -1);
retract_filament(destination);
destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;

View File

@ -522,7 +522,7 @@ void GcodeSuite::G33() {
if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)");
if (set_up) SERIAL_PROTOCOLPGM(" (SET-UP)");
SERIAL_EOL();
ui.setstatusPGM(checkingac);
ui.set_status_P(checkingac);
print_calibration_settings(_endstop_results, _angle_results);
@ -683,7 +683,7 @@ void GcodeSuite::G33() {
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev_min * 1000.0));
else
sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev_min));
ui.setstatus(mess);
ui.set_status(mess);
print_calibration_settings(_endstop_results, _angle_results);
serialprintPGM(save_message);
SERIAL_EOL();
@ -699,7 +699,7 @@ void GcodeSuite::G33() {
SERIAL_PROTOCOLPGM("std dev:");
SERIAL_PROTOCOL_F(zero_std_dev, 3);
SERIAL_EOL();
ui.setstatus(mess);
ui.set_status(mess);
if (verbose_level > 1)
print_calibration_settings(_endstop_results, _angle_results);
}
@ -719,7 +719,7 @@ void GcodeSuite::G33() {
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev * 1000.0));
else
sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev));
ui.setstatus(mess);
ui.set_status(mess);
}
ac_home();
}

View File

@ -62,7 +62,7 @@ void GcodeSuite::M0_M1() {
#if HAS_LCD_MENU
if (has_message)
ui.setstatus(args, true);
ui.set_status(args, true);
else {
LCD_MESSAGEPGM(MSG_USERWAIT);
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0

View File

@ -28,6 +28,6 @@
*/
void GcodeSuite::M117() {
ui.setstatus(parser.string_arg);
ui.set_status(parser.string_arg);
}

View File

@ -28,6 +28,7 @@
#include "../../sd/cardreader.h"
#include "../../module/printcounter.h"
#include "../../module/stepper.h"
#include "../../lcd/ultralcd.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../feature/power_loss_recovery.h"
@ -100,6 +101,8 @@ void GcodeSuite::M24() {
else
#endif
print_job_timer.start();
ui.reset_status();
}
/**

View File

@ -40,7 +40,7 @@ void GcodeSuite::M31() {
char buffer[21];
duration_t elapsed = print_job_timer.duration();
elapsed.toString(buffer);
ui.setstatus(buffer);
ui.set_status(buffer);
SERIAL_ECHO_START_P(port);
SERIAL_ECHOLNPAIR_P(port, "Print time: ", buffer);

View File

@ -64,7 +64,7 @@ void GcodeSuite::M190() {
}
else return;
ui.setstatusPGM(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING));
ui.set_status_P(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING));
thermalManager.wait_for_bed(no_wait_for_cooling);
}