mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 01:05:15 +03:00
commit
7bf6084b5b
6 changed files with 36 additions and 0 deletions
|
@ -33,6 +33,7 @@ function MspHelper() {
|
|||
'RUNCAM_DEVICE_CONTROL': 14, // support communitate with RunCam Device
|
||||
'LIDAR_TF': 15,
|
||||
'FRSKY_OSD': 16,
|
||||
'VTX_MSP': 17,
|
||||
};
|
||||
|
||||
self.REBOOT_TYPES = {
|
||||
|
|
|
@ -58,6 +58,10 @@ ports.initialize = function (callback) {
|
|||
functionRules.push({ name: 'FRSKY_OSD', groups: ['peripherals'], maxPorts: 1 });
|
||||
}
|
||||
|
||||
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
|
||||
functionRules.push({ name: 'VTX_MSP', groups: ['peripherals'], maxPorts: 1 });
|
||||
}
|
||||
|
||||
for (const rule of functionRules) {
|
||||
rule.displayName = i18n.getMessage(`portsFunction_${rule.name}`);
|
||||
}
|
||||
|
|
|
@ -574,6 +574,10 @@ vtx.initialize = function (callback) {
|
|||
powerMinMax = {min: 1, max: 5};
|
||||
break;
|
||||
|
||||
case VtxDeviceTypes.VTXDEV_MSP:
|
||||
powerMinMax = {min: 1, max: 5};
|
||||
break;
|
||||
|
||||
case VtxDeviceTypes.VTXDEV_UNKNOWN:
|
||||
default:
|
||||
powerMinMax = {min: 0, max: 7};
|
||||
|
|
|
@ -6,6 +6,7 @@ const VtxDeviceTypes = {
|
|||
// 2 reserved
|
||||
VTXDEV_SMARTAUDIO: 3,
|
||||
VTXDEV_TRAMP: 4,
|
||||
VTXDEV_MSP: 5,
|
||||
VTXDEV_UNKNOWN: 0xFF,
|
||||
};
|
||||
|
||||
|
|
19
src/js/utils/VtxDeviceStatus/VtxMspDeviceStatus.js
Normal file
19
src/js/utils/VtxDeviceStatus/VtxMspDeviceStatus.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
class VtxDeviceStatusMsp extends VtxDeviceStatus {
|
||||
constructor(dataView)
|
||||
{
|
||||
super(dataView);
|
||||
|
||||
dataView.readU8(); // custom device status size
|
||||
|
||||
// Read other MSP VTX device parameters here
|
||||
}
|
||||
|
||||
static get staticDeviceStatusType()
|
||||
{
|
||||
return VtxDeviceTypes.VTXDEV_MSP;
|
||||
}
|
||||
}
|
||||
|
||||
vtxDeviceStatusFactory.registerVtxDeviceStatusClass(VtxDeviceStatusMsp);
|
Loading…
Add table
Add a link
Reference in a new issue