Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Jan 7, 2026

User description

Summary

Adds tpa_rate = 80 to the fixed-wing presets in the configurator defaults dialog, addressing feedback that airplanes benefit from higher TPA values than the firmware default.

Changes

  • Added tpa_rate: 80 to "Airplane with a Tail" preset
  • Added tpa_rate: 80 to "Airplane without a Tail (Wing, Delta, etc)" preset
  • Multicopter presets retain their existing tpa_rate = 20 setting

Context

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

  • Tested with SITL by applying "Airplane with a Tail" preset - verified tpa_rate = 80 via CLI
  • Tested with SITL by applying "Mini Quad with 5" propellers" preset - verified tpa_rate = 20 (multicopter preset unchanged)

PR Type

Enhancement


Description

  • Add TPA rate defaults to fixed-wing aircraft presets

  • Set tpa_rate = 80 for both airplane preset configurations

  • Improves default tuning for fixed-wing aircraft performance


Diagram Walkthrough

flowchart LR
  A["Fixed-wing Presets"] -->|Add tpa_rate: 80| B["Airplane with Tail"]
  A -->|Add tpa_rate: 80| C["Airplane without Tail"]
  D["Multicopter Presets"] -->|Retain tpa_rate: 20| E["Unchanged"]
Loading

File Walkthrough

Relevant files
Configuration changes
defaults_dialog_entries.js
Add TPA rate defaults to airplane presets                               

js/defaults_dialog_entries.js

  • Added tpa_rate: 80 configuration to "Airplane with a Tail" preset
  • Added tpa_rate: 80 configuration to "Airplane without a Tail (Wing,
    Delta, etc)" preset
  • Included TPA section comments for clarity in both presets
  • Multicopter presets remain unchanged with existing tpa_rate = 20
+14/-0   

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.
@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

Comment on lines +577 to +583
/*
* TPA
*/
{
key: "tpa_rate",
value: 80
},
Copy link
Contributor

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]

Suggested change
/*
* TPA
*/
{
key: "tpa_rate",
value: 80
},
/*
* TPA
*/
{
key: "tpa_rate",
value: 80
},
{
key: "tpa_breakpoint",
value: 1600
},

Copy link
Collaborator

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.

Copy link
Contributor

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:

@sensei-hacker sensei-hacker merged commit 73df5e7 into iNavFlight:maintenance-9.x Jan 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants