Skip to main content
Homepage
Explore
Search or go to…
/
Register
Sign in
Explore
Primary navigation
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
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
782c598e
Commit
782c598e
authored
Apr 2, 2016
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Use ftostr43 with '+' option in MBL Z adjuster
parent
f08b0d03
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/ultralcd.cpp
+8
-8
8 additions, 8 deletions
Marlin/ultralcd.cpp
Marlin/ultralcd.h
+1
-1
1 addition, 1 deletion
Marlin/ultralcd.h
with
9 additions
and
9 deletions
Marlin/ultralcd.cpp
+
8
−
8
View file @
782c598e
...
@@ -2223,13 +2223,13 @@ char *ftostr32(const float& x) {
...
@@ -2223,13 +2223,13 @@ char *ftostr32(const float& x) {
return
conv
;
return
conv
;
}
}
// Convert signed float to string (
len 5 or 6
) with 1.234 /
-
1.234 format
// Convert signed float to string (
6 digit
) with
-
1.234 /
_0.000 / +
1.234 format
char
*
ftostr43
(
const
float
&
x
)
{
char
*
ftostr43
(
const
float
&
x
,
char
plus
/*=' '*/
)
{
long
xx
=
x
*
1000
;
long
xx
=
x
*
1000
;
char
*
conv_ptr
=
conv
;
if
(
xx
==
0
)
if
(
xx
>=
0
)
{
conv
[
0
]
=
' '
;
conv_ptr
++
;
else
if
(
xx
>
0
)
}
conv
[
0
]
=
plus
;
else
{
else
{
xx
=
-
xx
;
xx
=
-
xx
;
conv
[
0
]
=
'-'
;
conv
[
0
]
=
'-'
;
...
@@ -2240,7 +2240,7 @@ char* ftostr43(const float& x) {
...
@@ -2240,7 +2240,7 @@ char* ftostr43(const float& x) {
conv
[
4
]
=
(
xx
/
10
)
%
10
+
'0'
;
conv
[
4
]
=
(
xx
/
10
)
%
10
+
'0'
;
conv
[
5
]
=
(
xx
)
%
10
+
'0'
;
conv
[
5
]
=
(
xx
)
%
10
+
'0'
;
conv
[
6
]
=
0
;
conv
[
6
]
=
0
;
return
conv
_ptr
;
return
conv
;
}
}
// Convert unsigned float to string with 1.23 format
// Convert unsigned float to string with 1.23 format
...
@@ -2453,7 +2453,7 @@ char* ftostr52(const float& x) {
...
@@ -2453,7 +2453,7 @@ char* ftostr52(const float& x) {
}
}
if
(
lcdDrawUpdate
)
{
if
(
lcdDrawUpdate
)
{
float
v
=
current_position
[
Z_AXIS
]
-
MESH_HOME_SEARCH_Z
;
float
v
=
current_position
[
Z_AXIS
]
-
MESH_HOME_SEARCH_Z
;
lcd_implementation_drawedit
(
PSTR
(
MSG_MOVE_Z
),
ftostr43
(
v
+
(
v
<
0
?
-
0.0001
:
0.0001
)));
lcd_implementation_drawedit
(
PSTR
(
MSG_MOVE_Z
),
ftostr43
(
v
+
(
v
<
0
?
-
0.0001
:
0.0001
)
,
'+'
));
}
}
static
bool
debounce_click
=
false
;
static
bool
debounce_click
=
false
;
if
(
LCD_CLICKED
)
{
if
(
LCD_CLICKED
)
{
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/ultralcd.h
+
1
−
1
View file @
782c598e
...
@@ -156,7 +156,7 @@ char* ftostr4sign(const float& x);
...
@@ -156,7 +156,7 @@ char* ftostr4sign(const float& x);
char
*
ftostr31ns
(
const
float
&
x
);
// float to string without sign character
char
*
ftostr31ns
(
const
float
&
x
);
// float to string without sign character
char
*
ftostr31
(
const
float
&
x
);
char
*
ftostr31
(
const
float
&
x
);
char
*
ftostr32
(
const
float
&
x
);
char
*
ftostr32
(
const
float
&
x
);
char
*
ftostr43
(
const
float
&
x
);
char
*
ftostr43
(
const
float
&
x
,
char
plus
=
' '
);
char
*
ftostr12ns
(
const
float
&
x
);
char
*
ftostr12ns
(
const
float
&
x
);
char
*
ftostr32sp
(
const
float
&
x
);
// remove zero-padding from ftostr32
char
*
ftostr32sp
(
const
float
&
x
);
// remove zero-padding from ftostr32
char
*
ftostr5
(
const
float
&
x
);
char
*
ftostr5
(
const
float
&
x
);
...
...
...
...
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