How to add flight mode in px4 and how to use MAV link to achieve takeoff and landing in flight mode

I’ve recently been working on a project to use px4 to define the flight mode and to give guidance on how to control the aircraft in that mode. thank you .