1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-15 12:25:17 +03:00

add sannity check in hot mixprofile switching, and fix cli

This commit is contained in:
shota 2022-11-11 04:47:32 +09:00
parent 23968a64d2
commit 97318e4f84
9 changed files with 107 additions and 65 deletions

View file

@ -369,10 +369,7 @@ static int logicConditionCompute(
case LOGIC_CONDITION_SET_MIXER_PROFILE:
operandA--;
if ( getConfigMixerProfile() != operandA && (operandA >= 0 && operandA < MAX_MIXER_PROFILE_COUNT)) {
bool mixerprofileChanged = false;
if (OutputProfileHotSwitch(operandA)) {
mixerprofileChanged = true;
}
bool mixerprofileChanged = OutputProfileHotSwitch(operandA);
return mixerprofileChanged;
} else {
return false;