A little bit expo (x^2) in repeat frequency

This commit is contained in:
Bertrand Songis
2014-02-18 16:28:25 +01:00
parent 0157eebf7c
commit 8023606223
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -163,8 +163,7 @@ void varioWakeup()
int varioBeepFreq, varioBeepTime;
if (verticalSpeed > varioCenterMin) {
varioBeepFreq = VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch*10) + (((VARIO_FREQUENCY_RANGE+(g_eeGeneral.varioRange*10)) * verticalSpeed) / varioMax);
int period = VARIO_REPEAT_ZERO + (g_eeGeneral.varioRepeat*10);
period -= ((period-VARIO_REPEAT_MAX) * verticalSpeed) / varioMax;
int period = VARIO_REPEAT_MAX + ((VARIO_REPEAT_ZERO+(g_eeGeneral.varioRepeat*10)-VARIO_REPEAT_MAX) * verticalSpeed * verticalSpeed) / (varioMax * varioMax);
if (verticalSpeed >= varioCenterMax || varioCenterMin == varioCenterMax)
varioBeepTime = period / 4;
else