-
Notifications
You must be signed in to change notification settings - Fork 10
/
startup_screens.cpp
60 lines (48 loc) · 2.01 KB
/
startup_screens.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "startup_screens.h"
/// @ingroup display
/// @{
/// @brief Draws the about screen.
void about_screen() {
u8g2.clearBuffer();
u8g2.setFontMode(1);
u8g2.setFont(u8g2_font_elispe_tr);
u8g2.drawStr(64 - (u8g2.getStrWidth("Digi-Gurdy") / 2), 14, "Digi-Gurdy");
// Print a pretty 3-stripe line "around" the title
u8g2.drawHLine(0, 3, 62 - (u8g2.getStrWidth("Digi-Gurdy") / 2));
u8g2.drawHLine(0, 4, 62 - (u8g2.getStrWidth("Digi-Gurdy") / 2));
u8g2.drawHLine(0, 7, 62 - (u8g2.getStrWidth("Digi-Gurdy") / 2));
u8g2.drawHLine(0, 8, 62 - (u8g2.getStrWidth("Digi-Gurdy") / 2));
u8g2.drawHLine(0, 11, 62 - (u8g2.getStrWidth("Digi-Gurdy") / 2));
u8g2.drawHLine(0, 12, 62 - (u8g2.getStrWidth("Digi-Gurdy") / 2));
u8g2.drawHLine(66 + (u8g2.getStrWidth("Digi-Gurdy") / 2), 3, 64);
u8g2.drawHLine(66 + (u8g2.getStrWidth("Digi-Gurdy") / 2), 4, 64);
u8g2.drawHLine(66 + (u8g2.getStrWidth("Digi-Gurdy") / 2), 7, 64);
u8g2.drawHLine(66 + (u8g2.getStrWidth("Digi-Gurdy") / 2), 8, 64);
u8g2.drawHLine(66 + (u8g2.getStrWidth("Digi-Gurdy") / 2), 11, 64);
u8g2.drawHLine(66 + (u8g2.getStrWidth("Digi-Gurdy") / 2), 12, 64);
u8g2.setFont(u8g2_font_finderskeepers_tf);
u8g2.drawStr(64 - (u8g2.getStrWidth("Hardware by John Dingley") / 2), 28, "Hardware by John Dingley");
u8g2.drawStr(64 - (u8g2.getStrWidth("Software by Basil Lalli") / 2), 37, "Software by Basil Lalli");
u8g2.drawStr(64 - (u8g2.getStrWidth(REL_DATE.c_str()) / 2), 46, REL_DATE.c_str());
u8g2.drawStr(64 - (u8g2.getStrWidth("https://digigurdy.com") / 2), 55, "https://digigurdy.com");
u8g2.drawStr(64 - (u8g2.getStrWidth(EXTRA_LINE.c_str()) / 2), 64, EXTRA_LINE.c_str());
u8g2.sendBuffer();
};
/// @brief Draws the startup animation sequence.
void startup_screen_sequence() {
for (int x = 0; x < 11; x++) {
// Clear the buffer.
draw_xbm(logos[x]);
if (x == 0) {
delay(140);
} else if (x > 9) {
delay(750);
} else {
delay(140);
};
};
// Display the about screen
about_screen();
delay(2000);
};
/// @}