Skip to content

Commit de4914c

Browse files
committed
Added MAVLIK serial RX provider
1 parent ac661b6 commit de4914c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

src/js/Features.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ const Features = function (config) {
6161
}
6262
}
6363

64-
// Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT, JETI
64+
// Add TELEMETRY feature if any of the following protocols are used: CRSF, GHST, FPORT, JETI, MAVLINK
6565
if (semver.gte(config.apiVersion, API_VERSION_1_46)) {
6666
let enableTelemetry = false;
6767
if (
6868
config.buildOptions.some(
6969
(opt) =>
70-
opt.includes("CRSF") || opt.includes("GHST") || opt.includes("FPORT") || opt.includes("JETI"),
70+
opt.includes("CRSF") ||
71+
opt.includes("GHST") ||
72+
opt.includes("FPORT") ||
73+
opt.includes("JETI") ||
74+
opt.includes("MAVLINK"),
7175
)
7276
) {
7377
enableTelemetry = true;

src/js/debug.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,13 +848,14 @@ function update() {
848848
addArrayElement(DEBUG.modes, "AUTOPILOT_POSITION");
849849
addArrayElement(DEBUG.modes, "CHIRP");
850850
addArrayElement(DEBUG.modes, "FLASH_TEST_PRBS");
851+
addArrayElement(DEBUG.modes, "MAVLINK");
851852
replaceArrayElement(DEBUG.modes, "DUAL_GYRO_RAW", "MULTI_GYRO_RAW");
852853
replaceArrayElement(DEBUG.modes, "DUAL_GYRO_DIFF", "MULTI_GYRO_DIFF");
853854
replaceArrayElement(DEBUG.modes, "DUAL_GYRO_SCALED", "MULTI_GYRO_SCALED");
854855

855856
delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
856857
delete DEBUG.fieldNames.GYRO_SCALED;
857-
858+
858859
DEBUG.fieldNames["MULTI_GYRO_RAW"] = DEBUG.fieldNames.DUAL_GYRO_RAW;
859860
DEBUG.fieldNames["MULTI_GYRO_DIFF"] = DEBUG.fieldNames.DUAL_GYRO_DIFF;
860861
DEBUG.fieldNames["MULTI_GYRO_SCALED"] = DEBUG.fieldNames.DUAL_GYRO_SCALED;

src/js/fc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const FIRMWARE_BUILD_OPTIONS = {
8484
USE_SERIALRX_SUMD: 4106,
8585
USE_SERIALRX_SUMH: 4107,
8686
USE_SERIALRX_XBUS: 4108,
87+
USE_SERIALRX_MAVLINK: 4109,
8788

8889
// Motor Protocols
8990
USE_BRUSHED: 8230,
@@ -803,6 +804,7 @@ const FC = {
803804
// Default to NONE and move SPEKTRUM1024 to the end (firmware PR #12500)
804805
serialRxTypes[0] = "NONE";
805806
serialRxTypes.push("SPEKTRUM1024");
807+
serialRxTypes.push("MAVLINK");
806808
}
807809

808810
return serialRxTypes;
@@ -851,6 +853,9 @@ const FC = {
851853
if (options.includes("USE_SERIALRX_GHST")) {
852854
supportedRxTypes.push("IRC GHOST");
853855
}
856+
if (options.includes("USE_SERIALRX_MAVLINK")) {
857+
supportedRxTypes.push("MAVLINK");
858+
}
854859
return supportedRxTypes;
855860
}
856861

src/js/tabs/firmware_flasher.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ firmware_flasher.initialize = async function (callback) {
291291
"USE_SERIALRX_FPORT",
292292
"USE_SERIALRX_GHST",
293293
"USE_SERIALRX_JETIEXBUS",
294+
"USE_SERIALRX_MAVLINK",
294295
].includes(radioProtocol);
295296

296297
$('select[name="telemetryProtocols"]').attr("disabled", hasTelemetryEnabledByDefault);

0 commit comments

Comments
 (0)