Files
Calendink/Provider/main/device.hpp
Patedam ebb0ccecf4 Moved to lvgl 9.4 because 9.5 has removed runtime xml support.
Made basic example of editing xml layout from backend.
2026-03-15 14:47:32 -04:00

24 lines
666 B
C++

#pragma once
#include <cstring>
#include "types.hpp"
constexpr int MAX_DEVICES = 8;
constexpr int DEVICE_XML_MAX = 2048;
constexpr char kDefaultLayoutXml[] =
"<lv_obj width=\"800\" height=\"480\" flex_flow=\"column\" flex_main_place=\"center\" flex_cross_place=\"center\" style_pad_row=\"10\">\n"
" <lv_label text=\"Hello World\" />\n"
" <lv_label bind_text=\"device_mac\" />\n"
"</lv_obj>";
struct device_t
{
char mac[18]; // "AA:BB:CC:DD:EE:FF\0"
bool active; // Slot in use
char xml_layout[DEVICE_XML_MAX]; // LVGL XML string for the current screen
};
internal device_t g_Devices[MAX_DEVICES] = {};