Add heater timeouts to ExtUI (#13970)

- Add local UI methods to get heater timeout state.
- Add methods to resume timed-out heaters.
- Re-enable heaters on UI temperature request.
- Make `ExtUI` show a dialog box if pause needs a button press after reheat.
This commit is contained in:
Marcio Teixeira
2019-05-10 14:56:13 -06:00
committed by Scott Lahteine
parent fa3739aa23
commit 227f29090d
3 changed files with 69 additions and 34 deletions

View File

@ -49,6 +49,10 @@
#include "host_actions.h"
#endif
#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extensible_ui/ui_api.h"
#endif
#include "../lcd/ultralcd.h"
#include "../libs/buzzer.h"
#include "../libs/nozzle.h"
@ -538,6 +542,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("Reheating"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onStatusChanged(PSTR("Reheating..."));
#endif
// Re-enable the heaters if they timed out
HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e);
@ -555,6 +562,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("Reheat Done"), PSTR("Continue"));
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onUserConfirmRequired("Reheat finished.");
#endif
wait_for_user = true;
nozzle_timed_out = false;