From f4abd1c3b7e7ad72259e6c753f34bda1024ddf76 Mon Sep 17 00:00:00 2001 From: Geoff Sim Date: Fri, 20 Sep 2024 15:36:58 +0100 Subject: [PATCH] Allow FC Logic to specifiy a VTX power level of 0. --- src/main/programming/logic_condition.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/programming/logic_condition.c b/src/main/programming/logic_condition.c index 9ca587ad9c..6501ab527c 100644 --- a/src/main/programming/logic_condition.c +++ b/src/main/programming/logic_condition.c @@ -301,8 +301,7 @@ static int logicConditionCompute( if (vtxCommonGetDeviceCapability(vtxCommonDevice(), &vtxDeviceCapability)) { uint8_t power = logicConditionValuesByType[LOGIC_CONDITION_SET_VTX_POWER_LEVEL]; if (power != operandA || power != vtxSettingsConfig()->power) { - // HDZERO VTX max power+1 is 0mW. - power = constrain(operandA, VTX_SETTINGS_MIN_POWER, vtxDeviceCapability.powerCount+1); + power = constrain(operandA, 0, vtxDeviceCapability.powerCount); // Allow a power level of 0 logicConditionValuesByType[LOGIC_CONDITION_SET_VTX_POWER_LEVEL] = power; vtxSettingsConfigMutable()->power = power; return power;