diff --git a/src/open9x.cpp b/src/open9x.cpp index 5ba815037..6de5373bb 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -2979,7 +2979,6 @@ void doMixerCalculations() static ACTIVE_PHASES_TYPE s_fade_flight_phases = 0; static uint8_t s_last_phase = 255; // TODO reinit everything here when the model changes, no??? uint8_t phase = getFlightPhase(); - int32_t weight; // = 0; will be initilized below not needed here even compiler complains -> saves 6 bytes if (s_last_phase != phase) { if (s_last_phase != 255) PLAY_PHASE_OFF(s_last_phase); @@ -3004,9 +3003,18 @@ void doMixerCalculations() s_last_phase = phase; } + if (tick10ms) { +#if defined(CPUARM) + requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF; +#endif + + // the reason this needs to be done before limits is the applyLimit function; it checks for safety switches which would be not initialized otherwise + evalFunctions(); + } //endif + + int32_t weight = 0; if (s_fade_flight_phases) { memclear(sum_chans512, sizeof(sum_chans512)); - weight = 0; // unfortunately removing this instead of initialization do not save even 1 bytes of code, that's why it's here for (uint8_t p=0; p 1024*256