How to order Lidar TFmini + by switch radio

I have a Tf mini + connected to GPS2 on my cube2.1 and I wish I could order my lidar by a switch of my radio. I tried by ch9 opt but it did not work and it even blocked the controls of the drone on the max position of the switch. This order is important to me, I need to order the lidar when I’m just above a roof. Thank you.

What exactly you expect the TFMINI to do?
Is this for avoidance, altitude control or else?
Can you read values from the unit?

To explain better, my TF Mini works very well in Loiter, Althold but as I work over the roofs of houses if I retreat a little too much from the roof the drone falls to find the original distance I had above the roof. I would like to be able through a switch of my radio can disconnect and give e TF Mini when I want. This lidar serves me to keep the same height above the roofs.

Ok I see

You need a method to revert to Baro if the rangefinder suddenly experience a major fluctuation.

Just try to limit the range of lidar to 200 cm , so it would disqualify the reading and revert to Baro automatically

Thank you, it can be a paliative but what I want is to control my lidar by a switch of my radio and how I can do?

Good evening, no one knows how to order a lidar by a switch on the radio ??? It should not be complicated for specialists. I am really surprised. Does anyone finally know where I could find my solution? Thank you.

Setting your RCn_OPTION to 10 should cause ArduCopter to stop using the
rangefinder for altitude.

     RANGEFINDER =         10, // allow enabling or disabling 

rangefinder in flight which helps avoid surface tracking when you are far
above the ground

I think from what you said you actually tried this and it didn’t work for

Do you have any log from that flight?

Thank you for your reply. I now have another problem, no TF mini + works with my Pixhawk cube and I don’t know why while they work through the Benewake GUI.

Everything is now working correctly after having restored certain parameters, reviewing the programming of my Taranis X9D. I am now in version 4.01.