1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Fix continuous beeping when rate profile selection is used.

This commit is contained in:
Dominic Clifton 2014-12-20 09:58:41 +00:00
parent ec5929d278
commit 705e64d91e

View file

@ -421,16 +421,22 @@ void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t adjustm
void changeControlRateProfile(uint8_t profileIndex); void changeControlRateProfile(uint8_t profileIndex);
void applySelectAdjustment(uint8_t adjustmentFunction, uint8_t position) { void applySelectAdjustment(uint8_t adjustmentFunction, uint8_t position)
{
bool applied = false;
queueConfirmationBeep(position + 1);
switch(adjustmentFunction) { switch(adjustmentFunction) {
case ADJUSTMENT_RATE_PROFILE: case ADJUSTMENT_RATE_PROFILE:
if (getCurrentControlRateProfile() != position) { if (getCurrentControlRateProfile() != position) {
changeControlRateProfile(position); changeControlRateProfile(position);
applied = true;
} }
break; break;
} }
if (applied) {
queueConfirmationBeep(position + 1);
}
} }
#define RESET_FREQUENCY_2HZ (1000 / 2) #define RESET_FREQUENCY_2HZ (1000 / 2)