Skip to content

Commit db9d513

Browse files
authored
Merge pull request #2206 from geoffsim/Define-Allowed-MSP-Power-Levels
Allow a power index range of 0-4 for MSP VTX devices
2 parents a7cb015 + a76a94c commit db9d513

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/vtx.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var VTX = (function() {
33

44
self.DEV_SMARTAUDIO = 3;
55
self.DEV_TRAMP = 4;
6+
self.DEV_MSP = 6;
67
self.DEV_UNKNOWN = 0xFF;
78

89
self.BANDS = [
@@ -20,12 +21,18 @@ var VTX = (function() {
2021
self.CHANNEL_MAX = 8;
2122

2223
self.getMinPower = function(vtxDev) {
24+
if (vtxDev == self.DEV_MSP) {
25+
return 0;
26+
}
2327
return 1;
2428
}
2529

2630
self.getMaxPower = function(vtxDev) {
2731
if ((vtxDev == self.DEV_SMARTAUDIO) || (vtxDev == self.DEV_TRAMP)) {
2832
return 5;
33+
}
34+
if (vtxDev == self.DEV_MSP) {
35+
return 4;
2936
}
3037
return 3;
3138
}

0 commit comments

Comments
 (0)