Change Throttle during Transition

Hi, I am new to PX4, I am trying to implement PX4 into a tilt-wing aircraft, currently I am trying to modify the tiltrotor.cpp code to change the thrust setting during transition, so thrust will increase first and decrease when wing tilting angle is bigger than 60 degree. I have tried to change value for ā€œ_thrust_transitionā€ https://github.com/PX4/Firmware/blob/aa92ef3ca6b93aa72dffdf0ecc18e6c04c6ed304/src/modules/vtol_att_control/tiltrotor.cpp#L360 but it do not work. Is this the correct place to change or is there some other things I have to do in order to change the throttle during transition.

That looks like the right place to change it. Can you expand on how itā€™s not working? Did you change it for both TRANSITION_FRONT_P1 and TRANSITION_FRONT_P2?

Sorry for the late reply, I did change both TRANSITION_FRONT_P1 and TRANSITION_FRONT_P2. What I have done is changed _thrust_transition = _mc_virtual_att_sp->thrust; to _thrust_transition = 0.5f; I am expecting the thrust will increase or decrease to half. but when I but and upload the code, the aircraft only produce thrust according to my transmitter throttle setting during the transition.

Iā€™d need to see it overall, but it sounds like you might be changing the INPUT value. The vtol attitude controller reads the virtual attitude setpoints from the FW and MC position controllers, but then publishes a regular vehicle_attitude_setpoint.