Configurator as Web APP (PWA)#2448
Configurator as Web APP (PWA)#2448Scavanger wants to merge 58 commits intoiNavFlight:maintenance-10.xfrom
Conversation
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
|
I think websockets wrap it in HTTP requests. They aren't raw sockets, as I understand it. Both Electron and PWA support web sockets, though. So one solution would be something along these lines, roughly: BUUUUT I have another idea in mind I'm going to try. |
|
@Scavanger I don't know if you've seen my other comments, but ... I now have SITL mostly running in the browser, compiled with webassembly. It runs in-browser can responds to MSP communication. So no platform-specific SITL needed for Configurator. |
…ividual objects - Updated all tabs to replace the global TABS object with individual tab objects (e.g., loggingTab, magnetometerTab, etc.). - Changed the way active tabs are set by comparing against the tab object instead of string literals. - Exported each tab object for better modularity and maintainability. - Ensured all tab initialization and cleanup functions are correctly referenced to their respective objects. This should help to optimise the tabs and prevent some of the tabs from loading incorrectly in PWA.
This commit fixes issues in the transpiler API definitions where
the configurator did not match the actual INAV firmware implementation.
Issues Fixed:
1. waypoint.js (CRITICAL):
- Fixed wrong operand type (was 5/GVAR, now 7/WAYPOINTS)
- Removed 6 fabricated properties not in firmware (latitude, longitude,
altitude, bearing, missionReached, missionValid)
- Added 14 actual properties from firmware (isWaypointMission, number,
action, nextAction, distance, distanceFromPrevious, user action flags)
2. gvar.js (HIGH):
- Fixed wrong operand type (was 3/FLIGHT_MODE, now 5/GVAR)
- Fixed wrong operation (was 19/GVAR_INC, now 18/GVAR_SET)
3. pid.js (MAJOR):
- Removed fabricated properties not in firmware (setpoint, measurement,
P/I/D/FF gains, enabled)
- Kept only 'output' property which is actually exposed (operands 0-3)
- Changed from i*10+0..7 mapping to direct i mapping
4. flight.js (MEDIUM):
- Added missing wind parameters 46-49:
minGroundSpeed, horizontalWindSpeed, windDirection, relativeWindOffset
5. inav_constants.js (MEDIUM):
- Added missing FLIGHT_PARAM constants 46-49
- Added missing OPERATION constant 56 (OVERRIDE_MIN_GROUND_SPEED)
6. codegen.js (LOW):
- Fixed RC channel regex to support both rc[N] and rc[N].value syntax
Testing:
- Added 5 comprehensive test files (test_rc_channels, test_gvar, test_pid,
test_waypoint, test_flight)
- All fixes verified against firmware source code:
- src/main/programming/logic_condition.h
- src/main/programming/logic_condition.c
- src/main/programming/global_variables.h
- src/main/programming/pid.h
Files verified correct (no changes needed):
- override.js (all 10 operations match firmware)
- rc.js (correctly handled by codegen)
Documentation:
- API_BUGS_FOUND.md: Initial issue analysis
- VERIFICATION_SUMMARY.md: Complete verification findings
- FIXES_COMPLETE.md: Final fix summary with cross-references
Breaking Changes:
- pid[N].configure(), pid[N].setpoint, pid[N].enabled no longer available
(these never existed in firmware, only pid[N].output works)
- waypoint.latitude/longitude/altitude/bearing no longer available
(these are not exposed through logic condition system)
Firmware References:
- logic_condition.h lines 92-102 (operand types)
- logic_condition.h lines 104-155 (flight parameters)
- logic_condition.h lines 177-192 (waypoint parameters)
- logic_condition.c lines 575-669 (waypoint implementation)
- logic_condition.c lines 1078-1082 (PID implementation)
Updated test documentation to reflect fixed state and improve code quality: 1. test_flight.js: - Removed outdated 'KNOWN ISSUE' header (params 46-49 are now present) - Updated to use FLIGHT_PARAM_NAMES constant instead of Object.keys().find() - Cleaner and more performant parameter name lookup 2. test_pid.js: - Replaced 'KNOWN BUG TO DETECT' with 'FIRMWARE DESIGN' explanation - Clarified that firmware intentionally exposes only PID outputs - Removed 'bug' language as this is intentional firmware design These changes address feedback from PR review bot.
Removed gvar.js and override.js as they are not used by the transpiler. Analysis shows: - gvar.js: Completely bypassed by hardcoded gvar handling in codegen.js (lines 598-610) and action_generator.js (lines 98, 108, 118, 133, 141) - override.js: Bypassed by hardcoded operation mapping in codegen.js (lines 705-719) Both files contained only documentation that duplicated information already hardcoded in the transpiler implementation. Removing them reduces maintenance burden and eliminates confusion from misleading values (gvar.js had wrong type and operation values that were never actually used). Files modified: - Deleted: js/transpiler/api/definitions/gvar.js - Deleted: js/transpiler/api/definitions/override.js - Updated: js/transpiler/api/definitions/index.js (removed imports/exports)
The previous commit removed override.js but forgot to update the import statement in js/transpiler/index.js, causing build failures: "Could not resolve ./api/definitions/override.js" Changes: - Removed import of overrideDefinitions from index.js (line 23) - Removed overrideDefinitions from export list (line 40) Build verified successful with npm run make.
…ividual objects - Updated all tabs to replace the global TABS object with individual tab objects (e.g., loggingTab, magnetometerTab, etc.). - Changed the way active tabs are set by comparing against the tab object instead of string literals. - Exported each tab object for better modularity and maintainability. - Ensured all tab initialization and cleanup functions are correctly referenced to their respective objects. This should help to optimise the tabs and prevent some of the tabs from loading incorrectly in PWA.
This reverts commit 6735ae3.
|
Have you seen https://www.inav-config.online/ ? |
|
Could you please add a note to the public view of the online configurator at https://www.inav-config.online/ , if that is yours, telling users who happen to find it that it is under development. A user reported that he had used it. |
|
To be honest, I don't think it's a good idea to just put the unfinished version online. If you want to test it, you can find the GH pages version in my repo. By the way, more will follow soon. I still have something else to finish (info coming soon). |
|
Feature complete!
|
|
Well done. Any community testing/feedback.Sent from my Galaxy
-------- Original message --------From: Andi Kanzler ***@***.***> Date: 07/02/2026 23:20 (GMT+00:00) To: iNavFlight/inav-configurator ***@***.***> Cc: Philip ***@***.***>, Comment ***@***.***> Subject: Re: [iNavFlight/inav-configurator] Configurator as Web APP (PWA) (PR #2448) Scavanger left a comment (iNavFlight/inav-configurator#2448)
Feature complete!
Works inkl. Demo mode, (full*) SITL support and some Goodies:
Update dialog
Nice message boxes
File manager for EEprom files
= Network support (Sim interface, TCP Uarts) need a local Websocket-to-Socket proxy.
https://inav-configurator.pages.dev/
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
|
|
Sonarqube and its superlinear regexes in client-side code. 😃 |




*** Work in Progess ***
Preview,
only partiallyworking now: https://inav-configurator.pages.dev/Now fully functional (only Bugfixing now) inkl. Demo mode and SITL
Working:
To do:
- Add more bridge code to replace elctron api calls (Dialgos, load/save file, ...)- Remove update-Not- working, :SITL, inkl Simulator imterface. But needs a local Websocket-to-Socket Proxy, because Applications in the browser are only allowed to comunicate via Websockets.
Things to consider:
Any other suggestions?
Github pages will not work, because SITL webassembly needs a special HTTP-Header, wich is impossible to set here. Cloudflare pages as alternative?