Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
4618245
Add GitHub Action to suggest maintenance branches for PRs targeting m…
sensei-hacker Nov 30, 2025
5209d96
Fix import of HTML in JS Programming tab
Lemontree-Softworks Dec 1, 2025
01cdcbd
search.js: Update fetch to ESM import syntax
sensei-hacker Dec 1, 2025
a536572
search: Add error handling
sensei-hacker Dec 1, 2025
2ab4cae
magnetometer.js error logging
sensei-hacker Dec 1, 2025
ef74611
magnetometer.js error logging
sensei-hacker Dec 1, 2025
1ea34bf
Fix transpiler API definitions to match firmware implementation
sensei-hacker Dec 2, 2025
ef4b1c4
Fix page loading in packed app
Lemontree-Softworks Dec 2, 2025
447769e
Address PR review feedback: update test documentation
sensei-hacker Dec 3, 2025
e3924bd
Merge pull request #2450 from sensei-hacker/transpiler-api-fixes
sensei-hacker Dec 3, 2025
7bb72e0
Merge pull request #2446 from sensei-hacker/search_update_fetch_to_esm
sensei-hacker Dec 3, 2025
689378c
Merge pull request #2447 from sensei-hacker/mag_not_load_win64
sensei-hacker Dec 3, 2025
2ed9320
Remove unused API definition files
sensei-hacker Dec 2, 2025
dca306d
Fix build error: Remove missing override.js import
sensei-hacker Dec 3, 2025
1745979
Merge pull request #2445 from Scavanger/Fix-JS-Programming-Tab
sensei-hacker Dec 3, 2025
2a72ab8
Merge pull request #2451 from sensei-hacker/remove-unused-api-definit…
sensei-hacker Dec 3, 2025
8dfa61a
Fix JavaScript Programming: Clear unused logic conditions on save
sensei-hacker Dec 3, 2025
3c36172
Fix three bugs breaking JavaScript Programming examples
sensei-hacker Dec 3, 2025
932c1f7
Add option to disable 3D acceleration in settings
Lemontree-Softworks Dec 3, 2025
5b8bc76
Fix bug: Ensure logic conditions are sent to correct FC slots
sensei-hacker Dec 4, 2025
d983fbd
Fix duplicate condition bug in transpiler >= synthesis
sensei-hacker Dec 4, 2025
47a0fd7
Fix missing override reference and editorWorker import
sensei-hacker Dec 4, 2025
0c7c067
Merge pull request #2452 from sensei-hacker/fix-javascript-clear-unus…
sensei-hacker Dec 4, 2025
7a9bf65
Merge pull request #2455 from sensei-hacker/fix-transpiler-examples-bugs
sensei-hacker Dec 4, 2025
c23ffd1
Merge pull request #2456 from sensei-hacker/fix-transpiler-not-operat…
sensei-hacker Dec 4, 2025
6681f4e
Fix JavaScript Programming tab issues (#2453)
sensei-hacker Dec 6, 2025
f0b47a3
Merge pull request #2460 from sensei-hacker/fix-javascript-programmin…
sensei-hacker Dec 6, 2025
4326ea1
Add flight axis override support to JavaScript Programming
sensei-hacker Dec 6, 2025
0e4fdb3
Merge branch 'maintenance-9.x' into flight-axis-override-implementation
sensei-hacker Dec 6, 2025
eb00d67
ests/test_flight_axis_override.js stray whitespace
sensei-hacker Dec 6, 2025
3909f8e
Remove CHANGELOG_FLIGHT_AXIS.md from PR
sensei-hacker Dec 6, 2025
52e3389
Move internal docs to project directory
sensei-hacker Dec 6, 2025
9dbd346
Merge pull request #2461 from sensei-hacker/flight-axis-override-impl…
sensei-hacker Dec 6, 2025
61c8ab1
flight axis tests: Fix bot review comments re test counter logic and mag
sensei-hacker Dec 7, 2025
17e7ce6
Fix broken flight axis override tests
sensei-hacker Dec 7, 2025
7a4f83f
Merge pull request #2462 from iNavFlight/maintenance-9.x
sensei-hacker Dec 7, 2025
9bcf765
Update SITL binaries for 9.0.0-RC3
sensei-hacker Dec 7, 2025
c288607
Merge pull request #2464 from sensei-hacker/sitl-update-9.0.0-RC3
sensei-hacker Dec 7, 2025
d1c3720
Optimize logic conditions loading with configured mask
sensei-hacker Dec 8, 2025
e717a1f
Merge pull request #2465 from sensei-hacker/feature/logic-conditions-…
sensei-hacker Dec 8, 2025
66b6d82
Progressive settings loading for faster tab rendering
sensei-hacker Dec 8, 2025
a1c2145
Add null check for customElementItems array
sensei-hacker Dec 8, 2025
ec6cc6b
Pass settings promise to callback for optional await
sensei-hacker Dec 8, 2025
5bb233e
Make optimized logic condition loading compatible with earler 9.0-RX*…
sensei-hacker Dec 9, 2025
8b05f65
Merge pull request #2467 from sensei-hacker/remove-version-check-logi…
sensei-hacker Dec 9, 2025
159806a
Fix OSD tab race conditions with async data loading
sensei-hacker Dec 9, 2025
2df96a9
Make optimized logic condition loading compatible with earler 9.0-RX*…
sensei-hacker Dec 9, 2025
0773404
Fix transpiler CSE mutation bug: invalidate cache on variable mutation
sensei-hacker Dec 9, 2025
b2ad7c4
Add PID operand support for transpiler compile/decompile
sensei-hacker Dec 10, 2025
9f372e2
Fix decompiler handling of value computations vs boolean conditions
sensei-hacker Dec 10, 2025
3f56e3a
Tree-based decompiler with improved sticky syntax
sensei-hacker Dec 10, 2025
7e122eb
Improve decompiler readability: expression hoisting and var declarations
sensei-hacker Dec 10, 2025
5d8e3c1
Add flight.mode.* API for checking active flight modes
sensei-hacker Dec 10, 2025
d60a99a
Fix round-trip compilation for decompiled JavaScript code
sensei-hacker Dec 10, 2025
faa8bbf
Fix round-trip compilation for var latch = sticky() syntax
sensei-hacker Dec 10, 2025
90b0552
Fix round-trip compilation issues in transpiler
sensei-hacker Dec 10, 2025
77c7715
Fix duplicate variable declarations in decompiler round-trip
sensei-hacker Dec 11, 2025
1e1f7d8
Decompiler: Use explicit comparisons instead of truthy syntax
sensei-hacker Dec 11, 2025
229b74d
Extract extractValue() and extractIdentifier() to shared module
sensei-hacker Dec 11, 2025
1934ad9
Remove dead code from decompiler.js
sensei-hacker Dec 11, 2025
f1ec9b0
Remove more dead code from transpiler
sensei-hacker Dec 11, 2025
e146d22
added ru l10n
funkill Dec 11, 2025
33d5c11
added ru item
funkill Dec 11, 2025
ae7c040
Add examples for PID, flight modes, and updated sticky syntax
sensei-hacker Dec 11, 2025
e21559b
Merge pull request #2471 from funkill/russian-translation
sensei-hacker Dec 11, 2025
e087ffb
Refactor operand validation to declarative lookup table
sensei-hacker Dec 11, 2025
5deae4b
Refactor handleNot to use structural pattern matching
sensei-hacker Dec 11, 2025
3064d16
Normalize >= and <= with constants to save 1 LC per comparison
sensei-hacker Dec 11, 2025
e9566d4
Refactor condition_decompiler to use lookup tables
sensei-hacker Dec 11, 2025
05220a9
Track latch variables structurally instead of regex pattern matching
sensei-hacker Dec 11, 2025
e082e30
Track imports and inline declarations structurally in decompiler
sensei-hacker Dec 11, 2025
28436b9
Refactor action_decompiler hoisting from string-parsing to structural
sensei-hacker Dec 11, 2025
1de6a2b
Fix potential infinite recursion in extractValue parenthesized handling
sensei-hacker Dec 11, 2025
e5f9f1d
Fix duplicate hoisted variable names across assignments
sensei-hacker Dec 11, 2025
842efff
Output standalone conditions as external references
sensei-hacker Dec 11, 2025
63fa726
Fix gap markers to insert blank lines in decompiled output
sensei-hacker Dec 11, 2025
495dac6
Preserve visual gaps in round-trip: blank lines create disabled LCs
sensei-hacker Dec 11, 2025
14d2da8
Merge pull request #2470 from sensei-hacker/decompiler-pid
sensei-hacker Dec 11, 2025
5b9f4af
Add examples coverage test suite (24 tests)
sensei-hacker Dec 11, 2025
490be04
Fix CLI copy button - enable clipboard support detection
sensei-hacker Dec 12, 2025
47eae3e
Fix override architecture: centralize mapping, add 9 missing operations
sensei-hacker Dec 12, 2025
2c5520b
Fix headingTarget unit: degrees (0-359), not centidegrees
sensei-hacker Dec 12, 2025
fca0372
Fix decompiler to use correct operand per INAV firmware
sensei-hacker Dec 12, 2025
5406389
Merge pull request #2463 from sensei-hacker/flight-axis-override-impl…
sensei-hacker Dec 12, 2025
9d28839
Merge pull request #2472 from sensei-hacker/transpiler-simplification…
sensei-hacker Dec 12, 2025
a70f2e2
Merge pull request #2466 from sensei-hacker/feature/progressive-setti…
sensei-hacker Dec 12, 2025
790071b
Merge pull request #2454 from Scavanger/config-3d-acceleration
sensei-hacker Dec 13, 2025
a17053d
Apply suggestions from code review
sensei-hacker Dec 13, 2025
1f8332b
Fix motor number positioning in Mixer tab
sensei-hacker Dec 13, 2025
d01cf13
Fix handling of extra.parenthesized in extractValue
sensei-hacker Dec 13, 2025
af3f959
Merge pull request #2473 from sensei-hacker/fix-cli-clipboard
sensei-hacker Dec 13, 2025
5cb4ce9
Fix decompiler: OR precedence and missing override actions
sensei-hacker Dec 13, 2025
cdb3ab7
Fix decompiler: APPROX_EQUAL outputs approxEqual() function
sensei-hacker Dec 13, 2025
637b4d2
Fix decompiler: edge/delay output arrow function format
sensei-hacker Dec 13, 2025
539e518
Fix activator relationship preservation in decompiler (#9)
sensei-hacker Dec 13, 2025
3cc2dae
Fix NOT() bypassing hoisted vars with activators (#3)
sensei-hacker Dec 13, 2025
7c50084
Fix missing Edge/Delay patterns with no children (#10)
sensei-hacker Dec 13, 2025
7f13a47
Fix sticky variable scope bug (#5)
sensei-hacker Dec 13, 2025
8a077e1
Simplify activator hoisting: emit all vars at top in LC index order
sensei-hacker Dec 13, 2025
50af276
Fix transpiler: handle pre-declared sticky variables
sensei-hacker Dec 13, 2025
b0b7eea
Transpiler: Add !(a && b) → NAND, !(a || b) → NOR pattern recognition
sensei-hacker Dec 13, 2025
61390b7
Transpiler: Add ternary support, caching, and improve pattern recogni…
sensei-hacker Dec 13, 2025
0488cac
Decompiler: Fix redundant activator wrapping in hoisted variables
sensei-hacker Dec 13, 2025
b5faa31
Transpiler: Hoist duplicated root LCs and fix const variable resolution
sensei-hacker Dec 13, 2025
e51fb9d
Transpiler: Fix const variable duplication in round-trip compilation
sensei-hacker Dec 13, 2025
2eb6cc9
Transpiler: Add scoped hoisting and optimize decompiler output
sensei-hacker Dec 14, 2025
3ec4e79
Examples: Add let/const variables and ternary operator examples
sensei-hacker Dec 14, 2025
f0d9210
Merge upstream/maintenance-9.x into transpiler-additional-overrides
sensei-hacker Dec 14, 2025
8179fbe
Tests: Move jetrell test to regression tests, clean up debug files
sensei-hacker Dec 14, 2025
0645fdf
Transpiler: Always import all INAV objects, remove usedFeatures tracking
sensei-hacker Dec 14, 2025
ffc2cdd
i18n: Localize JavaScript Programming tab
sensei-hacker Dec 14, 2025
612b86c
i18n: Add Ukrainian, Japanese, and Chinese translations for JavaScrip…
sensei-hacker Dec 14, 2025
acce07d
transpiler: add line feeds to import for readability
sensei-hacker Dec 14, 2025
751eb04
error handle
error414 Dec 14, 2025
696f9ed
Fix receiver MSP control page nouislider migration
sensei-hacker Dec 15, 2025
5267c82
receiver_msp.js: remove debug logging
sensei-hacker Dec 15, 2025
d08e49c
Add Chrome DevTools Protocol remote debugging support
sensei-hacker Dec 18, 2025
95ca8ea
Update js/main/main.js
sensei-hacker Dec 18, 2025
96dca3c
Update js/main/main.js
sensei-hacker Dec 18, 2025
c8c819d
Merge pull request #2483 from sensei-hacker/add-remote-debugging-support
sensei-hacker Dec 18, 2025
c55d203
Fix async settings loading race condition in Configuration and Receiv…
sensei-hacker Dec 18, 2025
9e614a4
Apply Qodo bot suggestions: error handling and trigger optimization
sensei-hacker Dec 18, 2025
9986d94
Merge pull request #2474 from sensei-hacker/transpiler-additional-ove…
sensei-hacker Dec 19, 2025
e87f05f
Merge pull request #2475 from sensei-hacker/fix-mixer-motor-number-po…
sensei-hacker Dec 19, 2025
a8344d4
Merge pull request #2480 from sensei-hacker/fix-receiver-msp-nouislider
sensei-hacker Dec 19, 2025
eb65162
Merge pull request #2485 from sensei-hacker/fix-async-settings-triggers
sensei-hacker Dec 19, 2025
3dc3f8c
Merge pull request #2476 from error414/fix-serial-port--open
sensei-hacker Dec 19, 2025
a1be10b
Merge pull request #2487 from sensei-hacker/flight-axis-override-impl…
sensei-hacker Dec 19, 2025
2b7a2f9
Fix blackbox save to file functionality
sensei-hacker Dec 20, 2025
8bd229e
Fix auto-select target functionality in firmware flasher
sensei-hacker Dec 20, 2025
927f8ef
Refactor transpiler to use fully namespaced inav.* syntax
sensei-hacker Dec 21, 2025
44cae10
Fix RC channel boolean properties with inav. namespace
sensei-hacker Dec 21, 2025
5ae49fc
Add test runner for all 22 examples
sensei-hacker Dec 21, 2025
1efed60
Tests: Update test suite for namespaced syntax
sensei-hacker Dec 21, 2025
9effe21
Decompiler: Add inav. prefix to gvar, rc, and pid operands
sensei-hacker Dec 21, 2025
6aca22b
Add helper functions to inav.helpers namespace and validate usage
sensei-hacker Dec 21, 2025
cbb70ab
Simplify helper function namespace validation in expression_generator.js
sensei-hacker Dec 21, 2025
a3b9a9d
Refactor: Inline helper function namespace checking
sensei-hacker Dec 21, 2025
4e7743f
Refactor: Consistent namespace-based routing in property access checker
sensei-hacker Dec 21, 2025
30f27fc
Add comprehensive namespace validation tests
sensei-hacker Dec 21, 2025
74d75f1
Fix: Flight axis override backward compatibility
sensei-hacker Dec 21, 2025
508dc2d
Fix error handling to use .catch() for promise rejection
sensei-hacker Dec 21, 2025
0cf3278
Adding recent Ukrainian translations for INAV 9 RC
smsnvc Dec 21, 2025
5a87c1f
Adding recent Ukrainian translations for INAV 9 RC
smsnvc Dec 21, 2025
5ade699
Merge pull request #2488 from sensei-hacker/fix-dialog-undefined-main…
sensei-hacker Dec 21, 2025
768478f
Improve forEach check with duck typing for future-proofing
sensei-hacker Dec 21, 2025
a8b3790
Merge pull request #2489 from sensei-hacker/fix-auto-select-target-fo…
sensei-hacker Dec 21, 2025
c67df60
Merge branch 'maintenance-9.x' into Add-missing-Ukrainian-translation…
smsnvc Dec 21, 2025
c85b75a
Merge pull request #2491 from smsnvc/Add-missing-Ukrainian-translatio…
sensei-hacker Dec 21, 2025
da60941
Fix serial connection reliability issues
sensei-hacker Dec 23, 2025
9e45a79
Fix serial port handle leak causing "Cannot lock port" errors
sensei-hacker Dec 23, 2025
19af8c4
Merge pull request #2490 from sensei-hacker/fix-monaco-autocomplete-r…
sensei-hacker Dec 23, 2025
6cce81e
Merge pull request #2494 from sensei-hacker/fix-serial-connection-rel…
sensei-hacker Dec 23, 2025
212917f
Fix logic conditions loading to handle MSP errors
sensei-hacker Dec 23, 2025
5bf903c
Merge pull request #2495 from sensei-hacker/fix-logic-conditions-load…
sensei-hacker Dec 23, 2025
34d2696
Fix SITL binary path resolution for dev and packaged modes
sensei-hacker Dec 24, 2025
ac5180b
Merge pull request #2496 from sensei-hacker/fix-sitl-path-resolution
sensei-hacker Dec 24, 2025
01d957e
Merge pull request #2479 from iNavFlight/maintenance-9.x
sensei-hacker Dec 24, 2025
0b8b5a6
Fix SITL binary path resolution for dev and packaged modes
sensei-hacker Dec 24, 2025
ac7cb28
Fix SITL remove wrong architecture
sensei-hacker Dec 24, 2025
47d2a46
Merge pull request #2497 from sensei-hacker/master
sensei-hacker Dec 24, 2025
d9d1431
Merge pull request #2498 from sensei-hacker/fix-sitl-path-resolution
sensei-hacker Dec 24, 2025
3b32d36
Merge pull request #2499 from iNavFlight/master
sensei-hacker Dec 24, 2025
26b1e84
Update SITL binaries for 9.0.0-RC4
sensei-hacker Dec 24, 2025
c2007bc
Merge pull request #2500 from sensei-hacker/update-sitl-9.0.0-rc4
sensei-hacker Dec 24, 2025
c9f8d59
reset state if processData throws, so the CRC isn't re-entered
sensei-hacker Dec 24, 2025
b1f1f3d
Fix incorrect send_message parameter in loadLogicConditions
sensei-hacker Dec 24, 2025
d0ded94
Merge pull request #2502 from sensei-hacker/fix_double_crc
sensei-hacker Dec 24, 2025
a869ede
Merge pull request #2503 from iNavFlight/maintenance-9.x
sensei-hacker Dec 26, 2025
83dd3f4
Fix decompiler to output whenChanged() instead of delta()
sensei-hacker Dec 27, 2025
96ae77d
Fix rendering of md
MrD-RC Dec 28, 2025
6455a28
translate new strings
funkill Dec 28, 2025
fd9a73e
added ru locale to files
funkill Dec 28, 2025
0f02477
added translate for javascriptOptimizationsApplied
funkill Dec 29, 2025
204c082
Fix postPackage hook to remove non-native SITL binaries from macOS bu…
sensei-hacker Dec 29, 2025
d28fa43
Fix macOS app bundle path - find .app directory dynamically
sensei-hacker Dec 29, 2025
64b906f
readme: Add debugging info
sensei-hacker Dec 31, 2025
50001fd
Fix transpiler conflict detection and AST consistency
sensei-hacker Dec 31, 2025
40402fe
Merge pull request #2504 from sensei-hacker/fix-decompiler-whenchange…
sensei-hacker Jan 6, 2026
f733ffb
Merge pull request #2513 from sensei-hacker/fix-transpiler-qodo-issues
sensei-hacker Jan 6, 2026
ab58341
Fix transpiler validation and i18n display issues
sensei-hacker Jan 6, 2026
36989e8
Fix parser error reporting
sensei-hacker Jan 6, 2026
4c644cb
Add comprehensive validation with improved error messages
sensei-hacker Jan 6, 2026
66bff8f
Fix test to check correct field (warnings.errors)
sensei-hacker Jan 6, 2026
aa2b7d0
Add TPA rate defaults to fixed-wing presets
sensei-hacker Jan 7, 2026
61c48fe
Fix: Add empty properties check before accessing first nested propert…
sensei-hacker Jan 10, 2026
70fc41b
Fix: Re-enable terrain elevation chart with Chart.js ESM support
sensei-hacker Jan 12, 2026
393c8b6
Fix: Restore comment markers broken during uncomment
sensei-hacker Jan 12, 2026
415e5e7
Fix: Make Chart.js globally accessible for plotElevation
sensei-hacker Jan 12, 2026
77893b4
Fix: Add Chart.js rendering for actual mission elevation data
sensei-hacker Jan 12, 2026
b5f66e7
Refactor: Clean up plotElevation() and remove Plotly remnants
sensei-hacker Jan 12, 2026
0c5229e
Update yarn.lock for Chart.js v4.4.1 dependency
sensei-hacker Jan 12, 2026
b13a083
Fix: Use chart.update() instead of destroy/recreate for better intera…
sensei-hacker Jan 12, 2026
f0a1ffd
Fix: Update elevation chart when dragging any waypoint, not just sele…
sensei-hacker Jan 12, 2026
bef73fc
Fix: Add race condition protection and disable chart animations
sensei-hacker Jan 12, 2026
9bed4c0
Merge pull request #2509 from sensei-hacker/docs_add_debug_commands
sensei-hacker Jan 13, 2026
9649161
Merge pull request #2506 from funkill/update-ru-translation
sensei-hacker Jan 13, 2026
f379aca
Merge pull request #2508 from sensei-hacker/fix-macos-dmg-windows-bin…
sensei-hacker Jan 13, 2026
1652298
Merge pull request #2514 from sensei-hacker/fix-transpiler-validation
sensei-hacker Jan 13, 2026
73df5e7
Merge pull request #2515 from sensei-hacker/platform-specific-tpa-def…
sensei-hacker Jan 13, 2026
aed1893
Merge pull request #2518 from sensei-hacker/fix/terrain-elevation-cha…
sensei-hacker Jan 13, 2026
882c183
Update SITL binaries for 9.0.0 final release
sensei-hacker Jan 14, 2026
b917e15
Added correct VSpeed PIDFF parameters for FW-WT
b14ckyy Jan 22, 2026
4b75aad
Update defaults_dialog_entries.js
b14ckyy Jan 22, 2026
7f6b279
Merge pull request #2533 from b14ckyy/b14ckyy-corrected-vspeed-defaults
b14ckyy Jan 24, 2026
0ded586
Remove 'set' prefix from nav_fw keys
b14ckyy Jan 25, 2026
d7a1e84
Merge pull request #2537 from b14ckyy/b14ckyy-corrected-vspeed-defaults
b14ckyy Jan 25, 2026
b1ef976
Merge pull request #2505 from iNavFlight/MrD-RC-patch-1
sensei-hacker Jan 28, 2026
23f031c
Merge pull request #2520 from sensei-hacker/update-sitl-9.0.0-final
sensei-hacker Jan 28, 2026
3742221
Fix BLE byte counter regression introduced in 9.0.0
sensei-hacker Jan 28, 2026
545ed92
Remove debug logging from BLE connection fix
sensei-hacker Jan 30, 2026
1a85fc5
Merge pull request #2542 from sensei-hacker/fix/ble-byte-counter
sensei-hacker Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/pr-branch-suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Branch Suggestion

on:
pull_request_target:
types: [opened]
branches:
- master

jobs:
suggest-branch:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Suggest maintenance branch
uses: actions/github-script@v7
with:
script: |
const comment = `### Branch Targeting Suggestion
You've targeted the \`master\` branch with this PR. Please consider if a version branch might be more appropriate:
- **\`maintenance-9.x\`** - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.
- **\`maintenance-10.x\`** - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x
If \`master\` is the correct target for this change, no action is needed.
---
*This is an automated suggestion to help route contributions to the appropriate branch.*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
128 changes: 128 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# INAV Configurator - Developer Guide

> **Maintainers:** Update this file when making architectural changes or adding major features.

## Overview

INAV Configurator is a cross-platform Electron desktop application for configuring INAV flight controllers. It supports multirotors, fixed-wing aircraft, rovers, and boats.

**Tech Stack:** Electron + Vite + jQuery + i18next

## Quick Start

```bash
yarn install # Install dependencies
yarn start # Run in development mode (hot reload)
yarn make # Build distributable packages
```

## Directory Structure

```
inav-configurator/
├── js/ # Main application source
│ ├── configurator_main.js # Renderer entry point (initializes UI)
│ ├── fc.js # Flight controller state model
│ ├── gui.js # Tab switching & UI management
│ ├── msp.js # MSP protocol encoder/decoder
│ ├── serial_backend.js # Connection orchestration
│ ├── main/ # Electron main process
│ │ ├── main.js # Main process entry
│ │ └── preload.js # IPC bridge (renderer↔main)
│ ├── connection/ # Connection layer (factory pattern)
│ │ ├── connectionSerial.js # Serial port
│ │ ├── connectionTcp.js # TCP/IP (SITL)
│ │ └── connectionBle.js # Bluetooth LE
│ ├── msp/ # MSP protocol helpers
│ │ ├── MSPCodes.js # Command codes
│ │ └── MSPHelper.js # Serialization (largest file)
│ └── transpiler/ # Logic conditions compiler
├── src/css/ # Stylesheets
│ └── tabs/ # Per-tab styles
├── locale/ # i18n translations (en, ja, ru, uk, zh_CN)
├── resources/ # 3D models, OSD fonts, SITL binaries
├── index.html # Single-page app entry
├── forge.config.js # Electron Forge build config
└── vite.*.config.js # Vite build configs
```

## Architecture

### Data Flow

```
User → GUI Tab → MSP.send_message() → Serial Queue → Connection → Flight Controller
User ← GUI Update ← FC state object ← MSP.decode() ← Serial Data ←──────┘
```

### Key Subsystems

1. **Connection Layer** (`js/connection/`): Factory pattern abstracts serial, TCP, UDP, BLE
2. **MSP Protocol** (`js/msp/`): Binary protocol for FC communication (V1/V2 variants)
3. **FC State** (`js/fc.js`): Central state object (CONFIG, PID, SENSOR_DATA, GPS_DATA, etc.)
4. **Tab System** (`js/gui.js`): Tabs load dynamically; separate tabs for connected vs disconnected states

### MSP Request Pattern

```javascript
MSP.send_message(MSPCodes.MSP_SOME_CODE, payload, false, () => {
// FC state already updated, refresh UI here
updateUIFromState(FC.SOME_DATA);
});
```

## Adding a New Tab

1. Create tab JS file with `initialize()` and `cleanup()` functions
2. Register in `TABS` object
3. Add CSS in `src/css/tabs/`
4. Add HTML link in `index.html` (mode-connected or mode-disconnected list)
5. Add translation keys to `locale/en/messages.json`

## Adding New MSP Commands

1. Add command code to `js/msp/MSPCodes.js`
2. Add serialize/deserialize logic to `js/msp/MSPHelper.js`
3. Add state property to `js/fc.js`
4. Use in relevant tab

## Build Targets

| Platform | Command | Output |
|----------|---------|--------|
| Windows | `yarn make --platform win32` | MSI installer |
| macOS | `yarn make --platform darwin` | DMG |
| Linux | `yarn make --platform linux` | DEB, RPM |

## Key Files by Importance

| File | Purpose |
|------|---------|
| `js/msp/MSPHelper.js` | All MSP serialization (159KB - largest file) |
| `js/fc.js` | Flight controller state model |
| `js/serial_backend.js` | Connection management |
| `js/gui.js` | Tab switching, UI state |
| `js/configurator_main.js` | Application initialization |


## Code Patterns

- **jQuery** for DOM manipulation
- **Callbacks** for async (some Promises)
- **i18next** via `data-i18n` attributes: `<span data-i18n="key"></span>`
- **ES6 modules** throughout (`import`/`export`)

## Debugging

```bash
NODE_ENV=development yarn start # Dev mode
# Press Ctrl+Shift+I for DevTools
```

## Resources

- [INAV Firmware](https://github.com/iNavFlight/inav)
- [INAV Wiki](https://github.com/iNavFlight/inav/wiki)
- [INAV Discord](https://discord.gg/peg2hhbYwN)
- [Electron Docs](https://www.electronjs.org/docs)
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,21 @@ Example (note the double -- ):
To be able to open Inspector, set environment variable `NODE_ENV` to `development` or set the flag directly when run `npm start`:

```NODE_ENV=development npm start``` or ```$env:NODE_ENV="development" | npm start``` for Windows PowerShell
Chrome Devtools will be available on http://localhost:9222. This can also be used with an MCP plugin

Or use VScode and start a debug session `Debug Configurator` (Just hit F5!)

To debug the main thread (source files in `js/main`), just set a breakpoint in VScode.


To capture a debug log from a packaged version (such as from a user), they can run it as:
```.\inav-configurator.exe --enable-logging --log-file=inav-log.txt```
or to log to the console:
```.\inav-configurator.exe --enable-logging --log-file=inav-log.txt```




## Different map providers

INAV Configurator allows you to choose between OpenStreetMap, Esri World Imagery (Aerial View), and MapProxy map providers.
Expand Down
56 changes: 56 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export default {
executableName: "inav-configurator",
asar: false,
icon: 'images/inav',
extraResource: [
'resources/public/sitl'
],
},
rebuildConfig: {},
plugins: [
Expand Down Expand Up @@ -43,6 +46,59 @@ export default {
},
],
hooks: {
// Remove SITL binaries for other platforms/architectures to reduce package size
postPackage: async (forgeConfig, options) => {
for (const outputPath of options.outputPaths) {
let sitlPath;

if (options.platform === 'darwin') {
// macOS app bundle structure: <outputDir>/<AppName>.app/Contents/Resources/sitl
// Find the .app directory
const appBundles = fs.readdirSync(outputPath).filter(f => f.endsWith('.app'));
if (appBundles.length === 0) {
console.log(`postPackage: No .app bundle found in ${outputPath}`);
continue;
}
sitlPath = path.join(outputPath, appBundles[0], 'Contents', 'Resources', 'sitl');
} else {
// Windows/Linux: <outputPath>/resources/sitl
sitlPath = path.join(outputPath, 'resources', 'sitl');
}

console.log(`postPackage: Checking SITL path for ${options.platform}: ${sitlPath}`);
if (!fs.existsSync(sitlPath)) {
console.log(`postPackage: SITL path not found, skipping: ${sitlPath}`);
continue;
}

if (options.platform === 'win32') {
console.log('postPackage: Removing non-Windows SITL binaries (linux, macos)');
fs.rmSync(path.join(sitlPath, 'linux'), { recursive: true, force: true });
fs.rmSync(path.join(sitlPath, 'macos'), { recursive: true, force: true });
} else if (options.platform === 'darwin') {
console.log('postPackage: Removing non-macOS SITL binaries (linux, windows)');
fs.rmSync(path.join(sitlPath, 'linux'), { recursive: true, force: true });
fs.rmSync(path.join(sitlPath, 'windows'), { recursive: true, force: true });
} else if (options.platform === 'linux') {
console.log('postPackage: Removing non-Linux SITL binaries (macos, windows)');
fs.rmSync(path.join(sitlPath, 'macos'), { recursive: true, force: true });
fs.rmSync(path.join(sitlPath, 'windows'), { recursive: true, force: true });
// Remove wrong architecture
if (options.arch === 'x64') {
fs.rmSync(path.join(sitlPath, 'linux', 'arm64'), { recursive: true, force: true });
} else if (options.arch === 'arm64') {
// Move arm64 binary to linux root and remove x64
const arm64Binary = path.join(sitlPath, 'linux', 'arm64', 'inav_SITL');
const destBinary = path.join(sitlPath, 'linux', 'inav_SITL');
if (fs.existsSync(arm64Binary)) {
fs.rmSync(destBinary, { force: true });
fs.renameSync(arm64Binary, destBinary);
fs.rmSync(path.join(sitlPath, 'linux', 'arm64'), { recursive: true, force: true });
}
}
}
}
},
// Uniform artifact file names
postMake: async (config, makeResults) => {
makeResults.forEach(result => {
Expand Down
24 changes: 24 additions & 0 deletions js/configurator_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,21 @@ $(function() {
return;
}

// Check for unsaved changes in current tab before switching
if (GUI.active_tab === 'javascript_programming' &&
TABS.javascript_programming &&
TABS.javascript_programming.isDirty) {
console.log('[Tab Switch] Checking for unsaved changes in JavaScript Programming tab');
const confirmMsg = i18n.getMessage('unsavedChanges') ||
'You have unsaved changes. Leave anyway?';

if (!confirm(confirmMsg)) {
console.log('[Tab Switch] User cancelled tab switch');
return; // Cancel tab switch
}
console.log('[Tab Switch] User confirmed tab switch');
}

GUI.tab_switch_in_progress = true;

GUI.tab_switch_cleanup(function () {
Expand Down Expand Up @@ -285,6 +300,15 @@ $(function() {
var check = $(this).is(':checked');
store.set('update_notify', check);
});

if (store.get('disable_3d_acceleration', false)) {
$('div.disable_3d_acceleration input').prop('checked', true);
}

$('div.disable_3d_acceleration input').on('change', function () {
var check = $(this).is(':checked');
store.set('disable_3d_acceleration', check);
});

$('div.statistics input').on('change', function () {
var check = $(this).is(':checked');
Expand Down
17 changes: 9 additions & 8 deletions js/connection/connectionBle.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ConnectionBle extends Connection {
this._writeCharacteristic = false;
this._device = false;
this._deviceDescription = false;
this._onCharateristicValueChangedListeners = [];
this._onDisconnectListeners = [];
this._reconnects = 0;
this._handleOnCharateristicValueChanged = false;
Expand Down Expand Up @@ -166,11 +165,13 @@ class ConnectionBle extends Connection {
buffer[i] = event.target.value.getUint8(i);
}

this._onCharateristicValueChangedListeners.forEach(listener => {
listener({
connectionId: 0xFF,
data: buffer
});
const info = {
connectionId: 0xFF,
data: buffer
};

this._onReceiveListeners.forEach(listener => {
listener(info);
});
};

Expand Down Expand Up @@ -242,11 +243,11 @@ class ConnectionBle extends Connection {
}

addOnReceiveCallback(callback){
this._onCharateristicValueChangedListeners.push(callback);
this._onReceiveListeners.push(callback);
}

removeOnReceiveCallback(callback){
this._onCharateristicValueChangedListeners = this._onCharateristicValueChangedListeners.filter(listener => listener !== callback);
this._onReceiveListeners = this._onReceiveListeners.filter(listener => listener !== callback);
}

addOnReceiveErrorCallback(callback) {
Expand Down
Loading