Skip to content

Commit e65dc56

Browse files
demvladhaslinghuis
andauthored
Added MAVLink serial RX provider settings (#4643)
* Added MAVLIK serial RX provider * The name of mavlink debug mode is changed Co-authored-by: Mark Haslinghuis <[email protected]> * Mavlink mode caption is removed, due of release in the separated PR Co-authored-by: Mark Haslinghuis <[email protected]> * Resolved disabled telemetries options issue Co-authored-by: Mark Haslinghuis <[email protected]> * Resolved telemetries options issue Co-authored-by: Mark Haslinghuis <[email protected]> * Resolved telemetries options issue Co-authored-by: Mark Haslinghuis <[email protected]> * Resolved telemetries options issue Co-authored-by: Mark Haslinghuis <[email protected]> * Add API_VERSION_1_47 import to fc.js * Fix syntax error in if statement for API version check * Remove unnecessary closing brace in fc.js --------- Co-authored-by: Mark Haslinghuis <[email protected]>
1 parent 114fd7e commit e65dc56

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/js/Features.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ const Features = function (config) {
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"),
7174
)
7275
) {
7376
enableTelemetry = true;

src/js/debug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ function update() {
855855

856856
delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
857857
delete DEBUG.fieldNames.GYRO_SCALED;
858-
858+
859859
DEBUG.fieldNames["MULTI_GYRO_RAW"] = DEBUG.fieldNames.DUAL_GYRO_RAW;
860860
DEBUG.fieldNames["MULTI_GYRO_DIFF"] = DEBUG.fieldNames.DUAL_GYRO_DIFF;
861861
DEBUG.fieldNames["MULTI_GYRO_SCALED"] = DEBUG.fieldNames.DUAL_GYRO_SCALED;

src/js/fc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { bit_check } from "./bit";
22
import { reactive } from "vue";
3-
import { API_VERSION_1_45, API_VERSION_1_46 } from "./data_storage";
3+
import { API_VERSION_1_45, API_VERSION_1_46, API_VERSION_1_47 } from "./data_storage";
44
import semver from "semver";
55

66
const INITIAL_CONFIG = {
@@ -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,
@@ -812,6 +813,10 @@ const FC = {
812813
serialRxTypes[0] = "NONE";
813814
serialRxTypes.push("SPEKTRUM1024");
814815
}
816+
817+
if (semver.gte(apiVersion, API_VERSION_1_47)) {
818+
serialRxTypes.push("MAVLINK");
819+
}
815820

816821
return serialRxTypes;
817822
},
@@ -859,6 +864,9 @@ const FC = {
859864
if (options.includes("USE_SERIALRX_GHST")) {
860865
supportedRxTypes.push("IRC GHOST");
861866
}
867+
if (options.includes("USE_SERIALRX_MAVLINK")) {
868+
supportedRxTypes.push("MAVLINK");
869+
}
862870
return supportedRxTypes;
863871
}
864872

0 commit comments

Comments
 (0)