mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-08-22 10:40:02 +00:00
Initial release: Ratdeck v1.0.0
Reticulum transport node + LXMF encrypted messenger for LilyGo T-Deck Plus. ESP32-S3, 16MB flash, SX1262 LoRa, LovyanGFX display, NimBLE BLE.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include "Display.h"
|
||||
|
||||
bool Display::begin() {
|
||||
_gfx.init();
|
||||
_gfx.setRotation(1); // Landscape: 320x240
|
||||
_gfx.setBrightness(128);
|
||||
_gfx.fillScreen(TFT_BLACK);
|
||||
|
||||
Serial.printf("[DISPLAY] Initialized: %dx%d (rotation=1, LovyanGFX direct)\n",
|
||||
_gfx.width(), _gfx.height());
|
||||
|
||||
// Quick visual test: draw colored rectangles directly
|
||||
_gfx.fillRect(0, 0, 107, 120, TFT_RED);
|
||||
_gfx.fillRect(107, 0, 107, 120, TFT_GREEN);
|
||||
_gfx.fillRect(214, 0, 106, 120, TFT_BLUE);
|
||||
_gfx.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
_gfx.setTextSize(2);
|
||||
_gfx.setCursor(60, 140);
|
||||
_gfx.print("RATDECK DISPLAY TEST");
|
||||
delay(1500);
|
||||
_gfx.fillScreen(TFT_BLACK);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Display::setBrightness(uint8_t level) {
|
||||
_gfx.setBrightness(level);
|
||||
}
|
||||
|
||||
void Display::sleep() {
|
||||
_gfx.sleep();
|
||||
}
|
||||
|
||||
void Display::wakeup() {
|
||||
_gfx.wakeup();
|
||||
}
|
||||
Reference in New Issue
Block a user