VTOL disable pilot yaw inputs during fixed wing flight

Hey everyone. I have a custom vtol and I would like to disable pilot yaw inputs during fixed wing flight (but still allow the attitude/position controllers to generate yaw commands).

I’m thinking about writing to the input_rc topic from my vtol module and overwrite the yaw channel with 1500 during fixed wing flight.

Is there a better way to do this?