Skip to content

Commit

Permalink
added version and boot animation
Browse files Browse the repository at this point in the history
  • Loading branch information
pr3y committed May 31, 2024
1 parent 65ed668 commit cfa23c3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ default_envs =

[common]
build_flags =
-DBRUCE_VERSION='"2.0b"'
-DBRUCE_VERSION='"1.0b"'
-DMAXFILES=256
-DEEPROMSIZE=64
-DLH=8
Expand Down
26 changes: 26 additions & 0 deletions src/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ void drawCfg(int x, int y);



#define bruce_small_width 60
#define bruce_small_height 34
PROGMEM const unsigned char bruce_small_bits[] = {
0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x7F, 0x0F,
0xFE, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x7F, 0x6A, 0xF0, 0xFF, 0xFF, 0x0F,
0xFF, 0xFF, 0x3F, 0xD6, 0x27, 0xFF, 0xFF, 0x0F, 0x9F, 0xFF, 0x1F, 0x76,
0xFD, 0xFE, 0xFF, 0x0F, 0xFF, 0xFF, 0x0F, 0xED, 0x5F, 0xFB, 0xFF, 0x0F,
0xFF, 0xFC, 0x83, 0x5D, 0xEA, 0xF5, 0xFF, 0x0F, 0x7F, 0xF7, 0xF3, 0xFB,
0xEF, 0xFF, 0xFF, 0x0F, 0xFF, 0xDF, 0x59, 0xFD, 0xFE, 0xDF, 0xFF, 0x0F,
0xFF, 0x7F, 0xF8, 0x6F, 0x7B, 0xF7, 0xFF, 0x0F, 0xFF, 0x7F, 0xD4, 0xFF,
0xFD, 0xAE, 0xFF, 0x0F, 0xFF, 0x3F, 0xF7, 0xFF, 0xEF, 0xFF, 0xFF, 0x0F,
0xFF, 0xBF, 0xF8, 0x7F, 0xF7, 0x3F, 0xFF, 0x0F, 0xFF, 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src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,21 @@ void setup() {
//Start Bootscreen timer
int i = millis();
bool change=false;
tft.drawXBitmap(1,1,bits, bits_width, bits_height,TFT_BLACK,TFT_WHITE);
tft.setTextSize(FM);
tft.println("Bruce");
tft.setTextSize(FP);
tft.println(String(BRUCE_VERSION));
tft.setTextSize(FM);

if(!LittleFS.begin(true)) { LittleFS.format(), LittleFS.begin();}

while(millis()<i+7000) { // boot image lasts for 5 secs
if((millis()-i>2000) && (millis()-i)<2200) tft.fillScreen(TFT_BLACK);
if((millis()-i>2200) && (millis()-i)<2700) tft.drawXBitmap(1,1,bits, bits_width, bits_height,TFT_BLACK,TFT_PURPLE+0x3000);
if((millis()-i>2200) && (millis()-i)<2700) tft.drawRect(160,50,2,2,TFT_PURPLE+0x3000);
if((millis()-i>2700) && (millis()-i)<2900) tft.fillScreen(TFT_BLACK);
if((millis()-i>2900) && (millis()-i)<3400 && !change) { tft.drawXBitmap(1,1,bits, bits_width, bits_height,TFT_BLACK,TFT_PURPLE); }
if((millis()-i>2900) && (millis()-i)<3400 && !change) { tft.drawXBitmap(130,45,bruce_small_bits, bruce_small_width, bruce_small_height,TFT_BLACK,TFT_PURPLE+0x3000); }
if((millis()-i>3400) && (millis()-i)<3600) tft.fillScreen(TFT_BLACK);
if((millis()-i>3600)) tft.drawXBitmap(1,1,bits, bits_width, bits_height,TFT_BLACK,TFT_RED);
if((millis()-i>3600)) tft.drawXBitmap(1,1,bits, bits_width, bits_height,TFT_BLACK,TFT_PURPLE+0x3000);

#if defined (CARDPUTER) // If any key is pressed, it'll jump the boot screen
Keyboard.update();
Expand Down

0 comments on commit cfa23c3

Please sign in to comment.