[SLAM] Heartbeat packet problem between mavros and flight control

Use tx2 to connect to flight control, and find out whether tx2 is connected or not. How can you check whether it is still connected to tx2mavros at the flight control terminal? Is there a corresponding heartbeat packet check? Because I want to restart the power supply of tx2 after they are disconnected