Open
Description
Hi!
I have connected a 2s battery to the carrier.
I discovered that:
- using
(float)battery.getRaw() / 77
I obtain 7.41V (float)battery.getConverted()
gives 7.00V(float)battery.getFiltered()
gives 7.00V
Using an external voltmeter, measure is 7.41V
Why getConverted
method doesn't return 7.41V?
Thank you in advance!
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
per1234 commentedon Nov 6, 2022
Thanks for your report @gbr1. The reason is that the developers used an integer type in the library source code. Clearly that is not an appropriate API design for these functions.
Fortunately it is only a convenience function and the user is still able to calculate a usable battery voltage value in their own code as you did.