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
AP_BattMonitor: move read_block up to SMBus base class #20692
Conversation
Nice catch, and saves memory:
|
I've looked at this before, but I didn't have all the required battery types to do the required testing. If we can get the testing done, I'd be much happier with only one implementation of read block! The main ones that need to be tested to bring this in:
Bonus points if someone tests:
|
So this is part of my split off as many small items from my much larger smbus PR as I can. @amilcarlucas could you test the rotoye one? (It may be a bit before it I get mine from Rotoye.) @rmackay9 I think you have a maxell battery could you test? I have a Tattu Smart Battery Plus , without the 2.0 bit and a curious mini USB port??? I'm not sure who has a solo on the team? |
I'm not sure about the original. I know some of the Smart Plus 2.0 had SMBus that I had tested as working with what used to be the maxell (now the generic) driver. The only thing that was off that I found was the temperature was C instead of kelvin, but that's a fairly low pain problem. |
@hendjoshsr71, my Maxell SMBus battery is completely dead I'm afraid (doesn't work with master either) but hopefully we can find someone else in Japan who can test. |
Should this be rebased on master? It looks to me like it's really old.. |
7aa88f6
to
d4f720f
Compare
Rebased. Fortunately, the only PRs of substance in this area have been my own. |
d4f720f
to
489f917
Compare
489f917
to
cb5d998
Compare
@hendjoshsr71 I tested this with Maxell battery. |
Thank you @tatsuy! |
This moves the read-block function to the base class.
It isn't a complete copy/paste since the three places each have their own implementations.
Tested with a SUI3 battery