[all] Warning removed. Saves flash on stock.
This commit is contained in:
+10
-11
@@ -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<MAX_PHASES; p++) {
|
||||
if (s_fade_flight_phases & ((ACTIVE_PHASES_TYPE)1 << p)) {
|
||||
s_perout_flight_phase = p;
|
||||
@@ -3024,15 +3032,6 @@ void doMixerCalculations()
|
||||
perOut(e_perout_mode_normal, tick10ms);
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
//========== LIMITS ===============
|
||||
for (uint8_t i=0; i<NUM_CHNOUT; i++) {
|
||||
// chans[i] holds data from mixer. chans[i] = v*weight => 1024*256
|
||||
|
||||
Reference in New Issue
Block a user