Loading a custom mixer file

Hello! I’ve briefly managed to set up a custom mixer file according to the documentation on “System Startup”. However, after rebooting, the PX4 does not connect properly to QGC, and I have to remove my mixer file from the SD card before it connects.

Hi @jpeels, this behaviour is not correct.

Is your mixer file correct? Can’t you put him here? You can write more information about where your file is stored, etc.

I simply wrote the mixer in a text file, then changed the extension to .main.mix. I then stored the mixer on the SD card, creating an /etc/ and /mixers/ folder. I also made a config.txt file to set the mixer to this one.

I’ve written the mixer down below. It’s meant to overwrite the mixer with the same name for an existing rover airframe.

Differential Drive Boat - adapted version of generic_diff_rover.main.mix

This mixer is suitable for controlling any differential-thrust boat.
It outputs to channels 1,2 (left thrusters) and 3,4 (right thrusters) (which on the PX IO board are channels 1 and 2)

GHRJ: I’ve made adjustments to this mixer to simply split the two RC inputs for this mixer from one stick to two, so it’s more comfortable to use

Inputs to the mixer come from channel group 0 (vehicle attitude), channels 1 (roll), and 4 (thrust).
Note that the original settings are using channels 3 (yaw) and 4 (thrust).

Throttle of left thruster 1 on Output 1

M: 2
S: 0 0 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

Throttle of left thruster 2 on Output 2

S: 0 0 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

Throttle of right thruster 3 on Output 3

M: 2
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

Throttle of right thruster 4 on Output 4

M: 2
S: 0 0 -10000 -10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

Is there an error log in the root of the SD card?

At the very least, after a quick look, I see a bug that the second output is missing the key character of the Summing mixer (M:)

M: 2 is missing there.

And the other thing is that there is a missing O: configuration. It should be in every group with S:.

So the second group should look like this:

M: 2
O: 10000 10000 0 -10000 10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

AH! Such a silly mistake. Although I believe I read on the documentation that the Output O line can be omitted as that’s its default setting.

Inputting the missing M:2 mixer has fixed my problem! Thanks so much

EDIT: Actually, this has still not solved the problem. I’m starting to think it might not be because of the mixer? When I initially power the pixhawk via USB, the FMU lights turn on, then off, then solidly on. Not sure why it does this

Figured out the problem! I’ve been making edits in the mixer file and tagging comments by my initials, followed by a :
e.g "GJ: changed this mixer "

Because : uses the same syntax as mixers, this was screwing up my file.

Removed any comments with “:”. Now everything is fine!