6062083b5e
- Upgraded LVGL from 8.4 to 9.5.0 (new display/input API) - Rewrote DisplayManager for LVGL 9 (lv_display_create, tick callback) - New lv_conf.h for v9.5 with optimized widget selection - Premium dark AMOLED UI with gradient panels, status dots, storage bar - Backend: Wi-Fi from SD JSON, NTP Vienna, SimpleFTPServer on SD_MMC - Removed 6 unused sensor libs, added ArduinoJson + SimpleFTPServer - Build: 19% RAM, 4.6% Flash — verified compilation success
44 lines
977 B
C++
44 lines
977 B
C++
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <Arduino_GFX_Library.h>
|
|
#include <lvgl.h>
|
|
#include <kodedot/pin_config.h>
|
|
#include <bb_captouch.h>
|
|
|
|
/**
|
|
* @brief High-level manager for display, LVGL 9 and touch on Kode Dot.
|
|
*/
|
|
class DisplayManager {
|
|
private:
|
|
Arduino_DataBus *bus;
|
|
Arduino_CO5300 *gfx;
|
|
BBCapTouch bbct;
|
|
|
|
// LVGL 9 handles
|
|
lv_display_t *lv_disp;
|
|
lv_indev_t *lv_touch;
|
|
uint8_t *buf1;
|
|
uint8_t *buf2;
|
|
|
|
// Static callbacks
|
|
static void disp_flush_cb(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map);
|
|
static void touch_read_cb(lv_indev_t *indev, lv_indev_data_t *data);
|
|
|
|
static DisplayManager *instance;
|
|
|
|
public:
|
|
DisplayManager();
|
|
~DisplayManager();
|
|
|
|
bool init();
|
|
void update();
|
|
void setBrightness(uint8_t brightness);
|
|
bool getTouchCoordinates(int16_t &x, int16_t &y);
|
|
|
|
Arduino_CO5300 *getGfx() { return gfx; }
|
|
BBCapTouch *getTouch() { return &bbct; }
|
|
};
|
|
|
|
|