Skip to content

fix: sync JS programming framework constants with firmware#2577

Open
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
sensei-hacker:fix/sync-js-programming-framework-constants
Open

fix: sync JS programming framework constants with firmware#2577
sensei-hacker wants to merge 1 commit intoiNavFlight:maintenance-9.xfrom
sensei-hacker:fix/sync-js-programming-framework-constants

Conversation

@sensei-hacker
Copy link
Member

Summary

Fills two missing entries in the JavaScript programming framework lookup tables to match firmware definitions:

  • Angle Hold flight mode missing from the classic Programming tab. Firmware defines LOGIC_CONDITION_OPERAND_FLIGHT_MODE_ANGLEHOLD = 16 but it was absent from logicConditionOperantTypes.js, so users could not select it as a flight mode operand in the Logic Conditions UI.
  • Override Min Ground Speed name missing from OPERATION_NAMES in inav_constants.js. OPERATION.OVERRIDE_MIN_GROUND_SPEED = 56 was present but the human-readable name entry [56] was absent, causing 'unknown_operation_56' in transpiler warning messages.

Changes

  • js/logicConditionOperantTypes.js — Add 16: "Angle Hold" to flight mode operand dictionary
  • js/transpiler/transpiler/inav_constants.js — Add [56]: 'Override Min Ground Speed' to OPERATION_NAMES

Testing

  • All 28 transpiler unit tests pass (run_all_tests.cjs)
  • Full configurator build succeeds (Vite + Electron Forge, linux/x64)
  • Angle Hold now appears in the flight mode selector in the Logic Conditions tab
  • inav.override.minGroundSpeed decompiles correctly in the JS Programming tab (confirmed via screenshot)

Code Review

Reviewed with inav-code-review agent — no critical or important issues found. Both numeric keys verified against firmware logic_condition.h.

Documentation

No documentation changes needed (bug fixes — missing UI entries).

- Add Angle Hold (mode 16) to flight mode operand types in classic
  programming tab (logicConditionOperantTypes.js). Firmware defines
  LOGIC_CONDITION_OPERAND_FLIGHT_MODE_ANGLEHOLD = 16 but it was missing
  from the UI, preventing users from selecting it as a flight mode operand.

- Add OPERATION_NAMES[56] (Override Min Ground Speed) to inav_constants.js.
  OPERATION.OVERRIDE_MIN_GROUND_SPEED = 56 was present but the human-readable
  name was missing, causing 'unknown_operation_56' in warning messages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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