Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
4771e372
Unverified
Commit
4771e372
authored
6 years ago
by
Scott Lahteine
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update criteria for PAUSE/RESUME/STOP menu items (#13294)
parent
56fdcf93
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/lcd/menu/menu_main.cpp
+67
-52
67 additions, 52 deletions
Marlin/src/lcd/menu/menu_main.cpp
with
67 additions
and
52 deletions
Marlin/src/lcd/menu/menu_main.cpp
+
67
−
52
View file @
4771e372
...
@@ -46,7 +46,12 @@
...
@@ -46,7 +46,12 @@
#include
"../../feature/host_actions.h"
#include
"../../feature/host_actions.h"
#endif
#endif
void
lcd_pause
()
{
#define MACHINE_CAN_STOP (ENABLED(SDSUPPORT) || ENABLED(HOST_PROMPT_SUPPORT) || defined(ACTION_ON_CANCEL))
#define MACHINE_CAN_PAUSE (ENABLED(SDSUPPORT) || ENABLED(HOST_PROMPT_SUPPORT) || ENABLED(PARK_HEAD_ON_PAUSE) || defined(ACTION_ON_PAUSE))
#if MACHINE_CAN_PAUSE
void
lcd_pause_job
()
{
#if ENABLED(POWER_LOSS_RECOVERY)
#if ENABLED(POWER_LOSS_RECOVERY)
if
(
recovery
.
enabled
)
recovery
.
save
(
true
,
false
);
if
(
recovery
.
enabled
)
recovery
.
save
(
true
,
false
);
#endif
#endif
...
@@ -75,7 +80,11 @@ void lcd_resume() {
...
@@ -75,7 +80,11 @@ void lcd_resume() {
#endif
#endif
}
}
void
lcd_stop
()
{
#endif // MACHINE_CAN_PAUSE
#if MACHINE_CAN_STOP
void
lcd_abort_job
()
{
#if ENABLED(SDSUPPORT)
#if ENABLED(SDSUPPORT)
wait_for_heatup
=
wait_for_user
=
false
;
wait_for_heatup
=
wait_for_user
=
false
;
card
.
flag
.
abort_sd_printing
=
true
;
card
.
flag
.
abort_sd_printing
=
true
;
...
@@ -93,10 +102,12 @@ void lcd_stop() {
...
@@ -93,10 +102,12 @@ void lcd_stop() {
void
menu_abort_confirm
()
{
void
menu_abort_confirm
()
{
START_MENU
();
START_MENU
();
MENU_BACK
(
MSG_MAIN
);
MENU_BACK
(
MSG_MAIN
);
MENU_ITEM
(
function
,
MSG_STOP_PRINT
,
lcd_
stop
);
MENU_ITEM
(
function
,
MSG_STOP_PRINT
,
lcd_
abort_job
);
END_MENU
();
END_MENU
();
}
}
#endif // MACHINE_CAN_STOP
#if ENABLED(PRUSA_MMU2)
#if ENABLED(PRUSA_MMU2)
#include
"../../lcd/menu/menu_mmu2.h"
#include
"../../lcd/menu/menu_mmu2.h"
#endif
#endif
...
@@ -139,8 +150,10 @@ void menu_main() {
...
@@ -139,8 +150,10 @@ void menu_main() {
;
;
if
(
busy
)
{
if
(
busy
)
{
MENU_ITEM
(
function
,
MSG_PAUSE_PRINT
,
lcd_pause
);
#if MACHINE_CAN_PAUSE
#if ENABLED(SDSUPPORT) || defined(ACTION_ON_CANCEL)
MENU_ITEM
(
function
,
MSG_PAUSE_PRINT
,
lcd_pause_job
);
#endif
#if MACHINE_CAN_STOP
MENU_ITEM
(
submenu
,
MSG_STOP_PRINT
,
menu_abort_confirm
);
MENU_ITEM
(
submenu
,
MSG_STOP_PRINT
,
menu_abort_confirm
);
#endif
#endif
MENU_ITEM
(
submenu
,
MSG_TUNE
,
menu_tune
);
MENU_ITEM
(
submenu
,
MSG_TUNE
,
menu_tune
);
...
@@ -170,11 +183,13 @@ void menu_main() {
...
@@ -170,11 +183,13 @@ void menu_main() {
}
}
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
#if ENABLED(SDSUPPORT) || ENABLED(HOST_ACTION_COMMANDS)
#if MACHINE_CAN_PAUSE
#if DISABLED(HOST_ACTION_COMMANDS)
const
bool
paused
=
(
print_job_timer
.
isPaused
()
if
(
card_open
&&
card
.
isPaused
())
#if ENABLED(SDSUPPORT)
||
card
.
isPaused
()
#endif
#endif
MENU_ITEM
(
function
,
MSG_RESUME_PRINT
,
lcd_resume
);
);
if
(
paused
)
MENU_ITEM
(
function
,
MSG_RESUME_PRINT
,
lcd_resume
);
#endif
#endif
MENU_ITEM
(
submenu
,
MSG_MOTION
,
menu_motion
);
MENU_ITEM
(
submenu
,
MSG_MOTION
,
menu_motion
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment