From de4914c66a56fb2810d52e96616a982279f301f5 Mon Sep 17 00:00:00 2001 From: demvlad Date: Sun, 28 Sep 2025 23:59:03 +0300 Subject: [PATCH 01/10] Added MAVLIK serial RX provider --- src/js/Features.js | 8 ++++++-- src/js/debug.js | 3 ++- src/js/fc.js | 5 +++++ src/js/tabs/firmware_flasher.js | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/js/Features.js b/src/js/Features.js index 4fc0208c6b..fa1bcd34f4 100644 --- a/src/js/Features.js +++ b/src/js/Features.js @@ -61,13 +61,17 @@ const Features = function (config) { } } - // Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT, JETI + // Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT, JETI, MAVLINK if (semver.gte(config.apiVersion, API_VERSION_1_46)) { let enableTelemetry = false; if ( config.buildOptions.some( (opt) => - opt.includes("CRSF") || opt.includes("GHST") || opt.includes("FPORT") || opt.includes("JETI"), + opt.includes("CRSF") || + opt.includes("GHST") || + opt.includes("FPORT") || + opt.includes("JETI") || + opt.includes("MAVLINK"), ) ) { enableTelemetry = true; diff --git a/src/js/debug.js b/src/js/debug.js index 29641d1a82..dda803ea09 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -848,13 +848,14 @@ function update() { addArrayElement(DEBUG.modes, "AUTOPILOT_POSITION"); addArrayElement(DEBUG.modes, "CHIRP"); addArrayElement(DEBUG.modes, "FLASH_TEST_PRBS"); + addArrayElement(DEBUG.modes, "MAVLINK"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_RAW", "MULTI_GYRO_RAW"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_DIFF", "MULTI_GYRO_DIFF"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_SCALED", "MULTI_GYRO_SCALED"); delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID; delete DEBUG.fieldNames.GYRO_SCALED; - + DEBUG.fieldNames["MULTI_GYRO_RAW"] = DEBUG.fieldNames.DUAL_GYRO_RAW; DEBUG.fieldNames["MULTI_GYRO_DIFF"] = DEBUG.fieldNames.DUAL_GYRO_DIFF; DEBUG.fieldNames["MULTI_GYRO_SCALED"] = DEBUG.fieldNames.DUAL_GYRO_SCALED; diff --git a/src/js/fc.js b/src/js/fc.js index 35e9e044a5..2db8a66fd5 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -84,6 +84,7 @@ const FIRMWARE_BUILD_OPTIONS = { USE_SERIALRX_SUMD: 4106, USE_SERIALRX_SUMH: 4107, USE_SERIALRX_XBUS: 4108, + USE_SERIALRX_MAVLINK: 4109, // Motor Protocols USE_BRUSHED: 8230, @@ -803,6 +804,7 @@ const FC = { // Default to NONE and move SPEKTRUM1024 to the end (firmware PR #12500) serialRxTypes[0] = "NONE"; serialRxTypes.push("SPEKTRUM1024"); + serialRxTypes.push("MAVLINK"); } return serialRxTypes; @@ -851,6 +853,9 @@ const FC = { if (options.includes("USE_SERIALRX_GHST")) { supportedRxTypes.push("IRC GHOST"); } + if (options.includes("USE_SERIALRX_MAVLINK")) { + supportedRxTypes.push("MAVLINK"); + } return supportedRxTypes; } diff --git a/src/js/tabs/firmware_flasher.js b/src/js/tabs/firmware_flasher.js index a42f857ea7..267ed7bcfb 100644 --- a/src/js/tabs/firmware_flasher.js +++ b/src/js/tabs/firmware_flasher.js @@ -291,6 +291,7 @@ firmware_flasher.initialize = async function (callback) { "USE_SERIALRX_FPORT", "USE_SERIALRX_GHST", "USE_SERIALRX_JETIEXBUS", + "USE_SERIALRX_MAVLINK", ].includes(radioProtocol); $('select[name="telemetryProtocols"]').attr("disabled", hasTelemetryEnabledByDefault); From 51ae317c32bd151ab91d92868395fa51dc47c14e Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Thu, 2 Oct 2025 23:41:47 +0300 Subject: [PATCH 02/10] The name of mavlink debug mode is changed Co-authored-by: Mark Haslinghuis --- src/js/debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/debug.js b/src/js/debug.js index dda803ea09..26a957e12c 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -848,7 +848,7 @@ function update() { addArrayElement(DEBUG.modes, "AUTOPILOT_POSITION"); addArrayElement(DEBUG.modes, "CHIRP"); addArrayElement(DEBUG.modes, "FLASH_TEST_PRBS"); - addArrayElement(DEBUG.modes, "MAVLINK"); + addArrayElement(DEBUG.modes, "MAVLINK_TELEMETRY"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_RAW", "MULTI_GYRO_RAW"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_DIFF", "MULTI_GYRO_DIFF"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_SCALED", "MULTI_GYRO_SCALED"); From f512b7f9ba9a9b914656c1cac14e53f0a3c83bd1 Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Fri, 3 Oct 2025 06:02:29 +0300 Subject: [PATCH 03/10] Mavlink mode caption is removed, due of release in the separated PR Co-authored-by: Mark Haslinghuis --- src/js/debug.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/debug.js b/src/js/debug.js index 26a957e12c..5609ebd82b 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -848,7 +848,6 @@ function update() { addArrayElement(DEBUG.modes, "AUTOPILOT_POSITION"); addArrayElement(DEBUG.modes, "CHIRP"); addArrayElement(DEBUG.modes, "FLASH_TEST_PRBS"); - addArrayElement(DEBUG.modes, "MAVLINK_TELEMETRY"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_RAW", "MULTI_GYRO_RAW"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_DIFF", "MULTI_GYRO_DIFF"); replaceArrayElement(DEBUG.modes, "DUAL_GYRO_SCALED", "MULTI_GYRO_SCALED"); From b15bd388da1496c4be724c9ae6f75e8f665b2e4a Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Sat, 4 Oct 2025 21:49:05 +0300 Subject: [PATCH 04/10] Resolved disabled telemetries options issue Co-authored-by: Mark Haslinghuis --- src/js/tabs/firmware_flasher.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/tabs/firmware_flasher.js b/src/js/tabs/firmware_flasher.js index 267ed7bcfb..a42f857ea7 100644 --- a/src/js/tabs/firmware_flasher.js +++ b/src/js/tabs/firmware_flasher.js @@ -291,7 +291,6 @@ firmware_flasher.initialize = async function (callback) { "USE_SERIALRX_FPORT", "USE_SERIALRX_GHST", "USE_SERIALRX_JETIEXBUS", - "USE_SERIALRX_MAVLINK", ].includes(radioProtocol); $('select[name="telemetryProtocols"]').attr("disabled", hasTelemetryEnabledByDefault); From 6817db5d11743a5d69e3f976b3a0040bfc866389 Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Sat, 4 Oct 2025 21:50:10 +0300 Subject: [PATCH 05/10] Resolved telemetries options issue Co-authored-by: Mark Haslinghuis --- src/js/fc.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/fc.js b/src/js/fc.js index 2db8a66fd5..e530e22aee 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -804,8 +804,12 @@ const FC = { // Default to NONE and move SPEKTRUM1024 to the end (firmware PR #12500) serialRxTypes[0] = "NONE"; serialRxTypes.push("SPEKTRUM1024"); + } + + if semver.gte(apiVersion, API_VERSION_1_47)) { serialRxTypes.push("MAVLINK"); } +} return serialRxTypes; }, From 24c1afd3e8388873dec8266ad9a82ba3218b825a Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Sat, 4 Oct 2025 21:50:28 +0300 Subject: [PATCH 06/10] Resolved telemetries options issue Co-authored-by: Mark Haslinghuis --- src/js/Features.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/Features.js b/src/js/Features.js index fa1bcd34f4..5003028461 100644 --- a/src/js/Features.js +++ b/src/js/Features.js @@ -70,8 +70,7 @@ const Features = function (config) { opt.includes("CRSF") || opt.includes("GHST") || opt.includes("FPORT") || - opt.includes("JETI") || - opt.includes("MAVLINK"), + opt.includes("JETI"), ) ) { enableTelemetry = true; From 7d440289c2db0e89dd4f946321212232a459c80f Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Sat, 4 Oct 2025 21:50:46 +0300 Subject: [PATCH 07/10] Resolved telemetries options issue Co-authored-by: Mark Haslinghuis --- src/js/Features.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/Features.js b/src/js/Features.js index 5003028461..d32613bffb 100644 --- a/src/js/Features.js +++ b/src/js/Features.js @@ -61,7 +61,7 @@ const Features = function (config) { } } - // Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT, JETI, MAVLINK + // Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT, JETI if (semver.gte(config.apiVersion, API_VERSION_1_46)) { let enableTelemetry = false; if ( From 9f56a1e47ff61c39159ae2bbda796066cc6cdf89 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sat, 4 Oct 2025 20:55:29 +0200 Subject: [PATCH 08/10] Add API_VERSION_1_47 import to fc.js --- src/js/fc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/fc.js b/src/js/fc.js index e530e22aee..0ac61c6809 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -1,6 +1,6 @@ import { bit_check } from "./bit"; import { reactive } from "vue"; -import { API_VERSION_1_45, API_VERSION_1_46 } from "./data_storage"; +import { API_VERSION_1_45, API_VERSION_1_46, API_VERSION_1_47 } from "./data_storage"; import semver from "semver"; const INITIAL_CONFIG = { From 81cb2615e7b2a64ad7370f998b77e30409a3c3ae Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sat, 4 Oct 2025 20:59:04 +0200 Subject: [PATCH 09/10] Fix syntax error in if statement for API version check --- src/js/fc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/fc.js b/src/js/fc.js index 0ac61c6809..d03db4c41a 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -806,7 +806,7 @@ const FC = { serialRxTypes.push("SPEKTRUM1024"); } - if semver.gte(apiVersion, API_VERSION_1_47)) { + if (semver.gte(apiVersion, API_VERSION_1_47)) { serialRxTypes.push("MAVLINK"); } } From c75f07d493a80dcc2fd88e26a4fdad2a70c5ef08 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Sat, 4 Oct 2025 21:01:26 +0200 Subject: [PATCH 10/10] Remove unnecessary closing brace in fc.js --- src/js/fc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/fc.js b/src/js/fc.js index d03db4c41a..73adac1bbf 100644 --- a/src/js/fc.js +++ b/src/js/fc.js @@ -809,7 +809,6 @@ const FC = { if (semver.gte(apiVersion, API_VERSION_1_47)) { serialRxTypes.push("MAVLINK"); } -} return serialRxTypes; },