Skip to content

Commit

Permalink
Allow FC Logic to specifiy a VTX power level of 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffsim committed Sep 20, 2024
1 parent defd283 commit f4abd1c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/programming/logic_condition.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f4abd1c

Please sign in to comment.