Trim without RC or Trim in offboard

Hello,

As almost all quadcopters do in manual mode my quadcopter drifts in manual mode when trims are set to 0.

I have discovered Trim_Roll, Trim_Pitch etc. parameters. These work fine in manual modes when i copy rc trims to these parameters and set trims on remote controller to 0.

However I want to use these trims without using a RC so the copter can stay in the same position when rc is not connected or in offboard mode when I send the last local position as a set point (when i do this now the copter does the same drift movement as when all trims are set to 0).

I don’t know if this is clear enough but I would appreciate any software fix ideas for my problem.

Thanks,

Are you sure they aren’t being applied in other modes? It looks like those TRIM params are used by the px4io, which should be doing the same thing regardless of mode. https://github.com/PX4/Firmware/blob/fd0efac2b5e2d1c2e9437655f1f20f134f252b8b/src/drivers/px4io/px4io.cpp#L1234

You might be out of luck. Looks like the Multirotor mixer doesn’t use trims

https://github.com/PX4/Firmware/blob/master/src/modules/systemlib/mixer/mixer.h#L623

Thank you for clarifying, much appreciated.