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
32c607ff
Commit
32c607ff
authored
Oct 13, 2017
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Ensure fade factor is recalculated if fade height changes
parent
ca1e4737
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/bedlevel/bedlevel.cpp
+1
-0
1 addition, 0 deletions
Marlin/src/feature/bedlevel/bedlevel.cpp
Marlin/src/module/planner.h
+7
-1
7 additions, 1 deletion
Marlin/src/module/planner.h
with
8 additions
and
1 deletion
Marlin/src/feature/bedlevel/bedlevel.cpp
+
1
−
0
View file @
32c607ff
...
...
@@ -139,6 +139,7 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
planner
.
z_fade_height
=
zfh
;
planner
.
inverse_z_fade_height
=
RECIPROCAL
(
zfh
);
planner
.
force_fade_recalc
();
if
(
level_active
)
{
#if ENABLED(AUTO_BED_LEVELING_UBL)
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/module/planner.h
+
7
−
1
View file @
32c607ff
...
...
@@ -202,6 +202,10 @@ class Planner {
*/
static
uint32_t
cutoff_long
;
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
static
float
last_raw_lz
;
#endif
#if ENABLED(DISABLE_INACTIVE_EXTRUDER)
/**
* Counters to manage disabling inactive extruders
...
...
@@ -273,7 +277,7 @@ class Planner {
* Returns 0.0 if Z is past the specified 'Fade Height'.
*/
inline
static
float
fade_scaling_factor_for_z
(
const
float
&
lz
)
{
static
float
z_fade_factor
=
1.0
,
last_raw_lz
=
-
999.0
;
static
float
z_fade_factor
=
1.0
;
if
(
z_fade_height
)
{
const
float
raw_lz
=
RAW_Z_POSITION
(
lz
);
if
(
raw_lz
>=
z_fade_height
)
return
0.0
;
...
...
@@ -286,6 +290,8 @@ class Planner {
return
1.0
;
}
FORCE_INLINE
static
void
force_fade_recalc
()
{
last_raw_lz
=
-
999.999
;
}
#else
FORCE_INLINE
static
float
fade_scaling_factor_for_z
(
const
float
&
lz
)
{
...
...
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