Improve accuracy when stopping charging#241
Merged
actuallymentor merged 3 commits intoactuallymentor:mainfrom Jun 28, 2024
thdrmrphy:accuracy-fix
Merged
Improve accuracy when stopping charging#241actuallymentor merged 3 commits intoactuallymentor:mainfrom thdrmrphy:accuracy-fix
actuallymentor merged 3 commits intoactuallymentor:mainfrom
thdrmrphy:accuracy-fix
Conversation
Owner
|
Ah I like that approach to improving the accuracy. Have you tested this in the wild? |
Contributor
Author
|
I've not tested this yet in the wild. I thought I had, but there were some major errors in the code. When I went to fix them, I found some really bad bugs with the rest of the code that would put the computer into an eternal, inescapable loop where charging could not be enabled. Long story short, hopefully I'll be submitting another PR soon to fix that, before I can work on this. |
Merged
Contributor
Author
|
Most of this is in #253 now, so I've made this PR a draft and I'm happy to close it down the line if it's not needed. |
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
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.
I've noticed that because the script only runs every 60 seconds, and my computer usually does more than
a 1% increase in that time, I'll often end up 1-2% over the limit.
To fix this, this PR sleeps the script for 20 instead of 60 within 3% of the target.