Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Dec 11, 2025

User description

Summary

Updates JavaScript programming documentation to document new features added in INAV 9.0:

  • PID controller output access (pid[0-3].output)
  • Flight mode detection (flight.mode.poshold, flight.mode.rth, etc.)
  • Updated sticky syntax to use variable assignment pattern
  • Updated version history for INAV 9.0

Changes

  • docs/javascript_programming/JAVASCRIPT_PROGRAMMING_GUIDE.md - Added flight mode and PID documentation, updated sticky examples
  • docs/javascript_programming/api_definitions_summary.md - Updated PID and flight mode descriptions
  • docs/javascript_programming/index.md - Added new features to language support list, updated version history

Testing

Documentation changes only - no code changes.

Related

Related to configurator PR #2470


PR Type

Documentation


Description

  • Documents new INAV 9.0 JavaScript features: PID outputs and flight modes

  • Adds Variables section covering let/const and ternary operators

  • Updates API documentation to use explicit namespaced syntax

  • Enhances code examples with practical use cases


Diagram Walkthrough

flowchart LR
  A["JavaScript Guide"] --> B["Variables Section"]
  A --> C["Available Objects"]
  B --> D["Let/Const Variables"]
  B --> E["Ternary Operator"]
  C --> F["Flight Mode Detection"]
  C --> G["PID Controller Outputs"]
  D --> H["Compile-time Substitution"]
  E --> I["Conditional Values"]
  F --> J["inav.flight.mode.*"]
  G --> K["inav.pid[0-3].output"]
Loading

File Walkthrough

Relevant files
Documentation
JAVASCRIPT_PROGRAMMING_GUIDE.md
Add Variables section and expand API documentation             

docs/javascript_programming/JAVASCRIPT_PROGRAMMING_GUIDE.md

  • Adds new Variables section documenting let/const and ternary operators
  • Expands Available Objects with detailed subsections for flight modes
    and PID outputs
  • Provides practical code examples for flight mode detection and PID
    controller access
  • Updates Tips section to use explicit namespaced syntax (inav.gvar,
    inav.events.edge)
+85/-12 
index.md
Update feature list with new INAV 9.0 capabilities             

docs/javascript_programming/index.md

  • Updates feature list to highlight namespaced API access pattern
  • Adds ternary operator to supported JavaScript features
  • Documents flight mode detection and PID controller outputs
  • Replaces destructuring example with explicit namespace syntax
+6/-3     

…ary)

Adds documentation for new INAV 9.0 JavaScript programming features:

New Features:
- PID controller output access (inav.pid[0-3].output)
- Flight mode detection (inav.flight.mode.poshold, .rth, etc.)
- Let/const variables for compile-time named expressions
- Ternary operator for conditional value assignment

Changes:
- Add Variables section with let/const and ternary operator docs
- Update Available Objects to list PID and flight modes
- Add Flight Mode Detection subsection with examples
- Add PID Controller Outputs subsection with examples
- Update index.md feature list
- Update Tips section for consistency

All examples use namespaced syntax (inav.flight.*, inav.override.*, etc.)
for clarity and explicitness.
@sensei-hacker sensei-hacker force-pushed the docs/javascript-programming-updates branch from 22203ed to fd9ca51 Compare December 21, 2025 22:53
@sensei-hacker sensei-hacker marked this pull request as ready for review December 21, 2025 22:56
@qodo-code-review
Copy link
Contributor

You are nearing your monthly Qodo Merge usage quota. For more information, please visit here.

PR Compliance Guide 🔍

All compliance sections have been disabled in the configurations.

@sensei-hacker sensei-hacker merged commit 58b4159 into iNavFlight:maintenance-9.x Dec 21, 2025
1 check 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.

1 participant