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
f0d14b83
Commit
f0d14b83
authored
Mar 29, 2019
by
Msq001
Committed by
Scott Lahteine
Mar 29, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Save/restore Relative modes in Power-Loss Recovery (#13501)
parent
c6466c23
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/src/feature/power_loss_recovery.cpp
+8
-0
8 additions, 0 deletions
Marlin/src/feature/power_loss_recovery.cpp
Marlin/src/feature/power_loss_recovery.h
+3
-0
3 additions, 0 deletions
Marlin/src/feature/power_loss_recovery.h
with
11 additions
and
0 deletions
Marlin/src/feature/power_loss_recovery.cpp
+
8
−
0
View file @
f0d14b83
...
@@ -185,6 +185,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
...
@@ -185,6 +185,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
info
.
retract_hop
=
fwretract
.
current_hop
;
info
.
retract_hop
=
fwretract
.
current_hop
;
#endif
#endif
//relative mode
info
.
relative_mode
=
relative_mode
;
info
.
relative_modes_e
=
gcode
.
axis_relative_modes
[
E_AXIS
];
// Commands in the queue
// Commands in the queue
info
.
commands_in_queue
=
save_queue
?
commands_in_queue
:
0
;
info
.
commands_in_queue
=
save_queue
?
commands_in_queue
:
0
;
info
.
cmd_queue_index_r
=
cmd_queue_index_r
;
info
.
cmd_queue_index_r
=
cmd_queue_index_r
;
...
@@ -339,6 +343,10 @@ void PrintJobRecovery::resume() {
...
@@ -339,6 +343,10 @@ void PrintJobRecovery::resume() {
sprintf_P
(
cmd
,
PSTR
(
"G1 F%d"
),
info
.
feedrate
);
sprintf_P
(
cmd
,
PSTR
(
"G1 F%d"
),
info
.
feedrate
);
gcode
.
process_subcommands_now
(
cmd
);
gcode
.
process_subcommands_now
(
cmd
);
//relative mode
if
(
info
.
relative_mode
)
relative_mode
=
true
;
if
(
info
.
relative_modes_e
)
gcode
.
axis_relative_modes
[
E_AXIS
]
=
true
;
// Process commands from the old pending queue
// Process commands from the old pending queue
uint8_t
c
=
info
.
commands_in_queue
,
r
=
info
.
cmd_queue_index_r
;
uint8_t
c
=
info
.
commands_in_queue
,
r
=
info
.
cmd_queue_index_r
;
for
(;
c
--
;
r
=
(
r
+
1
)
%
BUFSIZE
)
for
(;
c
--
;
r
=
(
r
+
1
)
%
BUFSIZE
)
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/feature/power_loss_recovery.h
+
3
−
0
View file @
f0d14b83
...
@@ -76,6 +76,9 @@ typedef struct {
...
@@ -76,6 +76,9 @@ typedef struct {
#endif
#endif
#endif
#endif
// Relative mode
bool
relative_mode
,
relative_modes_e
;
// Command queue
// Command queue
uint8_t
commands_in_queue
,
cmd_queue_index_r
;
uint8_t
commands_in_queue
,
cmd_queue_index_r
;
char
command_queue
[
BUFSIZE
][
MAX_CMD_SIZE
];
char
command_queue
[
BUFSIZE
][
MAX_CMD_SIZE
];
...
...
...
...
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