refactor(Format code): Improve readability and structure
This commit is contained in:
@@ -151,7 +151,8 @@ void DisplayDriverGFX::render(const ScreenState& state) {
|
||||
return;
|
||||
|
||||
// Check if we need full redraw
|
||||
if(state.screen != _lastScreen || (state.screen == ScreenID::BOOT && state.bootStage != _lastBootStage)) {
|
||||
if(state.screen != _lastScreen
|
||||
|| (state.screen == ScreenID::BOOT && state.bootStage != _lastBootStage)) {
|
||||
_needsRedraw = true;
|
||||
_lastScreen = state.screen;
|
||||
_lastBootStage = state.bootStage;
|
||||
@@ -284,7 +285,7 @@ void DisplayDriverGFX::drawDashboard(const ScreenState& state) {
|
||||
// Tile label
|
||||
_gfx->setTextColor(0xFFFF);
|
||||
_gfx->setTextSize(2);
|
||||
_gfx->setCursor(x + w/2 - 10, y + h/2 - 10);
|
||||
_gfx->setCursor(x + w / 2 - 10, y + h / 2 - 10);
|
||||
_gfx->print(tileLabels[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ public:
|
||||
int width() override;
|
||||
int height() override;
|
||||
|
||||
// Dashboard tile mapping
|
||||
int dashboardTouch(int x, int y);
|
||||
|
||||
// ── Internal ──
|
||||
static DisplayDriverGFX& instance();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FQBN="esp32:esp32:waveshare_esp32_s3_touch_lcd_43:PSRAM=enabled,FlashSize=16M,USBMode=hwcdc,PartitionScheme=app3M_fat9M_16MB"
|
||||
PORT="/dev/ttyACM0"
|
||||
LIBS="--libraries ./vendor/esp32-s3-lcd-43/LovyanGFX"
|
||||
LIBS="--libraries ~/Arduino/libraries/LovyanGFX"
|
||||
OPTS="-DDEBUG_MODE -DBOARD_HAS_PSRAM -DLGFX_USE_V1"
|
||||
|
||||
Reference in New Issue
Block a user