Hi
I was trying to activate InputHold using pymavlink
Can anyone help me?
Hi @sudheeshk,
Check out pymavlink examples, there is Change flight modes that is exactly what you are looking for.
Hi patrick
I got an error as follows
(‘Try:’, [‘STABILIZE’, ‘POSHOLD’, ‘AUTO’, ‘GUIDED’, ‘MANUAL’, ‘SURFACE’, ‘ALT_HOLD’, ‘CIRCLE’, ‘ACRO’]) when i give mode as “InputHold”
Hi @sudheeshk,
Sorry, I misinterpreted your question!
Input hold happens when you press the joystick button assigned as input_hold_set.
For that, you’ll need to check Send Manual Control example and select the correct button for the input_hold and values for the X,Y,Z,R fields.
If you want to control the vehicle attitude, you can use set_attitude_target while in altitude hold.
Thanks for your response Patrick . I was thinking about a simple method.
can we set this mode directly by using named_value_float_send() pymavlink function?
Hi Patrick
How can I set a continuous control input by manual control using master.mav.manual_control_send()?
It seems that if I directly set a target value of x,y,z,r, the system only has an impulse response.
If I use input hold like this
master.mav.manual_control_send(
master.target_system,
0,
0,
500,
200-cnt,
1<<2),
the change of yaw motion is not continuous, and the input hold is reported set/disabled in turn.
Looking forward to your response.
Regards