Skip to content

Commit

Permalink
Merge pull request #2206 from geoffsim/Define-Allowed-MSP-Power-Levels
Browse files Browse the repository at this point in the history
Allow a power index range of 0-4 for MSP VTX devices
  • Loading branch information
mmosca authored Nov 17, 2024
2 parents a7cb015 + a76a94c commit db9d513
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/vtx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var VTX = (function() {

self.DEV_SMARTAUDIO = 3;
self.DEV_TRAMP = 4;
self.DEV_MSP = 6;
self.DEV_UNKNOWN = 0xFF;

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

self.getMinPower = function(vtxDev) {
if (vtxDev == self.DEV_MSP) {
return 0;
}
return 1;
}

self.getMaxPower = function(vtxDev) {
if ((vtxDev == self.DEV_SMARTAUDIO) || (vtxDev == self.DEV_TRAMP)) {
return 5;
}
if (vtxDev == self.DEV_MSP) {
return 4;
}
return 3;
}
Expand Down

0 comments on commit db9d513

Please sign in to comment.