Skip to content

Commit

Permalink
Add missing ExtUI user confirmation (MarlinFirmware#14992)
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation authored and thinkyhead committed Aug 19, 2019
1 parent 33d54c0 commit af5a7a2
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Marlin/src/feature/pause.cpp
Expand Up @@ -187,6 +187,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
host_action_prompt_button(PSTR("Continue"));
host_action_prompt_show();
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Load Filament"));
#endif
while (wait_for_user) {
#if HAS_BUZZER
filament_change_beep(max_beep_count);
Expand Down Expand Up @@ -239,6 +242,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Continuous Purge Running..."), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Continuous Purge Running..."));
#endif
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
wait_for_user = false;
Expand Down Expand Up @@ -517,6 +523,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Nozzle Parked"));
#endif
while (wait_for_user) {
#if HAS_BUZZER
filament_change_beep(max_beep_count);
Expand All @@ -538,6 +547,10 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("HeaterTimeout"), PSTR("Reheat"));
#endif

#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("HeaterTimeout"));
#endif

// Wait for LCD click or M108
while (wait_for_user) idle(true);

Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/feature/prusa_MMU2/mmu2.cpp
Expand Up @@ -42,6 +42,10 @@ MMU2 mmu2;
#include "../../feature/host_actions.h"
#endif

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
#endif

#define DEBUG_OUT ENABLED(MMU2_DEBUG)
#include "../../core/debug_out.h"

Expand Down Expand Up @@ -711,6 +715,9 @@ void MMU2::filament_runout() {
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("MMU2 Eject Recover"));
#endif
while (wait_for_user) idle();
BUZZ(200, 404);
BUZZ(200, 404);
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/gcode/config/M43.cpp
Expand Up @@ -42,6 +42,10 @@
#include "../../feature/host_actions.h"
#endif

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
#endif

#ifndef GET_PIN_MAP_PIN_M43
#define GET_PIN_MAP_PIN_M43(Q) GET_PIN_MAP_PIN(Q)
#endif
Expand Down Expand Up @@ -329,6 +333,9 @@ void GcodeSuite::M43() {
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M43 Wait Called"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("M43 Wait Called"));
#endif
#endif

for (;;) {
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/gcode/lcd/M0_M1.cpp
Expand Up @@ -97,6 +97,9 @@ void GcodeSuite::M0_M1() {
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("M0/1 Break Called"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("M0/1 Break Called"));
#endif

if (ms > 0) {
ms += millis(); // wait until this time for a click
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/lcd/menu/menu_delta_calibrate.cpp
Expand Up @@ -36,6 +36,10 @@
#include "../../feature/bedlevel/bedlevel.h"
#endif

#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
#endif

void _man_probe_pt(const float &rx, const float &ry) {
do_blocking_move_to(rx, ry, Z_CLEARANCE_BETWEEN_PROBES);
ui.synchronize();
Expand All @@ -55,6 +59,9 @@ void _man_probe_pt(const float &rx, const float &ry) {
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Delta Calibration in progress"));
#endif
while (wait_for_user) idle();
ui.goto_previous_screen_no_defer();
return current_position[Z_AXIS];
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/module/probe.cpp
Expand Up @@ -79,6 +79,10 @@ float zprobe_zoffset; // Initialized by settings.load()
#include "stepper_indirection.h"
#endif

#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extensible_ui/ui_api.h"
#endif

#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
#include "../core/debug_out.h"

Expand Down Expand Up @@ -371,6 +375,9 @@ FORCE_INLINE void probe_specific_action(const bool deploy) {
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Stow Probe"));
#endif
while (wait_for_user) idle();
ui.reset_status();

Expand Down

0 comments on commit af5a7a2

Please sign in to comment.