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

Battery mods #92

Merged
merged 4 commits into from
Sep 11, 2019
Merged

Battery mods #92

merged 4 commits into from
Sep 11, 2019

Conversation

biell
Copy link
Collaborator

@biell biell commented Sep 7, 2019

Please accept this pull request to update ponewheel for user with battery modifications. I have tested against my Two-X, but it is possible a VNR modification might benefit from this, and I would be willing to make enhancements to support VNR if proposed.

This request should resolve Issue #76.

This change adds a new setting preference to allow you to choose from the following methods to report battery remaining:

  • Default - the default option, reports remaining they way pownewheel always has.
  • Voltage Output - Use the "Voltage" characteristic and follow its curve. This is the method proposed by Soren. I smooth it with a decaying average, but it still seems to fluctuate too much.
  • Cell Voltages - Uses the sum of the individual cells which is similar to the previous method but tends to be more stable, it also appears to be closer to accurate at more speeds. I also smooth this out with a decaying average.
  • Fully Charged Two-X - uses the default method until it reports the battery to be 3%, then switches to using the "Cell Voltages" method until 0. This only works if you start with a fully charged Two-X onewheel.

Please understand that I am not a Java programmer, this literally doubles the total number of lines of Java I have written in my entire life and I have also never worked on an Android app before either. So, please feel free to either merge and fix my code or let me know what needs to be fixed.

I wanted to start with a newer branch, but there was a missing crashlytics configuration file and I wasn't sure what to do about that. If you would prefer I update that branch, we can have a conversation about how to get crashlytics working. This is a pretty simple change, so it won't take long to apply by hand to a newer, non-master branch.

Thank you.

@kwatkins
Copy link
Collaborator

kwatkins commented Sep 8, 2019

Solid! I'll put it through some testing 👍

@kwatkins kwatkins merged commit bfe0e9a into ponewheel:master Sep 11, 2019
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

Successfully merging this pull request may close these issues.

2 participants