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
d6aa127c
Commit
d6aa127c
authored
Nov 4, 2017
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Remove I2CPEM workspace offset
parent
79772219
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/I2CPositionEncoder.h
+2
-15
2 additions, 15 deletions
Marlin/src/feature/I2CPositionEncoder.h
Marlin/src/gcode/geometry/G92.cpp
+0
-5
0 additions, 5 deletions
Marlin/src/gcode/geometry/G92.cpp
with
2 additions
and
20 deletions
Marlin/src/feature/I2CPositionEncoder.h
+
2
−
15
View file @
d6aa127c
...
@@ -124,10 +124,7 @@ class I2CPositionEncoder {
...
@@ -124,10 +124,7 @@ class I2CPositionEncoder {
invert
=
false
,
invert
=
false
,
ec
=
true
;
ec
=
true
;
float
axisOffset
=
0
;
int32_t
zeroOffset
=
0
,
int32_t
axisOffsetTicks
=
0
,
zeroOffset
=
0
,
lastPosition
=
0
,
lastPosition
=
0
,
position
;
position
;
...
@@ -165,7 +162,7 @@ class I2CPositionEncoder {
...
@@ -165,7 +162,7 @@ class I2CPositionEncoder {
}
}
FORCE_INLINE
float
get_position_mm
()
{
return
mm_from_count
(
get_position
());
}
FORCE_INLINE
float
get_position_mm
()
{
return
mm_from_count
(
get_position
());
}
FORCE_INLINE
int32_t
get_position
()
{
return
get_raw_count
()
-
zeroOffset
-
axisOffsetTicks
;
}
FORCE_INLINE
int32_t
get_position
()
{
return
get_raw_count
()
-
zeroOffset
;
}
int32_t
get_axis_error_steps
(
const
bool
report
);
int32_t
get_axis_error_steps
(
const
bool
report
);
float
get_axis_error_mm
(
const
bool
report
);
float
get_axis_error_mm
(
const
bool
report
);
...
@@ -216,16 +213,6 @@ class I2CPositionEncoder {
...
@@ -216,16 +213,6 @@ class I2CPositionEncoder {
FORCE_INLINE
int
get_stepper_ticks
()
{
return
stepperTicks
;
}
FORCE_INLINE
int
get_stepper_ticks
()
{
return
stepperTicks
;
}
FORCE_INLINE
void
set_stepper_ticks
(
const
int
ticks
)
{
stepperTicks
=
ticks
;
}
FORCE_INLINE
void
set_stepper_ticks
(
const
int
ticks
)
{
stepperTicks
=
ticks
;
}
FORCE_INLINE
float
get_axis_offset
()
{
return
axisOffset
;
}
FORCE_INLINE
void
set_axis_offset
(
const
float
newOffset
)
{
axisOffset
=
newOffset
;
axisOffsetTicks
=
int32_t
(
axisOffset
*
get_encoder_ticks_mm
());
}
FORCE_INLINE
void
set_current_position
(
const
float
newPositionMm
)
{
set_axis_offset
(
get_position_mm
()
-
newPositionMm
+
axisOffset
);
}
};
};
class
I2CPositionEncodersMgr
{
class
I2CPositionEncodersMgr
{
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/gcode/geometry/G92.cpp
+
0
−
5
View file @
d6aa127c
...
@@ -55,11 +55,6 @@ void GcodeSuite::G92() {
...
@@ -55,11 +55,6 @@ void GcodeSuite::G92() {
#if HAS_POSITION_SHIFT
#if HAS_POSITION_SHIFT
position_shift
[
i
]
+=
v
-
p
;
// Offset the coordinate space
position_shift
[
i
]
+=
v
-
p
;
// Offset the coordinate space
update_software_endstops
((
AxisEnum
)
i
);
update_software_endstops
((
AxisEnum
)
i
);
#if ENABLED(I2C_POSITION_ENCODERS)
I2CPEM
.
encoders
[
I2CPEM
.
idx_from_axis
((
AxisEnum
)
i
)].
set_axis_offset
(
position_shift
[
i
]);
#endif
#endif
#endif
}
}
#endif
#endif
...
...
...
...
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