-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Added MAVLink serial RX provider settings #4643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added MAVLink serial RX provider settings #4643
Conversation
WalkthroughAdds MAVLINK as a serial RX type behind an API version and build-option gate: imports Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant FC
participant API as API Version
participant Build as Firmware Options
App->>FC: getSerialRxTypes()
FC->>API: read apiVersion
alt apiVersion >= 1.47
rect #E6F4EA
Note over FC: include "MAVLINK"
FC-->>App: ["SBUS","CRSF","...","MAVLINK"]
end
else
FC-->>App: ["SBUS","CRSF","..."]
end
App->>FC: getSupportedSerialRxTypes(options)
FC->>Build: inspect options
alt options include USE_SERIALRX_MAVLINK
rect #FFF4E6
Note over FC: add "MAVLINK"
FC-->>App: ["SBUS","...","MAVLINK"]
end
else
FC-->>App: ["SBUS","..."]
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)src/js/fc.js (1)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/js/Features.js
(1 hunks)src/js/debug.js
(1 hunks)src/js/fc.js
(3 hunks)src/js/tabs/firmware_flasher.js
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
src/js/fc.js (2)
src/js/serial_backend.js (1)
options
(546-546)src/js/tabs/receiver.js (1)
supportedRxTypes
(254-254)
src/js/Features.js (1)
src/js/data_storage.js (2)
API_VERSION_1_46
(4-4)API_VERSION_1_46
(4-4)
src/js/debug.js (1)
src/js/utils/array.js (2)
addArrayElement
(65-69)replaceArrayElement
(78-83)
🔇 Additional comments (6)
src/js/debug.js (1)
858-858
: LGTM!Minor whitespace improvement that enhances code readability.
src/js/Features.js (1)
64-74
: LGTM!The TELEMETRY enablement logic correctly includes MAVLINK alongside existing protocols (CRSF, GHST, FPORT, JETI). The implementation is consistent with the established pattern and properly gated by API version checks.
src/js/tabs/firmware_flasher.js (1)
294-294
: LGTM!MAVLINK is correctly added to the list of radio protocols with built-in telemetry support. This ensures the UI properly disables telemetry protocol selection when MAVLINK is selected, consistent with other protocols like CRSF and GHST.
src/js/fc.js (3)
87-87
: LGTM!The USE_SERIALRX_MAVLINK constant is properly defined with sequential value 4109, following the established pattern for serial RX protocol build options.
807-807
: LGTM!MAVLINK is correctly added to the serial RX types list for API version 1.46+, following the same pattern as other RX type additions in this block.
856-858
: LGTM!The build option check for MAVLINK support is correctly implemented, following the established pattern for other serial RX protocols. The logic properly adds MAVLINK to supported types when the USE_SERIALRX_MAVLINK build option is present.
Co-authored-by: Mark Haslinghuis <[email protected]>
@haslinghuis |
Only BT for now |
Co-authored-by: Mark Haslinghuis <[email protected]>
What is interested. I will add mavlink debug in BBExplorer for the curent versions compatibility |
|
@demvlad when merged you can use this define - betaflight/betaflight#14693 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@demvlad this is ready ?
I am testing right now. |
The MAVLink telemetry and RX provider option are disabled in menues in my local run and in web preview too. |
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
Seems, the Configurator and Blackbox explorer use different Node.js version |
Have a PR ready - will take some time to test as official v24 LTS will be available in two weeks from now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/js/fc.js
(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/js/fc.js (2)
src/js/data_storage.js (2)
API_VERSION_1_47
(5-5)API_VERSION_1_47
(5-5)src/js/tabs/receiver.js (1)
supportedRxTypes
(254-254)
🪛 Biome (2.1.2)
src/js/fc.js
[error] 809-809: expected (
but instead found semver
Remove semver
(parse)
🪛 GitHub Actions: Deployment (PR and Push)
src/js/fc.js
[error] 809-809: Syntax error in build: 'if semver.gte(apiVersion, API_VERSION_1_47))' should be 'if (semver.gte(apiVersion, API_VERSION_1_47))'.
[error] 807-811: There was an error during the build caused by a parsing failure in fc.js (vite-plugin-pwa).
🔇 Additional comments (3)
src/js/fc.js (3)
3-3
: LGTM!The import of
API_VERSION_1_47
is correct and the constant is properly defined insrc/js/data_storage.js
.
87-87
: LGTM!The
USE_SERIALRX_MAVLINK
build option is correctly added with the next sequential value (4109).
860-862
: LGTM!The logic to check for
USE_SERIALRX_MAVLINK
build option and add "MAVLINK" to supported types follows the established pattern correctly.
|
Preview URL: https://pr4643.betaflight-app-preview.pages.dev |
The additions for MAVLink serial RX provider PR
Summary by CodeRabbit
New Features
Style