A couple of changes on top of projectkkglider branch

This commit is contained in:
bsongis
2014-05-19 14:52:07 +02:00
parent dffb5a7a79
commit 1a7ff9239d
3 changed files with 277 additions and 209 deletions
+11 -2
View File
@@ -524,7 +524,10 @@ uint8_t s_current_mixer_flight_mode;
void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
{
evalInputs(mode);
evalLogicalSwitches();
#if defined(CPUARM)
evalLogicalSwitches(mode==e_perout_mode_normal);
#endif
#if defined(MODULE_ALWAYS_SEND_PULSES)
checkStartupWarnings();
@@ -930,6 +933,8 @@ void evalMixes(uint8_t tick10ms)
static uint16_t delta = 0;
static ACTIVE_PHASES_TYPE s_fade_flight_phases = 0;
LS_RECURSIVE_EVALUATION_RESET();
uint8_t phase = getFlightPhase();
if (s_last_phase != phase) {
@@ -951,7 +956,9 @@ void evalMixes(uint8_t tick10ms)
fp_act[s_last_phase] = 0;
fp_act[phase] = MAX_ACT;
}
logicalSwitchesCopyState(); //push last logical switches state from old to new phase
#if defined(CPUARM)
logicalSwitchesCopyState(s_last_phase, phase); // push last logical switches state from old to new phase
#endif
}
s_last_phase = phase;
}
@@ -960,6 +967,7 @@ void evalMixes(uint8_t tick10ms)
if (s_fade_flight_phases) {
memclear(sum_chans512, sizeof(sum_chans512));
for (uint8_t p=0; p<MAX_FLIGHT_MODES; p++) {
LS_RECURSIVE_EVALUATION_RESET();
if (s_fade_flight_phases & ((ACTIVE_PHASES_TYPE)1 << p)) {
s_current_mixer_flight_mode = p;
evalFlightModeMixes(p==phase ? e_perout_mode_normal : e_perout_mode_inactive_phase, p==phase ? tick10ms : 0);
@@ -967,6 +975,7 @@ void evalMixes(uint8_t tick10ms)
sum_chans512[i] += (chans[i] >> 4) * fp_act[p];
weight += fp_act[p];
}
LS_RECURSIVE_EVALUATION_RESET();
}
assert(weight);
s_current_mixer_flight_mode = phase;