ponewheel / android-ponewheel

pOneWheel Android app
MIT License
72 stars 25 forks source link

Frequent disconnects without reconnect #112

Open biell opened 4 years ago

biell commented 4 years ago

I feel like the app is disconnecting a lot (or more importantly not reconnecting properly). This might have been my fault, changing from using the sharedPreference. I will look through the changes and see if I can get the reconnects working better. Any ideas are welcomed.

tekkies commented 4 years ago

I've been playing with an FSM implementation of bluetooth, just for fun on this branch.

I figured I could better understand it if I could see it. There's an animated screenshot on the branch readme.

biell commented 4 years ago

just for fun

Just for fun, or for serious? It looks like you replaced every spot I added debugging code to better see what was going on. Your code also looks pretty good to me. If you are serious about getting this working, I can install and test it out on my OW+, then help you work through it.

This code probably needed to be revisited anyway. If you are serious, what is your status on how mature the code is right now?

tekkies commented 4 years ago

@biell The code is still unfinished and I'm plugging away at it a few hours a week - it has a lot of extras at the moment (like text-to-speech announce comms state). It connects to a pint OK but no-longer holds the connection for very long (it was staying connected for 20 minutes in ideal conditions). I need to check if it should still work with the OW+ - I didn't intentionally break it, but I want to check the flow. I'll get back to you.

tekkies commented 4 years ago

p.s. The battery cell is hard-coded to pint - it has a good chance of crash.

biell commented 4 years ago

OK, in that case I will let you keep working on your new features and I will see about patching the current code base to reconnect better.

tekkies commented 4 years ago

@biell sounds good. Looks like I've not migrated the OW+ code yet.