Start using node-mavlink bindings#1158
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR starts replacing hard-coded MAVLink enums/bitmasks in the GCS with definitions sourced from mavlink-mappings (via a new mavlinkDef helper), as a step toward using node-mavlink-derived bindings across the frontend.
Changes:
- Introduces
mavlinkDefhelper that aggregates MAVLink dialect mappings and updates several enum/bitmask usages to reference it. - Refactors
mavlinkConstantsto derive flight modes, GPS fix types, MAV frames, and EKF status flags from MAVLink definitions instead of hand-maintained tables. - Updates UI/redux usage sites (dashboard GPS fix display, mission state display, arming/prearm checks) and removes a debug
console.log.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| gcs/src/redux/slices/droneInfoSlice.js | Switches arming/prearm checks to MAVLink definitions; updates EKF flag checks (currently inconsistent with returned flag names). |
| gcs/src/helpers/mavlinkDef.js | New helper that imports and merges MAVLink dialect mappings into a single exported object. |
| gcs/src/helpers/mavlinkConstants.js | Replaces multiple hand-coded maps with enums derived from mavlinkDef; adds formatting helper for GPS fix labels. |
| gcs/src/dashboard.jsx | Uses mavlinkDef.GpsFixType[...] directly for GPS fix display instead of GPS_FIX_TYPES. |
| gcs/src/components/dashboard/tabsSectionTabs/missionTabsSection.jsx | Uses mavlinkDef.MissionState[...] to render mission state. |
| gcs/package.json | Adds node-mavlink dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.