ponewheel / android-ponewheel

pOneWheel Android app
MIT License
72 stars 25 forks source link

Crashes all the time #91

Closed biell closed 5 years ago

biell commented 5 years ago

I am updating the app per Issue #76 to have some options for Two-X and possibly other battery modders. It is difficult to use and test ponewheel with it crashing all the time. I think I have identified a very close formula to translate voltage to battery remaining:

100/(1+4^(51.2-volts))

and I have coded it into a fork, but I am having trouble testing this formula because ponewheel keeps crashing, so I can't get a full ride log file. Once I can generate some accurate tests I plan to open a merge request.

Does ponewheel crash all the time for anyone else? I have a Galaxy J3 running Android 8.1.0. Is this a known issue at this point, or is it that ponewheel is stable for everyone but me?

kwatkins commented 5 years ago

@biell yeah, it does. tbh I've been using the official app since it added more features, although I do miss this app a bit. The crashes came with the Gemini update and likely can be fixed w/ the suggestions from https://github.com/ponewheel/android-ponewheel/issues/86#issuecomment-460033659 I'll start using the app again, we should be able to get a stable version rolling. As soon as we do I'll update the app on the Google Play.

kwatkins commented 5 years ago

@biell give the master branch a go with these fixes.

biell commented 5 years ago

Sorry it took so long to get back, I originally built against the wrong commit and wasted a day.

I went on a 13 mile ride today (thank you Two-X) and the app only disconnected once and did not crash. The disconnect was somewhere around mile 11. I know it was disconnected from the board because I had to swipe my passcode to unlock the phone. I pressed the "X" icon, then scanned again, and it reconnected right away. Then, it was solid until the end of my ride. I did this test with the Battery monitor set to my "Fully Charged Two-X" mode, so both things were being tested.

I also rode to work, home for lunch, back to work, then home again today without issue. It is about a mile from my house to work.

So, your changes so far seem to have got the most important issues. My disconnect could have been random. I probably won't get a chance for another long ride test until Thursday.

One thing I did notice is that I wanted to log the ride, and it didn't log. Did you disable ride logging also? I for sure gave powheel access to Storage, but if there is a google subsystem which also needs storage access, it is possible I removed storage permissions from that.

Also, let me know when you run out of steam, I want to update my battery code to also look at RPMs and Amp draw when computing battery remaining. I don't want to be changing things at the same time as you though, so the pull request merges automatically.

kwatkins commented 5 years ago

The disconnect likely came from the bluetooth and everything f'in else being connected to the lifecycle of MainActivity. This app needs a serious overhaul and do whatever the latest Google way of how they tell us to keep keep shit running. At least it's solid enough to get the data you need, and pass more or less the threshold to put on the app market.

Ride logging likely hasn't worked for awhile now. It's something I planned to look at since it's more or less the reason this app exists :) - I'll look at that next. If anyone can fix the vibration notifications I'd be really appreciative, it was the source of the crashing and I'm not sure why, until that is figured out it is more or less disabled.

I would say go ahead and updated your battery code. I'll be looking at the logging code and it's a separate component, we won't be overlapping.

kwatkins commented 5 years ago

@biell merged to master and also merged fix to the logging issue, was a runtime permission check to write to storage we needed to add (likely broke ever since we updated the target sdk)

biell commented 5 years ago

Thanks, logging is working again, that should help me gather the data to tweak things faster.

kwatkins commented 5 years ago

It looks like on the latest release exporting the logs is broken. It likely still is logging the CSV, just crashing when trying to open the activity and/or share the logs. And obscure error is obscure, deep in the bad choice decision by me at the time to use databinding for the UI and observables... and might be a result of updating the target SDK. That being said, going to close this ticket and create a new one, I think most of the issues around this one are fixed.