Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to not clean display on startup #5

Open
NicolaiPetri opened this issue Jan 29, 2023 · 2 comments
Open

Add option to not clean display on startup #5

NicolaiPetri opened this issue Jan 29, 2023 · 2 comments

Comments

@NicolaiPetri
Copy link

Hi,
It would be very nice to not erase display content on initialization. This would work great with ESPHome in deep sleep, then display would only be redrawn after wakeup, network initialization and data received from Home Assistant.
With current driver, it takes approx. 10 seconds with a blank screen before startup is completed and data is visible again.
Besides that everything works great - thanks for the good work.

@Torch1969
Copy link

Hello @tiaanv i have the same question. Any suggestions where to suppress this clearing of the display directly after wake up from deep sleep can be done?

@NicolaiPetri did you find a solution?

@juleskers
Copy link

juleskers commented Feb 21, 2025

I like the idea of keeping the previous state while waking up from deep-sleep, so I did some digging.
I'm fairly certain that this clean() + display() in the setup() section is the responsible.

static const char *const TAG = "t574";
void T547::setup() {
this->initialize_();
this->clean();
this->display();
}

What I am not sure about, is how one would read the config that early in setup(), where stuff like that usually isn't available yet.
Or can ESPHome (which I've only just discovered) 'hard-code' yaml-config into C-const during compile-time?

The laziest solution would be to just remove the this->clean(); this->display().
Worst case, whatever 'old' content/garbage is on-screen will survive a bit longer.

The critical idea is that an update() happens before the first display (probably in loop(), to populate the internal pixel-buffer.
Right now, setup() starts a fresh, empty buffer, and displays that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants