Skip to content

Commit 92248f6

Browse files
committed
Added manticore v1 & v2
1 parent e62fa71 commit 92248f6

File tree

4 files changed

+115
-2
lines changed

4 files changed

+115
-2
lines changed

locales/en/messages.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,6 +1937,12 @@
19371937
"portsFunction_VTX_MSP": {
19381938
"message": "VTX (MSP + Displayport)"
19391939
},
1940+
"portsFunction_MANTICORE_INITIATOR_V1": {
1941+
"message": "Manticore V1"
1942+
},
1943+
"portsFunction_MANTICORE_INITIATOR_V2": {
1944+
"message": "Manticore V2"
1945+
},
19401946
"pidTuningProfileOption": {
19411947
"message": "Profile $1"
19421948
},
@@ -7745,6 +7751,15 @@
77457751
"message": "Sonar",
77467752
"description": "Displays distance from sonar sensor in cm"
77477753
},
7754+
"osdTextElementManticoreV1": {
7755+
"message": "Manticore V1"
7756+
},
7757+
"osdTextElementManticoreV2": {
7758+
"message": "Manticore V2"
7759+
},
7760+
"osdTextElementManticoreV2Logger": {
7761+
"message": "Manticore V2 Logger"
7762+
},
77487763
"osdDescElementLidar": {
77497764
"message": "$t(osdTextElementLidar.message)",
77507765
"description": "Don't translate!!!"

src/js/msp/MSPHelper.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ function MspHelper() {
6767
LIDAR_TF: 15,
6868
FRSKY_OSD: 16,
6969
VTX_MSP: 17,
70+
GIMBAL: 18,
71+
KOLIBRI_INITIATOR: 19,
72+
DETONATOR: 20,
73+
MANTICORE_INITIATOR_V1: 21,
74+
MANTICORE_INITIATOR_V2: 22,
7075
};
7176

7277
self.REBOOT_TYPES = {

src/js/tabs/osd.js

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,78 @@ OSD.loadDisplayFields = function () {
17731773
positionable: true,
17741774
preview: "RF:---",
17751775
},
1776+
MB_OSD_STATS: {
1777+
name: "MB_OSD_STATS",
1778+
text: "MB_OSD_STATS",
1779+
desc: "MB_OSD_STATS",
1780+
defaultPosition: -1,
1781+
draw_order: 610,
1782+
positionable: true,
1783+
preview: "MB_OSD_STATS",
1784+
},
1785+
MB_VRX_RSSI: {
1786+
name: "MB_VRX_RSSI",
1787+
text: "MB_VRX_RSSI",
1788+
desc: "MB_VRX_RSSI",
1789+
defaultPosition: -1,
1790+
draw_order: 610,
1791+
positionable: true,
1792+
preview: "MB_VRX_RSSI",
1793+
},
1794+
MB_INIK_INITIATOR: {
1795+
name: "MB_INIK_INITIATOR",
1796+
text: "MB_INIK_INITIATOR",
1797+
desc: "MB_INIK_INITIATOR",
1798+
defaultPosition: -1,
1799+
draw_order: 610,
1800+
positionable: true,
1801+
preview: "MB_INIK_INITIATOR",
1802+
},
1803+
MB_USE_KOLIBRI_INITIATOR_OSD: {
1804+
name: "MB_USE_KOLIBRI_INITIATOR_OSD",
1805+
text: "MB_USE_KOLIBRI_INITIATOR_OSD",
1806+
desc: "MB_USE_KOLIBRI_INITIATOR_OSD",
1807+
defaultPosition: -1,
1808+
draw_order: 610,
1809+
positionable: true,
1810+
preview: "MB_USE_KOLIBRI_INITIATOR_OSD",
1811+
},
1812+
MB_LASERDETON_INITIATOR_OSD: {
1813+
name: "MB_LASERDETON_INITIATOR_OSD",
1814+
text: "MB_LASERDETON_INITIATOR_OSD",
1815+
desc: "MB_LASERDETON_INITIATOR_OSD",
1816+
defaultPosition: -1,
1817+
draw_order: 610,
1818+
positionable: true,
1819+
preview: "MB_LASERDETON_INITIATOR_OSD",
1820+
},
1821+
MANTICORE_INITIATOR_V1: {
1822+
name: "MANTICORE_INITIATOR_V1",
1823+
text: "osdTextElementManticoreV1",
1824+
desc: "osdTextElementManticoreV1",
1825+
defaultPosition: -1,
1826+
draw_order: 1075,
1827+
positionable: true,
1828+
preview: "MANTICORE V1",
1829+
},
1830+
MANTICORE_INITIATOR_V2: {
1831+
name: "MANTICORE_INITIATOR_V2",
1832+
text: "osdTextElementManticoreV2",
1833+
desc: "osdTextElementManticoreV2",
1834+
defaultPosition: -1,
1835+
draw_order: 1075,
1836+
positionable: true,
1837+
preview: "MANTICORE V2",
1838+
},
1839+
MANTICORE_INITIATOR_LOGGER_V2: {
1840+
name: "MANTICORE_INITIATOR_LOGGER_V2",
1841+
text: "osdTextElementManticoreV2Logger",
1842+
desc: "osdTextElementManticoreV2Logger",
1843+
defaultPosition: -1,
1844+
draw_order: 1076,
1845+
positionable: true,
1846+
preview: "MANTICORE V2 LOGGER",
1847+
},
17761848
};
17771849

17781850
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
@@ -2220,6 +2292,14 @@ OSD.chooseFields = function () {
22202292
F.CUSTOM_MSG2,
22212293
F.CUSTOM_MSG3,
22222294
F.OSD_LIDAR_DIST,
2295+
F.MB_OSD_STATS,
2296+
F.MB_VRX_RSSI,
2297+
F.MB_INIK_INITIATOR,
2298+
F.MB_USE_KOLIBRI_INITIATOR_OSD,
2299+
F.MB_LASERDETON_INITIATOR_OSD,
2300+
F.MANTICORE_INITIATOR_V1,
2301+
F.MANTICORE_INITIATOR_V2,
2302+
F.MANTICORE_INITIATOR_LOGGER_V2,
22232303
]);
22242304
}
22252305
// Choose statistic fields
@@ -3544,7 +3624,11 @@ osd.initialize = function (callback) {
35443624
OSD.msp.decode(info);
35453625
}
35463626

3547-
if (OSD.data.state.haveMax7456FontDeviceConfigured && !OSD.data.state.isMax7456FontDeviceDetected && !OSD.data.state.haveAirbotTheiaOsdDevice) {
3627+
if (
3628+
OSD.data.state.haveMax7456FontDeviceConfigured &&
3629+
!OSD.data.state.isMax7456FontDeviceDetected &&
3630+
!OSD.data.state.haveAirbotTheiaOsdDevice
3631+
) {
35483632
$(".noOsdChipDetect").show();
35493633
}
35503634

@@ -3820,7 +3904,10 @@ osd.initialize = function (callback) {
38203904
$(".requires-max7456").hide();
38213905
}
38223906

3823-
if (!OSD.data.state.isMax7456FontDeviceDetected || (!OSD.data.state.haveMax7456FontDeviceConfigured && !OSD.data.state.haveAirbotTheiaOsdDevice)) {
3907+
if (
3908+
!OSD.data.state.isMax7456FontDeviceDetected ||
3909+
(!OSD.data.state.haveMax7456FontDeviceConfigured && !OSD.data.state.haveAirbotTheiaOsdDevice)
3910+
) {
38243911
$(".requires-max7456-font-device-detected").addClass("disabled");
38253912
}
38263913

src/js/tabs/ports.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ ports.initialize = function (callback) {
7373
functionRules.push({ name: "VTX_MSP", groups: ["peripherals"], sharableWith: ["msp"], maxPorts: 1 });
7474
}
7575

76+
functionRules.push({ name: "GIMBAL", groups: ["peripherals"], maxPorts: 1 });
77+
functionRules.push({ name: "KOLIBRI_INITIATOR", groups: ["peripherals"], maxPorts: 1 });
78+
functionRules.push({ name: "DETONATOR", groups: ["peripherals"], maxPorts: 1 });
79+
functionRules.push({ name: "MANTICORE_INITIATOR_V1", groups: ["peripherals"], sharableWith: ["msp"], maxPorts: 1 });
80+
functionRules.push({ name: "MANTICORE_INITIATOR_V2", groups: ["peripherals"], sharableWith: ["msp"], maxPorts: 1 });
81+
7682
for (const rule of functionRules) {
7783
rule.displayName = i18n.getMessage(`portsFunction_${rule.name}`);
7884
}

0 commit comments

Comments
 (0)