Skip to content

Number RC channels 1-34 in the JavaScript Programming docs - #12280

Open
sensei-hacker wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
sensei-hacker:docs-js-rc-channels
Open

sensei-hacker wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
sensei-hacker:docs-js-rc-channels

Conversation

@sensei-hacker

Copy link
Copy Markdown
Member

JavaScript Programming numbers RC channels from 1 (inav.rc[1] is the first channel). Several examples in docs/javascript_programming/ used inav.rc[0], which does not compile. The docs also gave the range as 0–17.

Logic conditions read and override channels 1–34 (MAX_SUPPORTED_RC_CHANNEL_COUNT). The configurator accepts 1–34 from iNavFlight/inav-configurator#2869.

Changes:

  • Examples use rc[1]–rc[4] for roll, pitch, throttle and yaw.
  • The range is given as rc[1] through rc[34].

Docs only.

JavaScript Programming numbers RC channels from 1, so the examples that
used rc[0] did not compile. Logic conditions support channels 1-34.
@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

Code Review by Qodo

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

Grey Divider

No findings to report

Grey Divider

Tip of the day
💡 Did you know, you can open the rule or relationship behind a finding in one click

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

⚠️ Qodo did not complete this review — the change was judged trivial and was not reviewed — so this is not a clean bill of health, and approval was withheld.

Qodo Logo

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

qodo-free-for-open-source-projects Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Number RC channels 1-34 in JavaScript Programming docs

🐞 Bug fix 📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Renumbers RC channel examples from rc[0] to rc[1], matching the JavaScript API's 1-based
 indexing.
• Corrects the documented RC channel range from 0-17 to rc[1] through rc[34], matching
 MAX_SUPPORTED_RC_CHANNEL_COUNT.
• Updates the operations reference, testing guide, API summary and index so all examples agree.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 0 capabilities

  • No production behavior changes identified.
Behavioral complexity 🟢 Low 🧩 Assessed behavior

  • No production behavior changes identified.
Potential damage 🟢 Low 🩹 Assessed behavior

  • No production behavior changes identified.
Assessed commit 40e4ec6
Diagram

graph TD
  A["Docs examples"] --> B["inav.rc[1..34]"] --> C["Logic condition engine"] --> D["RC channels 1-34"]
Loading
High-Level Assessment

Renumbering the examples to match the existing 1-based inav.rc[n] API is the right fix. The examples were wrong, not the API. Keeping 0-based examples would require changing the JavaScript runtime or firmware indexing, which is out of scope for a docs fix. Reusing the 0-17 range was dismissed because the firmware supports 34 channels.

Files changed (4) +12 / -12

Documentation (4) +12 / -12
OPERATIONS_REFERENCE.mdShift RC examples to 1-based indices and fix channel range +6/-6

Shift RC examples to 1-based indices and fix channel range

• Renumbers all 'inav.rc[n]' examples so roll, pitch, throttle and yaw use 'rc[1]' to 'rc[4]'. Changes the Notes range from 'rc[0]'-'rc[17]' to 'rc[1]'-'rc[34]'.

docs/javascript_programming/OPERATIONS_REFERENCE.md

TESTING_GUIDE.mdUpdate RC edge-case examples to channels 1 and 34 +3/-3

Update RC edge-case examples to channels 1 and 34

• Changes the boundary test from channel 0 (first) to channel 1 and from channel 17 (last) to channel 34. Updates the comments to match and renumbers the combined-expression example.

docs/javascript_programming/TESTING_GUIDE.md

api_definitions_summary.mdDocument rc.js as 34 channels indexed 1-34 +2/-2

Document rc.js as 34 channels indexed 1-34

• Updates the RC channel count and index range in the rc.js section and in the module table from 18 channels (0-17) to 34 channels (1-34).

docs/javascript_programming/api_definitions_summary.md

index.mdFix inav.rc property access example to rc[1] +1/-1

Fix inav.rc property access example to rc[1]

• Changes the object property access example from 'inav.rc[0].value' to 'inav.rc[1].value' so it matches the 1-based indexing.

docs/javascript_programming/index.md

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