-
Notifications
You must be signed in to change notification settings - Fork 372
Fix granularity of FW level trim #2421
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
Conversation
PR Compliance Guide 🔍(Compliance updated until commit c79c943)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit c79c943
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
I noticed that the iNav OSD display for fw_level_pitch_trim currently only displays 1 decimal point. Will this fix also pass onto the OSD display automatically? |
|
No, Configurator is completely separate to the firmware. When it was implemented. I guess 1/10th of a degree was considered fine enough adjustment. I'd tend to agree. Perhaps configurator should be changed to 0.1 degree steps to match. |
User description
Fixes #2420
I have found a bug that stopped FW level trim being shown as a float, even if set to a float. It would have affected any units that didn't require a conversion.
I did look at adding a slider. But there was an issue with it having a number with decimal places. It would show them when you used the slider. But not when you entered the page. I will take a look at some point. But, to be honest, it's getting late and this fixed the decimal places issue raised.
With regard to the original issue
PR Type
Bug fix
Description
Fix FW level trim displaying as integer instead of float
Add explicit decimal step attribute to trim input field
Ensure decimal places preserved when no unit conversion applied
Standardize numeric literals to float format in conversion tables
Diagram Walkthrough
File Walkthrough
settings.js
Decimal handling and unit conversion table standardizationjs/settings.js
countDecimals(step)data("step")overattr('step')unitRatioTableto float format (e.g.,100to100.0)degtodecimalsincountDecimalsfunctionfor clarity
pid_tuning.html
Add number type and decimal step to trim inputtabs/pid_tuning.html
type="number"attribute to FW level trim input elementdata-step="0.001"attribute to enforce 3 decimal placegranularity
precision