Why did I fail to change flight mode like this?

Hi @robotmark, welcome to the forum :slight_smile:

Your code seems to disarm the vehicle right after you set depth hold mode, so even if the mode change is successful the thrusters would then turn off immediately when the vehicle is disarmed.

You also seem to try to make the same mavlink connection in multiple files, which may cause issues.


In future, I would recommend you post code in code blocks, so that it’s easier to read and test with. You can learn more about that in the How to Use the Blue Robotics Forums post :slight_smile:

1 Like