Prevent lua error when running paper.init() multiple times

This commit is contained in:
arne 2025-10-05 12:20:09 +02:00
commit 14727e0124

View file

@ -9,6 +9,9 @@ EpdiyHighlevelState hl;
uint8_t* fb;
static int init (lua_State *L) {
// prevent repeated initialization
if (fb != NULL) return 0;
epd_init(&epd_board_lilygo_t5_47, &ED047TC1, EPD_LUT_64K);
// epd_set_vcom(1560);
hl = epd_hl_init(WAVEFORM);