Costum mixing files do not seem to work after safety button/disabling CBRK_IO_SAFETY

Hello everyone,

In the last week I generated a custom mixing file for a fixed wing airplane. It is somewhat comparable with the Bormatec Maja, but I got some extra features/control surfaces which I wanna control. Thus, I extended the mixing file a little bit. Generally, the mixing file is working exactly how I want it to work. However, when a change the CBRK_IO_SAFETY check (I want to disable this), the Pixhawk 2 only lets me control channel 1 till 5 of the main channels. When I change the CBRK_IO_SAFETY check back to zero, and power cycle the pixhawk it works again. Only when I just reboot the pixhawk via Qgroundcontrol it still doesnt work.

I did some more digging and I could isolate the line of code, which causes the problem. So in the file px4io.cpp on line 866-869 there is a check and the following function is called.


This seems affect my mixing and disable main 6-7-8 channels. I check the status of the channels with the “pwm info” command. So my definition of not working is when the channels shows a pwm of 0 us, while working means anywhere between 1000 and 2000 us (depending on the configuration). I have uploaded to graphs in the attachement, which prove this output.

So my question is: Is this a small mistake in the code? Because in my opinion this should not happen. How can I resolve this problem? Since I kind of want to disable the IO safety. And why does it need a power cycle when changing the parameter back to the default value.

Moreover, I did try increasing the following value:
line 42: #define PX4IO_MAX_MIXER_LENGHT 230
However, this had no success. And the px4io status and pwm info behaviour is exactly the same. Also the mixing file is super simple. Just having a single mixer for a single channel, but I do use every channel (main and aux).

Also when I try and oversimplify the problem by just changing some mapping in the Bormatec Maja, while leaving everything else exactly the same, it still does not work. Right now I am only changing the last three mixers in the AAERTWF mixing file. Basically, adding an extra elevator and a wheel steerring (thus rudder). In principle, the maja airframe uses 8 main channels, thus I should be able to do that too.

If someone needs anymore information regarding this problem feel free to ask.

Any help is much appreciated!

Kind regards,

Oke found the problem myself. The problem is related to this forum issue:

Basically the memory of the IO chip is limited and therefore you cant control 8 main channels separately (Maybe this can be solved in a smart way in the software, but it is also a hardware problem). Quite a limitation in my opinion. You still have the 6 FMU (AUX) ports, which you can use to control the airplane. However, this is not preferred because when the FMU fails these cannot be controller any more. Also I want to use all 14 pwm ports to use the full capability of my airplanes and to maximize my reliability.

FYI, the parameter #define PX4IO_MAX_MIXER_LENGHT only limits the length of a single mixer. So in my case this was not a limiting factor as each individual mixer is relatively simple. Might be nice to update the documentation about the custom mixing a little bit and include limitations like this.

This topic can be closed. Maybe even deleted, but might be nice for people to have a little bit more information about the problem.