-
Notifications
You must be signed in to change notification settings - Fork 370
Add TPA rate defaults to fixed-wing presets #2515
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
Add TPA rate defaults to fixed-wing presets #2515
Conversation
Set tpa_rate = 80 for airplane presets ("Airplane with a Tail" and
"Airplane without a Tail"). This addresses feedback from PR #11222
that fixed-wing aircraft benefit from higher TPA values.
Multicopter presets retain their existing tpa_rate = 20 setting.
PR Compliance Guide 🔍All compliance sections have been disabled in the configurations. |
| /* | ||
| * TPA | ||
| */ | ||
| { | ||
| key: "tpa_rate", | ||
| value: 80 | ||
| }, |
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.
Suggestion: To ensure proper PID attenuation, add the tpa_breakpoint setting with a value of 1600 alongside the newly added tpa_rate. [general, importance: 7]
| /* | |
| * TPA | |
| */ | |
| { | |
| key: "tpa_rate", | |
| value: 80 | |
| }, | |
| /* | |
| * TPA | |
| */ | |
| { | |
| key: "tpa_rate", | |
| value: 80 | |
| }, | |
| { | |
| key: "tpa_breakpoint", | |
| value: 1600 | |
| }, |
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.
Not correct Qodo. In fact 1450 is more suitable for the way fixedwing TPA + Pitch angle works.
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.
Question:
Not correct Qodo. In fact 1450 is more suitable for the way fixedwing TPA + Pitch angle works.
Answer:
This is mainly a domain/calibration issue: without strong repo-specific context, the model may “lock onto” a plausible default (e.g., 1600) even when your project’s fixedwing TPA + pitch-angle behavior prefers another breakpoint (e.g., 1450).
You can reduce these “hardcoded tuning value” suggestions by steering the /improve code-suggestions prompt to (a) avoid proposing specific numeric constants unless they already exist in the repo/config, and (b) explicitly prefer your project’s breakpoint value/range.
Add to your repo’s .pr_agent.toml (or wiki config) something like:
[pr_code_suggestions]
extra_instructions = """\
For flight-control / PID / TPA tuning changes:
- Do NOT propose specific numeric tuning constants (e.g., breakpoints like 1600) unless they already exist in this repo’s configuration or are explicitly stated in the PR description/commit message.
- If a breakpoint is needed alongside a new tpa_rate, prefer the project’s fixedwing behavior: use tpa_breakpoint=1450 (not 1600) unless the PR explicitly targets a different tuning profile.
- If uncertain, ask for confirmation rather than asserting a value.
"""If you want this to apply only when /improve runs automatically, you can also embed the same guidance directly in the auto command under your Git provider’s pr_commands.
Relevant Sources:
- https://qodo-merge-docs.qodo.ai//tools/improve#extra-instructions-and-best-practices
- https://qodo-merge-docs.qodo.ai//tools/improve#extra-instructions
- https://qodo-merge-docs.qodo.ai//faq/index#-note-"q:-i-received-an-incorrect-or-irrelevant-suggestion-why"
- https://qodo-merge-docs.qodo.ai//usage-guide/configuration_options#local-configuration-file
User description
Summary
Adds
tpa_rate = 80to the fixed-wing presets in the configurator defaults dialog, addressing feedback that airplanes benefit from higher TPA values than the firmware default.Changes
tpa_rate: 80to "Airplane with a Tail" presettpa_rate: 80to "Airplane without a Tail (Wing, Delta, etc)" presettpa_rate = 20settingContext
This addresses feedback from PR iNavFlight/inav#11222 which noted that fixed-wing aircraft work better with higher TPA values. The firmware default is 0, which is suboptimal for airplanes.
The value of 80 (out of 0-200 range for FW) provides a sensible default that users can fine-tune if needed.
Testing
tpa_rate = 80via CLItpa_rate = 20(multicopter preset unchanged)PR Type
Enhancement
Description
Add TPA rate defaults to fixed-wing aircraft presets
Set
tpa_rate = 80for both airplane preset configurationsImproves default tuning for fixed-wing aircraft performance
Diagram Walkthrough
File Walkthrough
defaults_dialog_entries.js
Add TPA rate defaults to airplane presetsjs/defaults_dialog_entries.js
tpa_rate: 80configuration to "Airplane with a Tail" presettpa_rate: 80configuration to "Airplane without a Tail (Wing,Delta, etc)" preset
tpa_rate = 20