atomic14 / diy-esp32-epub-reader

An ESP32 e-reader
MIT License
340 stars 47 forks source link

Boards refactor #61

Closed cgreening closed 2 years ago

cgreening commented 2 years ago

Big clean up of the way we define boards - feels a lot cleaner - each board has a specific class that can override and define the behaviour.

It should make adding new boards more straightforward and makes the main.cpp a lot easier to read.

martinberlin commented 2 years ago

Awesome refactoring! Tests so far:

@cgreening I checked around and do not seem to find what changed. But found out that commenting the delay it performs already better like last version

void touchTask(void *param)
{
  L58TouchControls *controls = (L58TouchControls *)param;
  for (;;)
  {
    controls->ts->loop();
    //vTaskDelay(1);
  }
}

Maybe it's not wise to make a delay like this? I do not see any watchdog alert anyways. Other than that it works amazingly good and I would say that this is tested and ready to be merged.

There is an ugly SPIFFs reset loop sometimes in both environments that only can be redeemed with a hard reset:

I (923) main: Controls configured
I (933) EPD: Full clear
E (2513) ZIP: mz_zip_reader_init_file() failed!

E (2513) ZIP: Error file open failed

E (2513) EPUB: Could not find META-INF/container.xml
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

It would be great if we could catch this and at least generate the reset automatic from our side.