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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
9686ffed
Commit
9686ffed
authored
Dec 30, 2017
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Single pause flag also indicates SD print pause
parent
6d94bbf6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Marlin/src/Marlin.cpp
+1
-1
1 addition, 1 deletion
Marlin/src/Marlin.cpp
Marlin/src/feature/pause.cpp
+9
-10
9 additions, 10 deletions
Marlin/src/feature/pause.cpp
Marlin/src/feature/pause.h
+1
-1
1 addition, 1 deletion
Marlin/src/feature/pause.h
with
11 additions
and
12 deletions
Marlin/src/Marlin.cpp
+
1
−
1
View file @
9686ffed
...
...
@@ -346,7 +346,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
// Prevent steppers timing-out in the middle of M600
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(PAUSE_PARK_NO_STEPPER_TIMEOUT)
#define MOVE_AWAY_TEST !
move_away_flag
#define MOVE_AWAY_TEST !
did_pause_print
#else
#define MOVE_AWAY_TEST true
#endif
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/feature/pause.cpp
+
9
−
10
View file @
9686ffed
...
...
@@ -54,7 +54,6 @@ static float resume_position[XYZE];
#if ENABLED(SDSUPPORT)
#include
"../sd/cardreader.h"
static
bool
sd_print_paused
=
false
;
#endif
#if HAS_BUZZER
...
...
@@ -107,12 +106,12 @@ void do_pause_e_move(const float &length, const float fr) {
// public:
bool
move_away_flag
=
false
;
uint8_t
did_pause_print
=
0
;
bool
pause_print
(
const
float
&
retract
,
const
point_t
&
park_point
,
const
float
&
unload_length
/*=0*/
,
const
int8_t
max_beep_count
/*=0*/
,
const
bool
show_lcd
/*=false*/
)
{
if
(
move_away_flag
)
return
false
;
// already paused
if
(
did_pause_print
)
return
false
;
// already paused
#ifdef ACTION_ON_PAUSE
SERIAL_ECHOLNPGM
(
"//action:"
ACTION_ON_PAUSE
);
...
...
@@ -132,13 +131,13 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
}
// Indicate that the printer is paused
move_away_flag
=
true
;
++
did_pause_print
;
// Pause the print job and timer
#if ENABLED(SDSUPPORT)
if
(
IS_SD_PRINTING
)
{
card
.
pauseSDPrint
();
sd_print_paused
=
true
;
++
did_pause_print
;
}
#endif
print_job_timer
.
pause
();
...
...
@@ -256,7 +255,7 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/) {
void
resume_print
(
const
float
&
load_length
/*=0*/
,
const
float
&
initial_extrude_length
/*=0*/
,
const
int8_t
max_beep_count
/*=0*/
)
{
bool
nozzle_timed_out
=
false
;
if
(
!
move_away_flag
)
return
;
if
(
!
did_pause_print
)
return
;
// Re-enable the heaters if they timed out
HOTEND_LOOP
()
{
...
...
@@ -350,14 +349,14 @@ void resume_print(const float &load_length/*=0*/, const float &initial_extrude_l
SERIAL_ECHOLNPGM
(
"//action:"
ACTION_ON_RESUME
);
#endif
--
did_pause_print
;
#if ENABLED(SDSUPPORT)
if
(
sd_print_paused
)
{
if
(
did_pause_print
)
{
card
.
startFileprint
();
sd_print_paused
=
false
;
--
did_pause_print
;
}
#endif
move_away_flag
=
false
;
}
#endif // ADVANCED_PAUSE_FEATURE || PARK_HEAD_ON_PAUSE
This diff is collapsed.
Click to expand it.
Marlin/src/feature/pause.h
+
1
−
1
View file @
9686ffed
...
...
@@ -30,7 +30,7 @@
#include
"../libs/nozzle.h"
extern
bool
move_away_flag
;
extern
bool
did_pause_print
;
bool
pause_print
(
const
float
&
retract
,
const
point_t
&
park_point
,
const
float
&
unload_length
=
0
,
const
int8_t
max_beep_count
=
0
,
const
bool
show_lcd
=
false
...
...
...
...
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