Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
27cbf4f3
Commit
27cbf4f3
authored
Nov 13, 2014
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adaption of LCD info screen
parent
8d8c62d8
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
559 additions
and
463 deletions
+559
-463
DOGMbitmaps.h
MarlinKimbra/DOGMbitmaps.h
+156
-48
dogm_lcd_implementation.h
MarlinKimbra/dogm_lcd_implementation.h
+403
-415
No files found.
MarlinKimbra/DOGMbitmaps.h
View file @
27cbf4f3
This diff is collapsed.
Click to expand it.
MarlinKimbra/dogm_lcd_implementation.h
View file @
27cbf4f3
...
...
@@ -16,8 +16,8 @@
#define ULTRA_LCD_IMPLEMENTATION_DOGM_H
/**
* Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays.
**/
* Implementation of the LCD display routines for a DOGM128 graphic display. These are common LCD 128x64 pixel graphic displays.
**/
#ifdef ULTIPANEL
#define BLEN_A 0
...
...
@@ -42,14 +42,14 @@
/* Russian language not supported yet, needs custom font
#if LANGUAGE_CHOICE == 6
#include "LiquidCrystalRus.h"
#define LCD_CLASS LiquidCrystalRus
#else
#include <LiquidCrystal.h>
#define LCD_CLASS LiquidCrystal
#endif
*/
#if LANGUAGE_CHOICE == 6
#include "LiquidCrystalRus.h"
#define LCD_CLASS LiquidCrystalRus
#else
#include <LiquidCrystal.h>
#define LCD_CLASS LiquidCrystal
#endif
*/
// DOGM parameters (size in pixels)
#define DOG_CHAR_WIDTH 6
...
...
@@ -106,8 +106,7 @@ static void lcd_implementation_init()
u8g
.
setColorIndex
(
1
);
u8g
.
drawBox
(
0
,
0
,
u8g
.
getWidth
(),
u8g
.
getHeight
());
u8g
.
setColorIndex
(
1
);
}
while
(
u8g
.
nextPage
()
);
}
while
(
u8g
.
nextPage
()
);
#ifdef LCD_SCREEN_ROT_90
u8g
.
setRot90
();
// Rotate screen by 90°
...
...
@@ -141,22 +140,21 @@ static void lcd_implementation_init()
u8g
.
drawStr
(
62
,
61
,
"uses u"
);
u8g
.
drawStr90
(
92
,
57
,
"8"
);
u8g
.
drawStr
(
100
,
61
,
"glib"
);
}
while
(
u8g
.
nextPage
()
);
}
while
(
u8g
.
nextPage
()
);
}
static
void
lcd_implementation_clear
()
{
// NO NEED TO IMPLEMENT LIKE SO. Picture loop automatically clears the display.
//
// Check this article: http://arduino.cc/forum/index.php?topic=91395.25;wap2
//
// u8g.firstPage();
// do {
// u8g.setColorIndex(0);
// u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
// u8g.setColorIndex(1);
// } while( u8g.nextPage() );
// NO NEED TO IMPLEMENT LIKE SO. Picture loop automatically clears the display.
//
// Check this article: http://arduino.cc/forum/index.php?topic=91395.25;wap2
//
// u8g.firstPage();
// do {
// u8g.setColorIndex(0);
// u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
// u8g.setColorIndex(1);
// } while( u8g.nextPage() );
}
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */
...
...
@@ -181,7 +179,7 @@ static void lcd_implementation_status_screen()
if
((
blink
%
2
)
&&
fanSpeed
)
u8g
.
drawBitmapP
(
9
,
1
,
STATUS_SCREENBYTEWIDTH
,
STATUS_SCREENHEIGHT
,
status_screen0_bmp
);
else
u8g
.
drawBitmapP
(
9
,
1
,
STATUS_SCREENBYTEWIDTH
,
STATUS_SCREENHEIGHT
,
status_screen1_bmp
);
#ifdef SDSUPPORT
#ifdef SDSUPPORT
//SD Card Symbol
u8g
.
drawBox
(
42
,
42
,
8
,
7
);
u8g
.
drawBox
(
50
,
44
,
2
,
5
);
...
...
@@ -210,11 +208,10 @@ static void lcd_implementation_status_screen()
u8g
.
print
(
itostr2
(
time
/
60
));
u8g
.
print
(
':'
);
u8g
.
print
(
itostr2
(
time
%
60
));
}
else
{
}
else
{
lcd_printPGM
(
PSTR
(
"--:--"
));
}
#endif
#endif
// Extruder 1
u8g
.
setFont
(
FONT_STATUSMENU
);
...
...
@@ -234,7 +231,7 @@ static void lcd_implementation_status_screen()
// Extruder 2
u8g
.
setFont
(
FONT_STATUSMENU
);
#if EXTRUDERS > 1
#if EXTRUDERS > 1
u8g
.
setPrintPos
(
31
,
6
);
u8g
.
print
(
itostr3
(
int
(
degTargetHotend
(
1
)
+
0
.
5
)));
lcd_printPGM
(
PSTR
(
LCD_STR_DEGREE
" "
));
...
...
@@ -248,14 +245,11 @@ static void lcd_implementation_status_screen()
u8g
.
drawBox
(
38
,
17
,
2
,
2
);
u8g
.
setColorIndex
(
1
);
// black on white
}
#else
u8g
.
setPrintPos
(
31
,
27
);
u8g
.
print
(
"---"
);
#endif
#endif
// Extruder 3
u8g
.
setFont
(
FONT_STATUSMENU
);
# if EXTRUDERS > 2
# if EXTRUDERS > 2
u8g
.
setPrintPos
(
55
,
6
);
u8g
.
print
(
itostr3
(
int
(
degTargetHotend
(
2
)
+
0
.
5
)));
lcd_printPGM
(
PSTR
(
LCD_STR_DEGREE
" "
));
...
...
@@ -269,10 +263,7 @@ static void lcd_implementation_status_screen()
u8g
.
drawBox
(
62
,
17
,
2
,
2
);
u8g
.
setColorIndex
(
1
);
// black on white
}
#else
u8g
.
setPrintPos
(
55
,
27
);
u8g
.
print
(
"---"
);
#endif
#endif
// Heatbed
u8g
.
setFont
(
FONT_STATUSMENU
);
...
...
@@ -293,12 +284,12 @@ static void lcd_implementation_status_screen()
// Fan
u8g
.
setFont
(
FONT_STATUSMENU
);
u8g
.
setPrintPos
(
104
,
27
);
#if defined(FAN_PIN) && FAN_PIN > -1
#if defined(FAN_PIN) && FAN_PIN > -1
u8g
.
print
(
itostr3
(
int
((
fanSpeed
*
100
)
/
256
+
1
)));
u8g
.
print
(
"%"
);
#else
#else
u8g
.
print
(
"---"
);
#endif
#endif
// X, Y, Z-Coordinates
...
...
@@ -352,12 +343,10 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
u8g
.
setColorIndex
(
1
);
// black on white
u8g
.
drawBox
(
0
,
row
*
DOG_CHAR_HEIGHT
+
3
,
128
,
DOG_CHAR_HEIGHT
);
u8g
.
setColorIndex
(
0
);
// following text must be white on black
}
else
u8g
.
setColorIndex
(
1
);
// unmarked text is black on white
}
else
u8g
.
setColorIndex
(
1
);
// unmarked text is black on white
u8g
.
setPrintPos
(
0
*
DOG_CHAR_WIDTH
,
(
row
+
1
)
*
DOG_CHAR_HEIGHT
);
if
(
pre_char
!=
'>'
)
u8g
.
print
(
pre_char
);
else
u8g
.
print
(
' '
);
// Row selector is obsolete
if
(
pre_char
!=
'>'
)
u8g
.
print
(
pre_char
);
else
u8g
.
print
(
' '
);
// Row selector is obsolete
while
(
(
c
=
pgm_read_byte
(
pstr
))
!=
'\0'
)
...
...
@@ -514,7 +503,7 @@ static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* pstr, co
u8g
.
setPrintPos
(
0
*
DOG_CHAR_WIDTH
,
(
row
+
1
)
*
DOG_CHAR_HEIGHT
);
u8g
.
print
(
' '
);
while
((
c
=
*
filename
)
!=
'\0'
)
while
((
c
=
*
filename
)
!=
'\0'
)
{
u8g
.
print
(
c
);
...
...
@@ -610,4 +599,3 @@ static void lcd_implementation_quick_feedback()
#endif//ULTRA_LCD_IMPLEMENTATION_DOGM_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment