Skip to content

Start using node-mavlink bindings#1158

Merged
1Blademaster merged 2 commits into
mainfrom
1092-task-start-using-node_mavlink
Apr 11, 2026
Merged

Start using node-mavlink bindings#1158
1Blademaster merged 2 commits into
mainfrom
1092-task-start-using-node_mavlink

Conversation

@1Blademaster

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 11, 2026 14:37
@1Blademaster 1Blademaster linked an issue Apr 11, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mavlinkDef helper that aggregates MAVLink dialect mappings and updates several enum/bitmask usages to reference it.
  • Refactors mavlinkConstants to 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.

Comment thread gcs/src/redux/slices/droneInfoSlice.js
Comment thread gcs/src/helpers/mavlinkConstants.js
Comment thread gcs/src/dashboard.jsx
Comment thread gcs/src/helpers/mavlinkDef.js
Comment thread gcs/package.json
@1Blademaster
1Blademaster merged commit a4bd033 into main Apr 11, 2026
5 checks passed
@1Blademaster
1Blademaster deleted the 1092-task-start-using-node_mavlink branch April 11, 2026 14:53
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.

[TASK] Start using node_mavlink

2 participants