From cfa23c3e1c39a2e2d3ef390a4d46969112102222 Mon Sep 17 00:00:00 2001 From: pr3y Date: Fri, 31 May 2024 15:11:05 -0300 Subject: [PATCH] added version and boot animation --- platformio.ini | 2 +- src/display.h | 26 ++++++++++++++++++++++++++ src/main.cpp | 12 ++++++++---- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index a267cfe18..d2fecd74c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,7 +17,7 @@ default_envs = [common] build_flags = - -DBRUCE_VERSION='"2.0b"' + -DBRUCE_VERSION='"1.0b"' -DMAXFILES=256 -DEEPROMSIZE=64 -DLH=8 diff --git a/src/display.h b/src/display.h index cc160e403..81a1a0605 100644 --- a/src/display.h +++ b/src/display.h @@ -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, 0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FF, 0xFF, 0x0F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, }; #define bits_width 237 diff --git a/src/main.cpp b/src/main.cpp index 9b50ec08a..562ffa2a6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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()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();