1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

Fix VTX power levels

Power levels are 1-5 for Tramp and 1-4 for SmartAudio, not 0-4
for both.
This commit is contained in:
Alberto García Hierro 2018-07-11 17:26:01 +01:00
parent 8e823748f4
commit f6407a9598
4 changed files with 47 additions and 29 deletions

View file

@ -1102,7 +1102,7 @@ var mspHelper = (function (gui) {
break;
case MSPCodes.MSP_VTX_CONFIG:
VTX_CONFIG.device_type = data.getUint8(offset++);
if (VTX_CONFIG.device_type != VTXDEV_UNKNOWN) {
if (VTX_CONFIG.device_type != VTX.DEV_UNKNOWN) {
VTX_CONFIG.band = data.getUint8(offset++);
VTX_CONFIG.channel = data.getUint8(offset++);
VTX_CONFIG.power = data.getUint8(offset++);
@ -1463,7 +1463,7 @@ var mspHelper = (function (gui) {
buffer.push16(((VTX_CONFIG.band - 1) * 8) + (VTX_CONFIG.channel - 1));
} else {
// This tells the firmware to ignore this value.
buffer.push16(VTX_MAX_FREQUENCY_MHZ + 1);
buffer.push16(VTX.MAX_FREQUENCY_MHZ + 1);
}
buffer.push(VTX_CONFIG.power);
// Don't enable PIT mode