evilsocket / evilsocket/pwnagotchi
Config to prevent excessive redrawing
- Dominant language
- Python
- Stars
- 9.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Some users have described excessive updates of the ePaper screen, even with fps set to 0.0. Partial updates are less intrusive but on full refresh displays it can cause a *lot* of blinking. Either way, it affects the lifespan of the ePaper display. With more plugins come more updates to 'status' or custom controls.
**Describe the solution you'd like**
A way of limiting the display changes to an ePaper display: "only update every x seconds, but only if changes have occurred"
**Setup: Config says "only update once every 10 seconds, max"**
The update refers to a significant update that would cause the screen to change (by default anything except uptime and name)
**Scenario: an update occurs multiple times within the 10 second period**
* An update occurs, updates the display.
* Another update occurs, but within the 10 second timeframe. No redraw of the display occurs.
* Yet another update occurs, but within the 10 second timeframe. No redraw of the display occurs.
* The 10 second timeframe is hit: View.py knows that updates have occurred - updates the display.
**Scenario: Updates *outside* the 10 second period**
* An update occurs, causing a redraw
* 11 seconds later there is an update - the device immediately redraws the screen and the 10 second window begins again.
**Scenario: The setting is set to 0 or is missing:**
* The device behaves as it currently does based on the fps setting, allowing backward compatibility with older configs
There is a side issue here - we **don't** want the web UI to be restricted to this - the PNG should be updated based on the fps setting. Therefore I'd see the config for this setting going in the ui.display area of the config.
**Describe alternatives you've considered**
I've not found a way to prevent this without affecting the web ui too, or the refresh happens every x seconds regardless of updates (ie setting fps>0.0)
Contributor guide
Research direction
Start by reading View.py and the ui.display configuration handling. Trace how display updates are triggered separately from PNG generation for the web UI, then determine where a configurable minimum interval and pending-change state would fit. Done means the device limits significant ePaper redraws, preserves the existing fps behavior when the setting is absent or zero, and leaves web PNG updates unrestricted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100