Standardize active/paused functions
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
#include "../../module/motion.h"
|
||||
#include "../../module/printcounter.h"
|
||||
#include "../../gcode/queue.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
|
||||
#if HAS_BUZZER
|
||||
#include "../../libs/buzzer.h"
|
||||
#endif
|
||||
@ -206,8 +206,10 @@ void MenuItem_bool::action(PGM_P pstr, bool *ptr, screenFunc_t callback) {
|
||||
void _lcd_set_z_fade_height() { set_z_fade_height(lcd_z_fade_height); }
|
||||
#endif
|
||||
|
||||
#include "../../Marlin.h"
|
||||
|
||||
bool printer_busy() {
|
||||
return planner.movesplanned() || IS_SD_PRINTING() || print_job_timer.isRunning();
|
||||
return planner.movesplanned() || printingIsActive();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ void menu_main() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_WATCH);
|
||||
|
||||
const bool busy = IS_SD_PRINTING() || print_job_timer.isRunning()
|
||||
const bool busy = printingIsActive()
|
||||
#if ENABLED(SDSUPPORT)
|
||||
, card_detected = card.isMounted()
|
||||
, card_open = card_detected && card.isFileOpen()
|
||||
@ -147,12 +147,7 @@ void menu_main() {
|
||||
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
|
||||
|
||||
#if MACHINE_CAN_PAUSE
|
||||
const bool paused = (print_job_timer.isPaused()
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|| card.isPaused()
|
||||
#endif
|
||||
);
|
||||
if (paused) ACTION_ITEM(MSG_RESUME_PRINT, ui.resume_print);
|
||||
if (printingIsPaused()) ACTION_ITEM(MSG_RESUME_PRINT, ui.resume_print);
|
||||
#endif
|
||||
|
||||
SUBMENU(MSG_MOTION, menu_motion);
|
||||
|
Reference in New Issue
Block a user