Issue 80 solved. To be improved later in trunk.

This commit is contained in:
bsongis
2011-12-08 21:43:55 +00:00
parent f25c282249
commit 934e176b47
+2 -1
View File
@@ -1490,7 +1490,7 @@ void perMain()
if (s_last_phase != phase) { if (s_last_phase != phase) {
if (s_last_phase == 255) { if (s_last_phase == 255) {
fp_act[phase] = MAX_ACT; fp_act[phase] = MAX_ACT;
} }
else { else {
if (g_model.phaseData[s_last_phase].fadeOut) { if (g_model.phaseData[s_last_phase].fadeOut) {
s_fade_flight_phases |= (1<<s_last_phase); s_fade_flight_phases |= (1<<s_last_phase);
@@ -1519,6 +1519,7 @@ void perMain()
for (uint8_t p=0; p<MAX_PHASES; p++) { for (uint8_t p=0; p<MAX_PHASES; p++) {
if (s_fade_flight_phases & (1<<p)) { if (s_fade_flight_phases & (1<<p)) {
perOut(next_chans512, p); perOut(next_chans512, p);
perOut(next_chans512, p); // TODO temporary fix for issue 80. I think th9x has a better algorithm for dealing with it!
// printf("perOut(%d - %d)=>%d\n", p, fp_act[p], next_chans512[2]); // printf("perOut(%d - %d)=>%d\n", p, fp_act[p], next_chans512[2]);
for (uint8_t i=0; i<NUM_CHNOUT; i++) { for (uint8_t i=0; i<NUM_CHNOUT; i++) {
sum_chans512[i] += (int32_t)next_chans512[i] * fp_act[p]; sum_chans512[i] += (int32_t)next_chans512[i] * fp_act[p];