Update liloled
This commit is contained in:
parent
7012d53d86
commit
602ca19c3b
17
liloled
17
liloled
|
|
@ -176,26 +176,27 @@ display:
|
|||
}
|
||||
|
||||
// Display media title
|
||||
if (media_title.length() > 16) {
|
||||
it.print(0, 0, id(font2), media_title.substr(0, 16).c_str());
|
||||
it.print(0, 20, id(font2), media_title.substr(16).c_str());
|
||||
if (media_title.length() > 24) {
|
||||
it.print(0, 0, id(font3), media_title.substr(0, 16).c_str());
|
||||
it.print(0, 10, id(font3), media_title.substr(16).c_str()); // Reduced from 20 to 10
|
||||
} else {
|
||||
it.print(0, 0, id(font2), media_title.c_str());
|
||||
it.print(0, 0, id(font3), media_title.c_str());
|
||||
}
|
||||
|
||||
// Display media artist if it's not empty
|
||||
if (!media_artist.empty()) {
|
||||
if (media_artist.length() > 16) {
|
||||
it.print(0, 40, id(font2), media_artist.substr(0, 16).c_str());
|
||||
it.print(0, 60, id(font2), media_artist.substr(16).c_str());
|
||||
if (media_artist.length() > 24) {
|
||||
it.print(0, 20, id(font3), media_artist.substr(0, 16).c_str()); // Reduced from 40 to 20
|
||||
it.print(0, 30, id(font3), media_artist.substr(16).c_str()); // Reduced from 60 to 30
|
||||
} else {
|
||||
it.print(0, 40, id(font2), media_artist.c_str());
|
||||
it.print(0, 20, id(font3), media_artist.c_str()); // Reduced from 40 to 20
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# Define Font for OLED
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
|
|
|
|||
Loading…
Reference in New Issue