Skip to content
8 changes: 6 additions & 2 deletions src/js/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/js/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/js/fc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions src/js/tabs/firmware_flasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down