Fix unused BG_COLOR warning and make show_splash() private

Move BG_COLOR inline into #ifndef block to avoid unused variable
when HAS_SPLASH_IMAGE is defined. Make show_splash() private since
it's only called internally from init_hardware_only().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
torlando-tech
2026-03-04 17:48:38 -05:00
co-authored by Claude Opus 4.6
parent 5b2a1ab53e
commit bae59ff424
2 changed files with 5 additions and 15 deletions
+3 -8
View File
@@ -174,14 +174,9 @@ void Display::set_power(bool on) {
}
void Display::show_splash() {
// Background color: #1D1A1E -> RGB565 0x18C3
static const uint16_t BG_COLOR = 0x18C3;
#ifdef HAS_SPLASH_IMAGE
// Full-screen splash has background baked in — skip redundant fill
#else
// No splash image — fill with background color
fill_screen(BG_COLOR);
#ifndef HAS_SPLASH_IMAGE
// No splash image — fill with background color (#1D1A1E -> RGB565 0x18C3)
fill_screen(0x18C3);
#endif
#ifdef HAS_SPLASH_IMAGE
+2 -7
View File
@@ -68,13 +68,6 @@ public:
*/
static void draw_rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
/**
* Show boot splash image (centered Pyxis logo)
* Called during init_registers() before backlight turns on.
* Falls back to black screen if SplashImage.h not generated.
*/
static void show_splash();
/**
* LVGL flush callback - called by LVGL to update display
* Do not call directly - used internally by LVGL
@@ -82,6 +75,8 @@ public:
static void lvgl_flush_cb(lv_disp_drv_t* drv, const lv_area_t* area, lv_color_t* color_p);
private:
// Show boot splash image, called from init_hardware_only()
static void show_splash();
// SPI commands for ST7789V
enum Command : uint8_t {
NOP = 0x00,