-
-
Notifications
You must be signed in to change notification settings - Fork 921
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
Refactor dMin to dMax #4173
Refactor dMin to dMax #4173
Conversation
✅ Deploy Preview for origin-betaflight-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Maybe make the 'D' in 'Derivative' label bold, also? |
Also, in image above, |
Backwards compatibility |
I'm not sure I've made the best implementation. |
src/js/TuningSliders.js
Outdated
const WARNING_DMIN_GAIN = 42; | ||
const enableWarning = FC.PIDS[0][0] > WARNING_P_GAIN || FC.PIDS[0][1] > WARNING_I_GAIN || FC.PIDS[0][2] > WARNING_DMAX_GAIN || FC.ADVANCED_TUNING.dMinRoll > WARNING_DMIN_GAIN; | ||
const WARNING_D_GAIN = 42; | ||
const enableWarning = FC.PIDS[0][0] > WARNING_P_GAIN || FC.PIDS[0][1] > WARNING_I_GAIN || FC.PIDS[0][2] > WARNING_D_GAIN || FC.ADVANCED_TUNING.dMaxRoll > WARNING_D_MAX_GAIN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps (need to import semver)
const enableWarning = FC.PIDS[0][0] > WARNING_P_GAIN || FC.PIDS[0][1] > WARNING_I_GAIN || FC.PIDS[0][2] > WARNING_D_GAIN || FC.ADVANCED_TUNING.dMaxRoll > WARNING_D_MAX_GAIN; | |
const enableWarning = semver.lt(FC.CONFIG.apiVersion, '1.47.0') | |
? FC.PIDS[0][0] > WARNING_P_GAIN || FC.PIDS[0][1] > WARNING_I_GAIN || FC.PIDS[0][2] > WARNING_D_MAX_GAIN || FC.ADVANCED_TUNING.dMaxRoll > WARNING_D_GAIN | |
: FC.PIDS[0][0] > WARNING_P_GAIN || FC.PIDS[0][1] > WARNING_I_GAIN || FC.PIDS[0][2] > WARNING_D_GAIN || FC.ADVANCED_TUNING.dMaxRoll > WARNING_D_MAX_GAIN; |
Quality Gate passedIssues Measures |
nice to know) |
Last edition 2672:
Previous edition 2572 line 1861 should probably be removed - BUT seems currently in use:
|
PR with Master: EDIT: resolved in betaflight/betaflight@2bb6cef |
No, I'm trying to keep the old behaviour. I've updated the calculation formula in the firmware. |
* rename vars * swap labels for older versions * change locales * fix slider warnings for older versions
* rename vars * swap labels for older versions * change locales * fix slider warnings for older versions
Configurator part for betaflight/betaflight#13908