Unable to lock elevon during MC mode

Hi everyone, Iā€™m trying to modify E filte Convergence Mixer file to fit into to my tilt-wing aircraft, I want to disable the elevator when aircraft is in multi-copter mode, so I enable the parameter called FW_ELEV_MC_LOCK in Qgroundcontrol. but does not work. what could be the problem causing this to happen? are there any other parameters need me to set to get it work?

Hi @yangyunzhong517
Unfortunately, the parameter exists but is never used: https://github.com/PX4/Firmware/blob/fb5cb87e9baa7ae003d4fe99d4e3b173b1e4d5bd/src/modules/vtol_att_control/tiltrotor.cpp#L123
If you want to make it working, I think you should add an if statement around this (https://github.com/PX4/Firmware/blob/fb5cb87e9baa7ae003d4fe99d4e3b173b1e4d5bd/src/modules/vtol_att_control/tiltrotor.cpp#L447-L450) to check if the drone is in multicopter mode (MC) and the parameter VT_ELEV_MC_LOCK is active (_params_tiltrotor.elevons_mc_lock). If it is the case, just assign 0 (zero) to the fixedwing outputs, this will put the elevons back to the neutral position.

1 Like

Thank you so much, I have solved the issue by copy a few lines of code from Tailsitter.cpp:https://github.com/PX4/Firmware/blob/fb5cb87e9baa7ae003d4fe99d4e3b173b1e4d5bd/src/modules/vtol_att_control/tailsitter.cpp#L451

Cool! Could you make a pull request on github with the modifications you made in order to contribute to de development of the code please?