Skip to content

Commit 71fdba5

Browse files
committed
made some changes to how the mixer chooses the mixer to use base don the override type. Not sure if it's correct or good, but I'm saving the changes in case we come back to it later
1 parent 0350086 commit 71fdba5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/mixer.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,16 @@ void Mixer::select_primary_or_secondary_mixer()
550550
mixer_to_use_.u[1] = primary_mixer_.u[1];
551551
mixer_to_use_.u[2] = primary_mixer_.u[2];
552552
} else {
553-
mixer_to_use_.u[0] = secondary_mixer_.u[0];
554-
mixer_to_use_.u[1] = secondary_mixer_.u[1];
555-
mixer_to_use_.u[2] = secondary_mixer_.u[2];
553+
mixer_to_use_.u[3] = &secondary_mixer_.u[3];
554+
mixer_to_use_.u[4] = &secondary_mixer_.u[4];
555+
mixer_to_use_.u[5] = &secondary_mixer_.u[5];
556+
557+
for (uint8_t i = 0; i < NUM_MIXER_OUTPUTS; i++) { // Go through each row of the mixing matrix
558+
if (primary_mixer_.override_type[i] == override_type_t.THR || primary_mixer_.override_type[i] == override_type_t.ATT) {
559+
mixer_to_use_.u[i] = &primary_mixer_.u[i];
560+
} else {
561+
mixer_to_use_.u[i] = &secondary_mixer_.u[i];
562+
}
556563
}
557564
}
558565

0 commit comments

Comments
 (0)