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
01b01f6d
Commit
01b01f6d
authored
Apr 17, 2018
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Tweak fwretract.retract debug, comments
parent
e4acd2c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/feature/fwretract.cpp
+8
-6
8 additions, 6 deletions
Marlin/src/feature/fwretract.cpp
with
8 additions
and
6 deletions
Marlin/src/feature/fwretract.cpp
+
8
−
6
View file @
01b01f6d
...
@@ -122,6 +122,7 @@ void FWRetract::retract(const bool retracting
...
@@ -122,6 +122,7 @@ void FWRetract::retract(const bool retracting
SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
}
}
SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]);
SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
//*/
//*/
...
@@ -138,7 +139,7 @@ void FWRetract::retract(const bool retracting
...
@@ -138,7 +139,7 @@ void FWRetract::retract(const bool retracting
feedrate_mm_s
=
retract_feedrate_mm_s
;
feedrate_mm_s
=
retract_feedrate_mm_s
;
current_position
[
E_AXIS
]
+=
(
swapping
?
swap_retract_length
:
retract_length
)
*
renormalize
;
current_position
[
E_AXIS
]
+=
(
swapping
?
swap_retract_length
:
retract_length
)
*
renormalize
;
sync_plan_position_e
();
sync_plan_position_e
();
prepare_move_to_destination
();
prepare_move_to_destination
();
// set_current_to_destination
// Is a Z hop set, and has the hop not yet been done?
// Is a Z hop set, and has the hop not yet been done?
// No double zlifting
// No double zlifting
...
@@ -148,7 +149,7 @@ void FWRetract::retract(const bool retracting
...
@@ -148,7 +149,7 @@ void FWRetract::retract(const bool retracting
hop_amount
+=
retract_zlift
;
// Add to the hop total (again, only once)
hop_amount
+=
retract_zlift
;
// Add to the hop total (again, only once)
destination
[
Z_AXIS
]
+=
retract_zlift
;
// Raise Z by the zlift (M207 Z) amount
destination
[
Z_AXIS
]
+=
retract_zlift
;
// Raise Z by the zlift (M207 Z) amount
feedrate_mm_s
=
planner
.
max_feedrate_mm_s
[
Z_AXIS
];
// Maximum Z feedrate
feedrate_mm_s
=
planner
.
max_feedrate_mm_s
[
Z_AXIS
];
// Maximum Z feedrate
prepare_move_to_destination
();
// Raise up
prepare_move_to_destination
();
// Raise up
, set_current_to_destination
current_position
[
Z_AXIS
]
=
old_z
;
// Spoof the Z position in the planner
current_position
[
Z_AXIS
]
=
old_z
;
// Spoof the Z position in the planner
SYNC_PLAN_POSITION_KINEMATIC
();
SYNC_PLAN_POSITION_KINEMATIC
();
}
}
...
@@ -159,17 +160,17 @@ void FWRetract::retract(const bool retracting
...
@@ -159,17 +160,17 @@ void FWRetract::retract(const bool retracting
current_position
[
Z_AXIS
]
+=
hop_amount
;
// Set actual Z (due to the prior hop)
current_position
[
Z_AXIS
]
+=
hop_amount
;
// Set actual Z (due to the prior hop)
SYNC_PLAN_POSITION_KINEMATIC
();
// Spoof the Z position in the planner
SYNC_PLAN_POSITION_KINEMATIC
();
// Spoof the Z position in the planner
feedrate_mm_s
=
planner
.
max_feedrate_mm_s
[
Z_AXIS
];
// Z feedrate to max
feedrate_mm_s
=
planner
.
max_feedrate_mm_s
[
Z_AXIS
];
// Z feedrate to max
prepare_move_to_destination
();
// Lower Z
and update current_posi
tion
prepare_move_to_destination
();
// Lower Z
, set_current_to_destina
tion
hop_amount
=
0.0
;
// Clear the hop amount
hop_amount
=
0.0
;
// Clear the hop amount
}
}
// A retract multiplier has been added here to get faster swap recovery
// A retract multiplier has been added here to get faster swap recovery
feedrate_mm_s
=
swapping
?
swap_retract_recover_feedrate_mm_s
:
retract_recover_feedrate_mm_s
;
feedrate_mm_s
=
swapping
?
swap_retract_recover_feedrate_mm_s
:
retract_recover_feedrate_mm_s
;
c
onst
float
move_e
=
swapping
?
swap_retract_length
+
swap_retract_recover_length
:
retract_length
+
retract_recover_length
;
c
urrent_position
[
E_AXIS
]
-
=
(
swapping
?
swap_retract_length
+
swap_retract_recover_length
current_position
[
E_AXIS
]
-=
move_e
*
renormalize
;
:
retract_length
+
retract_recover_length
)
*
renormalize
;
sync_plan_position_e
();
sync_plan_position_e
();
prepare_move_to_destination
();
// Recover E
prepare_move_to_destination
();
// Recover E, set_current_to_destination
}
}
feedrate_mm_s
=
old_feedrate_mm_s
;
// Restore original feedrate
feedrate_mm_s
=
old_feedrate_mm_s
;
// Restore original feedrate
...
@@ -192,6 +193,7 @@ void FWRetract::retract(const bool retracting
...
@@ -192,6 +193,7 @@ void FWRetract::retract(const bool retracting
SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
SERIAL_ECHOLNPAIR("] ", retracted_swap[i]);
}
}
SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]);
SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
//*/
//*/
...
...
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