uORB topic subscribe in mixer_multirotor.cpp

Hi Dear PX4 community!

I have some custom mixing code in mixer_multirotor.cpp that needs to switch behavior depending on whether the quadcopter is in offboard mode or not. I tried to subscribe to uORB/topics/vehicle_control_mode, but the code won’t compile.

It seems like that uORB topic subscription is not supported here? Is it because the mixer code runs on the PX4IO co-processor, not on FMU? Does anyone have an idea on how to get around this?

I also noticed that in the function

MultirotorMixer::mix(float *outputs, unsigned space)

There is this second parameter “space”. I’m wondering where is this mix function called, and if it’s possible to pass in the value for argument “space” from the FMU?

Thanks in advance for your help!

I would also be interested in this functionality! Did you find a way to subscribe to uORB messages withing the multirotor mixer?