Merge pull request #738 from opentx/bsongis/vario_improvements

Bsongis/vario improvements
This commit is contained in:
Andre Bernet
2014-02-26 10:18:41 +01:00
14 changed files with 582 additions and 364 deletions
+6 -7
View File
@@ -2663,7 +2663,7 @@ uint8_t checkTrim(uint8_t event)
thro = (idx==THR_STICK && g_model.thrTrim);
#endif
int8_t trimInc = g_model.trimInc + 1;
int8_t v = (trimInc==-1) ? min(32, abs(before)/4+1) : (1 << trimInc);
int8_t v = (trimInc==-1) ? min(32, abs(before)/4+1) : (1 << trimInc); // TODO flash saving if (trimInc < 0)
if (thro) v = 4; // if throttle trim and trim trottle then step=4
int16_t after = (k&1) ? before + v : before - v; // positive = k&1
#if defined(CPUARM)
@@ -3601,11 +3601,6 @@ void evalFunctions()
lastFunctionTime[i] = 0;
#if defined(CPUARM)
fnSwitchDuration[i] = 0;
#endif
#if defined(CPUARM) && defined(SDCARD)
if (CFN_FUNC(sd) == FUNC_BACKGND_MUSIC && isFunctionActive(FUNCTION_BACKGND_MUSIC)) {
STOP_PLAY(i+1);
}
#endif
}
}
@@ -4671,7 +4666,7 @@ void perMain()
checkBacklight();
#if defined(FRSKY) || defined(MAVLINK)
#if !defined(CPUARM) && (defined(FRSKY) || defined(MAVLINK))
telemetryWakeup();
#endif
@@ -5329,6 +5324,10 @@ void mixerTask(void * pdata)
CoLeaveMutexSection(mixerMutex);
if (tick10ms) checkTrims();
#if defined(FRSKY) || defined(MAVLINK)
telemetryWakeup();
#endif
if (heartbeat == HEART_WDT_CHECK) {
wdt_reset();
heartbeat = 0;