mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-27 18:16:36 +08:00
vmount: Add parameters for servo range and offset and whether to stabilize (#8120).
Adds MNT_DO_STAB for whether to stabilize by default.
Adds MNT_RANGE_{PITCH,ROLL,YAW} for the output range of each output channel in AUX mode (instead of hardcoded 360 degrees).
Adds MNT_OFF_{PITCH,ROLL,YAW} for adjusting the zero point of each output channel.
This commit is contained in:
committed by
Beat Küng
parent
8ec59f0bc9
commit
2f40bc3a78
@@ -113,9 +113,9 @@ int OutputMavlink::update(const ControlData *control_data)
|
||||
|
||||
// vmount spec has roll, pitch on channels 0, 1, respectively; MAVLink spec has roll, pitch on channels 1, 0, respectively
|
||||
// vmount uses radians, MAVLink uses degrees
|
||||
vehicle_command.param1 = _angle_outputs[1] * M_RAD_TO_DEG_F;
|
||||
vehicle_command.param2 = _angle_outputs[0] * M_RAD_TO_DEG_F;
|
||||
vehicle_command.param3 = _angle_outputs[2] * M_RAD_TO_DEG_F;
|
||||
vehicle_command.param1 = _angle_outputs[1] * M_RAD_TO_DEG_F + _config.pitch_offset;
|
||||
vehicle_command.param2 = _angle_outputs[0] * M_RAD_TO_DEG_F + _config.roll_offset;
|
||||
vehicle_command.param3 = _angle_outputs[2] * M_RAD_TO_DEG_F + _config.yaw_offset;
|
||||
|
||||
orb_publish(ORB_ID(vehicle_command), _vehicle_command_pub, &vehicle_command);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user