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

Fix battery slot charge flickering #2305

Merged
merged 1 commit into from
Dec 16, 2023
Merged

Conversation

serenibyss
Copy link
Member

Fixes machine battery slot jumping up and down between charging and discharging a battery when the machine is at half charge.

Previously it would charge the battery if the stored energy was above 50%, and discharge the battery if below 50%.

Now it will charge the battery if the stored energy is above 2/3rds full, and discharge the battery if below 1/3rd full. This gives a margin where no action will occur with the battery, preventing an oscillating state.

(Additionally, this is the logic GT5u uses for its battery slot)

@serenibyss serenibyss added the type: bug Something isn't working label Dec 16, 2023
@serenibyss serenibyss requested a review from a team as a code owner December 16, 2023 02:07
@serenibyss serenibyss merged commit 7112238 into master Dec 16, 2023
4 checks passed
@serenibyss serenibyss deleted the sb-fix-battery-slot-flicker branch December 16, 2023 02:15
serenibyss added a commit that referenced this pull request Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants