forked from iNavFlight/inav-configurator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Power levels are 1-5 for Tramp and 1-4 for SmartAudio, not 0-4 for both.
- Loading branch information
Showing
4 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
var VTXDEV_UNKNOWN = 0xFF; | ||
var VTX = (function() { | ||
var self = {}; | ||
|
||
var VTX_BANDS = [ | ||
{code: 1, name: 'Boscam A'}, | ||
{code: 2, name: 'Boscam B'}, | ||
{code: 3, name: 'Boscam E'}, | ||
{code: 4, name: 'Fatshark'}, | ||
{code: 5, name: 'Raceband'}, | ||
]; | ||
self.DEV_SMARTAUDIO = 3; | ||
self.DEV_TRAMP = 4; | ||
self.DEV_UNKNOWN = 0xFF; | ||
|
||
var VTX_BAND_MIN = 1; | ||
var VTX_BAND_MAX = 5; | ||
self.BANDS = [ | ||
{code: 1, name: 'Boscam A'}, | ||
{code: 2, name: 'Boscam B'}, | ||
{code: 3, name: 'Boscam E'}, | ||
{code: 4, name: 'Fatshark'}, | ||
{code: 5, name: 'Raceband'}, | ||
]; | ||
|
||
var VTX_CHANNEL_MIN = 1; | ||
var VTX_CHANNEL_MAX = 8; | ||
self.BAND_MIN = 1; | ||
self.BAND_MAX = 5; | ||
|
||
var VTX_POWER_MIN = 0; | ||
var VTX_POWER_MAX = 4; | ||
self.CHANNEL_MIN = 1; | ||
self.CHANNEL_MAX = 8; | ||
|
||
var VTX_LOW_POWER_DISARM_MIN = 0; | ||
var VTX_LOW_POWER_DISARM_MAX = 2; | ||
self.getMinPower = function(vtxDev) { | ||
return 1; | ||
} | ||
|
||
var VTX_MAX_FREQUENCY_MHZ = 5999; | ||
self.getMaxPower = function(vtxDev) { | ||
if (vtxDev == self.DEV_SMARTAUDIO) { | ||
return 4; | ||
} | ||
return 5; | ||
} | ||
|
||
self.LOW_POWER_DISARM_MIN = 0; | ||
self.LOW_POWER_DISARM_MAX = 2; | ||
|
||
self.MAX_FREQUENCY_MHZ = 5999; | ||
|
||
return self; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters