1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 06:15:14 +03:00

[VTX] Fix compilation with VTX control enabled without SAUDIO/TRAMP

This commit is contained in:
Alberto García Hierro 2020-10-04 11:38:48 +01:00
parent 44ba834948
commit 2a727dff68
4 changed files with 12 additions and 1 deletions

View file

@ -46,6 +46,10 @@
#define VTX_SETTINGS_FREQCMD
#define VTX_SETTINGS_MAX_POWER (VTX_SETTINGS_POWER_COUNT - VTX_SETTINGS_MIN_POWER + 1)
#else
#define VTX_SETTINGS_DEFAULT_POWER 0
#endif
// check value for MSP_SET_VTX_CONFIG to determine if value is encoded

View file

@ -548,6 +548,7 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t
case ADJUSTMENT_FW_MIN_THROTTLE_DOWN_PITCH_ANGLE:
applyAdjustmentU16(ADJUSTMENT_FW_MIN_THROTTLE_DOWN_PITCH_ANGLE, &mixerConfigMutable()->fwMinThrottleDownPitchAngle, delta, 0, FW_MIN_THROTTLE_DOWN_PITCH_ANGLE_MAX);
break;
#if defined(USE_VTX_SMARTAUDIO) || defined(USE_VTX_TRAMP)
case ADJUSTMENT_VTX_POWER_LEVEL:
{
vtxDeviceCapability_t vtxDeviceCapability;
@ -556,6 +557,7 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t
}
}
break;
#endif
default:
break;
};

View file

@ -3012,6 +3012,7 @@ groups:
- name: PG_VTX_SETTINGS_CONFIG
type: vtxSettingsConfig_t
headers: ["drivers/vtx_common.h", "io/vtx.h"]
condition: USE_VTX_SMARTAUDIO || USE_VTX_TRAMP
members:
- name: vtx_band
description: "Configure the VTX band. Set to zero to use `vtx_freq`. Bands: 1: A, 2: B, 3: E, 4: F, 5: Race."

View file

@ -207,6 +207,7 @@ static int logicConditionCompute(
break;
case LOGIC_CONDITION_SET_VTX_POWER_LEVEL:
#if defined(USE_VTX_SMARTAUDIO) || defined(USE_VTX_TRAMP)
if (
logicConditionValuesByType[LOGIC_CONDITION_SET_VTX_POWER_LEVEL] != operandA &&
vtxCommonGetDeviceCapability(vtxCommonDevice(), &vtxDeviceCapability)
@ -218,6 +219,9 @@ static int logicConditionCompute(
return false;
}
break;
#else
return false;
#endif
case LOGIC_CONDITION_SET_VTX_BAND:
if (