Hi @robotmark, welcome to the forum
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