-
-
Notifications
You must be signed in to change notification settings - Fork 243
Performance improvements through less SD usage (mostly pwnagotchi.png and logging) #356
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
Open
Sniffleupagus
wants to merge
36
commits into
jayofelony:noai
Choose a base branch
from
Sniffleupagus:no-png-file
base: noai
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e. much better performance
…old 'false' behavior
…element xy. commented out possibly unneeded alpha check
…le image. scale without aliasing. center image in bounding box. Do not reload the same image over and over
Contributor
Author
|
I've added more stuff since submitting. Changed faces mod stuff to scale images (like neon's PR), but also scales to fit a defined box on screen maintaining aspect ratio, centering image in box. |
Add _display pointing at self to be compatible with plugins that look at _display
…rent behavior of updating the image everyt ime
Contributor
Author
|
Bloated. I'm splitting it out into separate PRs. :) |
…kworm into no-png-file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stops saving the UI to a file every update, and serves it from memory instead. Improves update performance.
Also adds syslog logging (journalctl -fu pwnagotchi) and disabling log files by setting config.toml values to "".
Faces mod improvements to image sizing and scaling. Slight performance increase on updates when face has not changed.
Description
view.py copies the _canvas to _web_canvas after doing all of the drawing. web/handler.py has been changed to pull the _web_canvas image and serve it up through memory stream instead of saving as a file.
Motivation and Context
Solves wear and tear on SD and unnecessary SD usage. Improves cpu "wait" times.
Fixes an issue where large dummy displays spend a lot of time saving the pwnagotchi.png and occupying the filesystem.
How Has This Been Tested?
Tested on noai branch of jayofelony (forked into no-png-file branch), and on banangotchi
Tested using an existing 2.9.5-3 pwnagotchi, editing the files in place. Then cloned a fresh copy of the repo and made a branch, ,testing against the cloned repo.
It does not affect other code, unless something outside pwnagotchi code depends on that image.
Types of changes
Checklist:
git commit -s