diff --git a/src/open9x.cpp b/src/open9x.cpp index a94a46e28..fb6653b83 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -1400,16 +1400,12 @@ void perMain() tick10ms = (tmr10ms != lastTMR); lastTMR = tmr10ms; -#define MAX_ACT 0xffff +#define MAX_ACT 0xffff + static int16_t s_fp_chans[NUM_CHNOUT]; static uint16_t fp_act[MAX_PHASES] = {0}; static uint16_t delta = 0; static uint8_t s_fade_flight_phases = 0; static uint8_t s_last_phase = 255; -#ifdef PCBV4 - static int16_t s_fp_chans[NUM_CHNOUT][MAX_PHASES]; -#else - static int8_t s_fp_chans[NUM_CHNOUT][MAX_PHASES]; -#endif uint8_t phase = getFlightPhase(); if (s_last_phase != phase) { @@ -1418,9 +1414,13 @@ void perMain() } else { uint8_t fadeTime = max(g_model.phaseData[s_last_phase].fadeOut, g_model.phaseData[phase].fadeIn); - if (fadeTime) { + if (fadeTime) { + if (!s_fade_flight_phases) { + for (uint8_t i=0; i> 2; -#else - s_fp_chans[i][p] = chans[i] >> 10; -#endif - sum_chans512[i] += (int32_t)next_chans512[i] * fp_act[p]; - } + for (uint8_t i=0; i