betaflight-configurator
betaflight-configurator copied to clipboard
Fix auto_profile_cell_count range
Fixes: #2992
Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!
AUTOMERGE: (FAIL)
- github identifies PR as mergeable -> FAIL
- assigned to a milestone -> PASS
- cooling off period lapsed -> PASS
- commit count less or equal to three -> PASS
-
Don't merge
label NOT found -> PASS - at least one
RN:
label found -> PASS -
Tested
label found -> PASS - assigned to an approver -> PASS
- approver count at least three -> FAIL
Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!
Updated with suggestion from @McGiverGim
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!
@McGiverGim Great addition, didn't even think so far. Perfect clarity now 👍❤️. Is it backwards compatible also, e.g. when users had set the switch to - 1 for 'default for all other cases where battery S is not covered by a distinct profile'? This would be of great value...
@RipperDrone in GUI -1
was not selectable before this change.
@haslinghuis Maybe - I even remember I DID set it up in BFC (though I might be wrong). Anyway, it was a well documented CLI setting which then DID show up in the GUI - and which I have now preset on my 50+ quads... PITA to change 'em all :-(. Why not just keep the numbering scheme of designators whilest displaying a more descriptive text in BFC which definitely is a good thing to do?
You don't understand how this works. The description has nothing to do with the internal value. Check nightly and you will see
You don't understand how this works. The description has nothing to do with the internal value. Check nightly and you will see
sry, I'm not an experienced coder to be fully able to interpret the code. However, looking at your assignments in the code snippet below, I'm assuming there is a NEW meaning of -1 as a value now (?), therefore my interpretation was that the code now is NOT backwards compatible anymore to quads that have had a '-1' setting stored in their diffs (= fallback profile to be used in case there was no distinct matching cell count found in any other profile).
Can you pls confirm whether backwards compatibility to previous CLI values/enum is preserved or broken?
This PR only fixes the bug that -1 value in UI was not selectable and added a switch and meaningful labels for the available range. Cli is using it's own interface to communicate with firmware and has not been changed.
Thank you for explaining 👍😍. I must have been misreading the code assuming the -1 setting got a new meaning...