Skip to content

Advanced Tuning: add nav_cruise_lock_on_level toggle (companion to inav#11804) - #2709

Open
b14ckyy wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
b14ckyy:fw-cruise-lock-on-level
Open

Advanced Tuning: add nav_cruise_lock_on_level toggle (companion to inav#11804)#2709
b14ckyy wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
b14ckyy:fw-cruise-lock-on-level

Conversation

@b14ckyy

@b14ckyy b14ckyy commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Configurator counterpart to the firmware PR iNavFlight/inav#11804
(FW nav: replace roll PT1 smoothing with a triggered S-curve). Please
review/merge together with that PR.

What

Adds the new nav_cruise_lock_on_level boolean setting to
Advanced Tuning → Fixed Wing Navigation Settings, directly below
"Cruise Yaw Rate", as a toggle labeled "Lock Course when Level".

Why

inav#11804 changes when Course Hold / Cruise locks its course after a
heading adjustment or a banked mode entry: the course now locks once the
aircraft has rolled out level (below 10° bank) instead of immediately on
stick release, preventing course overshoot during the level-off. On
maintainer feedback this behavior change is gated behind a setting:

  • ON (default): lock the course once rolled out level (new behavior)
  • OFF: lock the course as soon as the sticks are centered (legacy behavior)

The tooltip explains both states.

Notes

  • Only locale/en is updated, other locales fall back to English.
  • On firmware without this setting the toggle is hidden automatically by
    the existing settings framework, so the Configurator stays compatible
    with older 10.x firmware.

Configurator counterpart to iNavFlight/inav#11804: adds the new
Course Hold / Cruise course-lock-on-level setting to the Fixed
Wing Navigation Settings section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Advanced Tuning: add “Lock Course when Level” toggle for Cruise/Course Hold

✨ Enhancement 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add UI toggle for new nav_cruise_lock_on_level fixed-wing navigation behavior.
• Provide English label and tooltip explaining new vs legacy course-lock timing.
• Keep backward compatibility by relying on existing “hide unknown settings” behavior.
Diagram

graph TD
  A["Advanced Tuning tab"] --> B["Fixed Wing Nav section"] --> C["Toggle: Lock on level"] --> D["Setting: nav_cruise_lock_on_level"] --> E{{"Settings framework"}} --> F["Firmware settings" ]
  A --> G["i18n messages (en)"] --> C

  subgraph Legend
    direction LR
    _ui["UI screen"] ~~~ _cfg["Config binding"] ~~~ _fw{{"Firmware capability"}}
  end
Loading
High-Level Assessment

The PR follows the configurator’s existing patterns (data-setting binding + i18n entries) and leverages the established “hide unsupported settings” behavior to remain compatible with older firmware. Alternatives (e.g., hard-gating by firmware version or adding per-locale translations now) add maintenance cost without improving correctness for this small UI addition.

Files changed (2) +12 / -0

Enhancement (1) +6 / -0
advanced_tuning.htmlAdd 'nav_cruise_lock_on_level' checkbox to Fixed Wing Navigation settings +6/-0

Add 'nav_cruise_lock_on_level' checkbox to Fixed Wing Navigation settings

• Adds a new toggle control directly under Cruise Yaw Rate in Advanced Tuning → Fixed Wing Navigation Settings. Wires the checkbox to the new firmware setting via 'data-setting="nav_cruise_lock_on_level"' and connects label/help via i18n keys.

tabs/advanced_tuning.html

Documentation (1) +6 / -0
messages.jsonAdd i18n label and help text for “Lock Course when Level” +6/-0

Add i18n label and help text for “Lock Course when Level”

• Introduces 'cruiseLockOnLevel' and 'cruiseLockOnLevelHelp' English strings. Tooltip documents the new lock-on-level behavior vs legacy lock-on-stick-center behavior for fixed-wing Course Hold/Cruise.

locale/en/messages.json

@sonarqubecloud

Copy link
Copy Markdown

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display preferences with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@github-actions

Copy link
Copy Markdown

Configurator test build ready — commit 5395892

Download build artifacts for PR #2709

Available platforms (scroll to the Artifacts section at the bottom of the run page):

  • Windows x64 (ZIP, MSI) and x32 (ZIP, MSI)
  • macOS arm64 (ZIP, DMG) and x64 (ZIP, DMG)
  • Linux x64 (DEB, RPM, ZIP) and aarch64 (DEB, RPM, ZIP)

A GitHub login is required to download artifacts. Build is for testing only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant