Airspeed based VTOL mode selection

Trying to edit the VTOL tiltrotor code so that it can do transitions from MC to FW and back again entirely based on airspeed. This would ideally mean that the aircraft always flies using optimal flight controls for its flight state.

I can’t work out how to trigger FW mode from being activated (aka actuator_fw_in etc), any ideas on how I might be able to approach this problem?