Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO Mixer Fix #8114

Merged
merged 3 commits into from Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions ROMFS/px4fmu_common/mixers/AAERTWF.main.mix
Expand Up @@ -18,13 +18,15 @@ depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000

M: 1
M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 6 -10000 -10000 0 -10000 10000

Elevator mixer
------------
Expand Down
2 changes: 2 additions & 0 deletions src/modules/px4iofirmware/mixer.cpp
Expand Up @@ -384,6 +384,8 @@ mixer_callback(uintptr_t handle,
uint8_t control_index,
float &control)
{
control = 0.0f;

if (control_group >= PX4IO_CONTROL_GROUPS) {
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/systemlib/mixer/mixer_simple.cpp
Expand Up @@ -299,7 +299,7 @@ SimpleMixer::mix(float *outputs, unsigned space)
}

for (unsigned i = 0; i < _pinfo->control_count; i++) {
float input;
float input = 0.0f;

_control_cb(_cb_handle,
_pinfo->controls[i].control_group,
Expand Down
2 changes: 2 additions & 0 deletions src/systemcmds/tests/test_mixer.cpp
Expand Up @@ -590,6 +590,8 @@ bool MixerTest::mixerTest()
static int
mixer_callback(uintptr_t handle, uint8_t control_group, uint8_t control_index, float &control)
{
control = 0.0f;

if (control_group != 0) {
return -1;
}
Expand Down