Show loading bootsplash with firmware name and version (#18)

Bootsplash is displayed before EEPROM erase, which is a slow operation.

Reviewed-on: https://git.pinkduck.xyz/awonak/libGravity/pulls/18
This commit is contained in:
2025-07-22 05:16:32 +00:00
parent b0accdc83a
commit c5bddef66d
4 changed files with 28 additions and 5 deletions

View File

@ -469,4 +469,21 @@ void UpdateDisplay() {
} while (gravity.display.nextPage());
}
void Bootsplash() {
gravity.display.firstPage();
do {
int textWidth;
gravity.display.setFont(TEXT_FONT);
textWidth = gravity.display.getStrWidth(SKETCH_NAME);
gravity.display.drawStr(24 + (textWidth / 2), 24, SKETCH_NAME);
textWidth = gravity.display.getStrWidth(SEMANTIC_VERSION);
gravity.display.drawStr(24 + (textWidth / 2), 36, SEMANTIC_VERSION);
textWidth = gravity.display.getStrWidth("LOADING....");
gravity.display.drawStr(34 + (textWidth / 2), 48, "LOADING....");
} while (gravity.display.nextPage());
}
#endif // DISPLAY_H