Depth Hold | PyMavlink

Hi,
I couldn’t see DEPTH HOLD mode or ALT_HOLD as a mode_id in Pymavlink. How can I adjust deep hold?

master.set_mode(mode_id)
( [‘RTL’, ‘TRAINING’, ‘LAND’, ‘AUTOTUNE’, ‘STABILIZE’, ‘QLAND’, ‘AUTO’, ‘GUIDED’, ‘LOITER’, ‘MANUAL’, ‘QRTL’, ‘QLOITER’, ‘FBWA’, ‘FBWB’, ‘QSTABILIZE’, ‘CRUISE’, ‘INITIALISING’, ‘CIRCLE’, ‘QHOVER’, ‘ACRO’])

which version of ardusub firmware you are using?

3.5.4

Hi @Sena,

Please provide your pymavlink version and the output of master.mode_mapping().keys(), if possible, please provide a minimum example that replicates your problem.

If you want, if you set your mode as depth hold on qgroundcontrol, it works as depth hold when you start your autonomous code. (For this method you need to run your code on raspberry pi.)

version:
2.2.4

output:
[‘RTL’, ‘TRAINING’, ‘LAND’, ‘AUTOTUNE’, ‘STABILIZE’, ‘QLAND’, ‘AUTO’, ‘GUIDED’, ‘LOITER’, ‘MANUAL’, ‘QRTL’, ‘QLOITER’, ‘FBWA’, ‘FBWB’, ‘QSTABILIZE’, ‘CRUISE’, ’ INITIALISING’, ‘CIRCLE’, ‘QHOVER’, ‘ACRO’]

Please update to the latest version: 2.4.10