mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-28 09:58:23 +08:00
Control camera's over MAVLink (#3178)
Allow to configure the MAVLINK autopilot type to drive e.g. DJI camera's but do not change the default behaviour
This commit is contained in:
committed by
GitHub
parent
2083b5898f
commit
0b8cc6b5f2
@@ -39,6 +39,7 @@
|
|||||||
<!-- <module name="mavlink">
|
<!-- <module name="mavlink">
|
||||||
<configure name="MAVLINK_BAUD" value="B115200"/>
|
<configure name="MAVLINK_BAUD" value="B115200"/>
|
||||||
<configure name="MAVLINK_PORT" value="UART8"/>
|
<configure name="MAVLINK_PORT" value="UART8"/>
|
||||||
|
<define name="MAV_AUTOPILOT_ID" value="MAV_AUTOPILOT_ARDUPILOTMEGA"/>
|
||||||
</module> -->
|
</module> -->
|
||||||
|
|
||||||
<!-- Log in high speed (Remove for outdoor flights) -->
|
<!-- Log in high speed (Remove for outdoor flights) -->
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<description>Basic MAVLink implementation</description>
|
<description>Basic MAVLink implementation</description>
|
||||||
<configure name="MAVLINK_PORT" value="UARTx|UDPx|UsbS" description="The port device to use for mavlink (default: UART1)"/>
|
<configure name="MAVLINK_PORT" value="UARTx|UDPx|UsbS" description="The port device to use for mavlink (default: UART1)"/>
|
||||||
<configure name="MAVLINK_BAUD" value="B57600" description="Baud rate if MAVLINK_PORT is a UART"/>
|
<configure name="MAVLINK_BAUD" value="B57600" description="Baud rate if MAVLINK_PORT is a UART"/>
|
||||||
|
<define name="MAV_AUTOPILOT_ID" value="MAV_AUTOPILOT_PPZ|MAV_AUTOPILOT_ARDUPILOTMEGA" description="Some MAVLink GCS/Devices require specific ID's to work. Default is to identify as MAV_AUTOPILOT_PPZ."/>
|
||||||
</doc>
|
</doc>
|
||||||
<header>
|
<header>
|
||||||
<file name="mavlink.h"/>
|
<file name="mavlink.h"/>
|
||||||
|
|||||||
@@ -57,6 +57,11 @@
|
|||||||
#include "modules/radio_control/radio_control.h"
|
#include "modules/radio_control/radio_control.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Change the autopilot identification code: by default identify as PPZ autopilot: alternatively as MAV_AUTOPILOT_ARDUPILOTMEGA
|
||||||
|
#ifndef MAV_AUTOPILOT_ID
|
||||||
|
#define MAV_AUTOPILOT_ID MAV_AUTOPILOT_PPZ
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "modules/datalink/missionlib/mission_manager.h"
|
#include "modules/datalink/missionlib/mission_manager.h"
|
||||||
|
|
||||||
// for UINT16_MAX
|
// for UINT16_MAX
|
||||||
@@ -500,7 +505,7 @@ static void mavlink_send_heartbeat(struct transport_tx *trans, struct link_devic
|
|||||||
}
|
}
|
||||||
mavlink_msg_heartbeat_send(MAVLINK_COMM_0,
|
mavlink_msg_heartbeat_send(MAVLINK_COMM_0,
|
||||||
mav_type,
|
mav_type,
|
||||||
MAV_AUTOPILOT_PPZ,
|
MAV_AUTOPILOT_ID,
|
||||||
mav_mode,
|
mav_mode,
|
||||||
0, // custom_mode
|
0, // custom_mode
|
||||||
mav_state);
|
mav_state);
|
||||||
|
|||||||
Reference in New Issue
Block a user