-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
BattAnalog widget shows 1% when battery is fully charged #166
Comments
Battery is 2S LI-Ion and the total voltage is like 8.41. I tried to enlarge the range but this didn't work because the cellCount is wrong. That's why I came up with this working solution:
|
isn't li-ion charge to 4.1v? |
No always... some li-ion are 4.1, some are 4.2. |
So i need to enlarge the voltage level of separation |
I updated the rates of the li-ion ranges and update me here. |
@LoooooKe - reminder |
The BattAnalog widget shows 1% when the battery is fully charged. I narrowed it down to the following line:
edgetx-sdcard/sdcard/c480x272/WIDGETS/BattAnalog/main.lua
Line 257 in b236171
If the voltage is equal or even .01 above the value in voltageRange, the method returns the wrong cell count, which then leads to a wrong calculation of the cellPercentage value here:
edgetx-sdcard/sdcard/c480x272/WIDGETS/BattAnalog/main.lua
Line 326 in b236171
My suggestion is to round singleVoltage to one decimal and change the '<' to a '<='. This should fix the issue for all battery types.
The text was updated successfully, but these errors were encountered: