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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
5c0e5c59
Commit
5c0e5c59
authored
5 years ago
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Fix boot screen warning
parent
dd6efe96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
+10
-9
10 additions, 9 deletions
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
with
10 additions
and
9 deletions
Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
+
10
−
9
View file @
5c0e5c59
...
...
@@ -168,14 +168,13 @@ bool MarlinUI::detected() { return true; }
// Determine text space needed
#ifndef STRING_SPLASH_LINE2
constexpr
u8g_uint_t
text_total_height
=
MENU_FONT_HEIGHT
,
text_width_1
=
u8g_uint_t
(
sizeof
(
STRING_SPLASH_LINE1
)
-
1
)
*
u8g_uint_t
(
MENU_FONT_WIDTH
),
text_width_2
=
0
;
#else
constexpr
u8g_uint_t
text_total_height
=
u8g_uint_t
(
MENU_FONT_HEIGHT
)
*
2
,
text_width_1
=
u8g_uint_t
(
sizeof
(
STRING_SPLASH_LINE1
)
-
1
)
*
u8g_uint_t
(
MENU_FONT_WIDTH
),
text_width_2
=
u8g_uint_t
(
sizeof
(
STRING_SPLASH_LINE2
)
-
1
)
*
u8g_uint_t
(
MENU_FONT_WIDTH
);
constexpr
u8g_uint_t
text_total_height
=
(
MENU_FONT_HEIGHT
)
*
2
,
text_width_2
=
u8g_uint_t
((
sizeof
(
STRING_SPLASH_LINE2
)
-
1
)
*
(
MENU_FONT_WIDTH
));
#endif
constexpr
u8g_uint_t
text_max_width
=
_MAX
(
text_width_1
,
text_width_2
),
constexpr
u8g_uint_t
text_width_1
=
u8g_uint_t
((
sizeof
(
STRING_SPLASH_LINE1
)
-
1
)
*
(
MENU_FONT_WIDTH
)),
text_max_width
=
_MAX
(
text_width_1
,
text_width_2
),
rspace
=
width
-
(
START_BMPWIDTH
);
u8g_int_t
offx
,
offy
,
txt_base
,
txt_offx_1
,
txt_offx_2
;
...
...
@@ -199,14 +198,16 @@ bool MarlinUI::detected() { return true; }
NOLESS
(
offx
,
0
);
NOLESS
(
offy
,
0
);
auto
draw_bootscreen_bmp
=
[
offx
,
offy
,
txt_base
,
txt_offx_1
,
txt_offx_2
](
const
uint8_t
*
bitmap
)
{
auto
draw_bootscreen_bmp
=
[
&
](
const
uint8_t
*
bitmap
)
{
u8g
.
drawBitmapP
(
offx
,
offy
,
START_BMP_BYTEWIDTH
,
START_BMPHEIGHT
,
bitmap
);
set_font
(
FONT_MENU
);
const
u8g_pgm_uint8_t
splash1
[]
U8G_PROGMEM
=
STRING_SPLASH_LINE1
;
#ifndef STRING_SPLASH_LINE2
u8g
.
drawStr
(
txt_offx_1
,
txt_base
,
STRING_SPLASH_LINE
1
);
u8g
.
drawStr
P
(
txt_offx_1
,
txt_base
,
splash
1
);
#else
u8g
.
drawStr
(
txt_offx_1
,
txt_base
-
(
MENU_FONT_HEIGHT
),
STRING_SPLASH_LINE1
);
u8g
.
drawStr
(
txt_offx_2
,
txt_base
,
STRING_SPLASH_LINE2
);
const
u8g_pgm_uint8_t
splash2
[]
U8G_PROGMEM
=
STRING_SPLASH_LINE2
;
u8g
.
drawStrP
(
txt_offx_1
,
txt_base
-
(
MENU_FONT_HEIGHT
),
splash1
);
u8g
.
drawStrP
(
txt_offx_2
,
txt_base
,
splash2
);
#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