Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
44684144
Commit
44684144
authored
Jun 09, 2013
by
Bryant
Browse files
Merged in large flight display UI redesign
parents
86de69d4
796a8d85
Changes
243
Expand all
Show whitespace changes
Inline
Side-by-side
README
View file @
44684144
maah
QGroundControl Open Source Micro Air Vehicle Ground Control Station
Project:
...
...
@@ -36,7 +37,7 @@ Build QGroundControl
--------------------
1) From the terminal go to the `groundcontrol` directory
2) Run `qmake`
2) Run `qmake
-spec macx-g++
`
3) Run `make -j8`
...
...
dongfang_qgroundcontrol_notes.txt
0 → 100644
View file @
44684144
From where is the 3D mouse used?
Comm folder:
============
LinkInterface is a QThread. Appears to describe an interface on the host system (TCP port, serial port, ....).
Does it suppport multiple connections?
SerialLinkInterface: Extension of above
SerialLink: Implementation
XBeeLinkInterface: Extension of LinkInterface (but without other serial stuff than baudrate, is the rest assumed?)
XBeeLink: Implementation (with address resetting probably it's Series 1)
UDPLink: UDP implementation. Port is defaulted.
MAVLinkSimulationLink: Simulation/dummy implementation of LinkInterface. Does some file IO.
MAVLinkSimulationUAV: Simulation/dummy basic (remote) UAV state (minus mission state) for MAVLinkSimulationLink.
MAVLinkSimulationWaypointPlanner: imulation/dummy basic (remote) UAV mission state for MAVLinkSimulationLink.
ProtocolInterface describes a protocol. Major method:
virtual void receiveBytes(LinkInterface *link, QByteArray b) = 0;
MavlinkProtocol: MAVLink implementation of ProtocolInterface
Parameter: Identity of a parameter (the value types are not handled here. Oddly there is no type metainfo either)
ParameterList: Is pretty much what the name impiles.
QGCParamID: Wrapper if parameter text IDs, conversion to byte* and back
QGCHilLink: Link to a HIL external system
QCGFlightGearLink, QGCJSBSimLink, QGCXPlaneLink : Implementations of QGCHilLink
QGCMAVLink: Nothing more than in include to raw mavlink.h
input folder:
=============
Some exotic input devices
uas folder:
===========
UAS.h: Local UAV model. Claims to support some sort of RPC. Uses some properties with notifications. Assumes MAVLink.
Some methods:
int getUASID() const; // the systemId
QList<LinkInterface*>* getLinks(); // it knows its links
virtual void receiveMessage(LinkInterface* link, mavlink_message_t message);
float receiveDropRate; ///< Percentage of packets that were dropped on the MAV's receiving link (from GCS and other MAVs)
float sendDropRate; ///< Percentage of packets that were not received from the MAV by the GCS
Some fields:
bool positionLock; ///< Status if position information is available or not
double localX; // (what is this?)
double localY;
double localZ;
double latitude; ///< Global latitude as estimated by position estimator
double longitude; ///< Global longitude as estimated by position estimator
double altitude; ///< Global altitude as estimated by position estimator
double satelliteCount; ///< Number of satellites visible to raw GPS
bool globalEstimatorActive; ///< Global position estimator present, do not fall back to GPS raw for position
double latitude_gps; ///< Global latitude as estimated by raw GPS
double longitude_gps; ///< Global longitude as estimated by raw GPS
double altitude_gps; ///< Global altitude as estimated by raw GPS
and lots ans lots more...
*MAV.h: Implementations of UAS
QGCUASParamManager.h: A mixture of a widget and a parameter up/download state machine. Has a reference to its associated UAV.
UASWaypointManager: API to waypoint / mission control. Not a widget. Has a reference to its associated UAV.
UASManager.h: Singleton interface to all UASs on all interfaces. Maintains a single selected/active UAS.
Ideas to do
TCPLink
XBee Series2 implementation
Less stress on uplink
Get rid of hardcoded SystemId of 255
Quick View should print all altitudes (GPS, mix, ground and/or home), letting user see errors.
Console debugging is hopefully removed?
dongfang_qgroundcontrol_wishlist.txt
0 → 100644
View file @
44684144
Major
1) Absolute altitude should absolutely work. Also in face of bad GPS init.
How does the mission planning part work with that, how is alt. stored in waypoints?
When is home altitude stored in the UAV?
2) Some people have worse datalinks than average - eg. slow or noisy telemetry. GPRS data also easily gets
flooded. All data rates should be configurable and uplinks eased off a little.
3) Some streams should be sent always even if not in use. For example using RC override and then stopping
using it: If the UAV does not received the final RC override message with zero values for all channels,
it will not get out of RC override. A solution is to make the message non final, repeating it every
now and then.
Minor
1) I would like to see initial dummy values for eg. battery voltage go away and be replaced by "unknown".
Dummy values confuse, you won't know if your sensors and link are working or not.
2) Suggestion if the DO_JUMP behavior of APM today (where DO_JUMP requires a waypoint command after it):
Modify APM code so DO_JUMP is regarded a navigation command. Make non navigation commands appear in
planning as sub commands of navigation commands (indent them). Easier to understand.
3) Old style audio with signals/bells/beeps / Morse may be prefered by some. Maybe add slots'n'signals for
all audio and different implementation types (speech, beep, ...). Or a generic operator messaging thing.
files/ardupilotmega/arduplane.pdef.xml
View file @
44684144
This diff is collapsed.
Click to expand it.
libs/mavlink/include/mavlink/v1.0/ardupilotmega/ardupilotmega.h
View file @
44684144
This diff is collapsed.
Click to expand it.
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ahrs.h
View file @
44684144
...
...
@@ -16,6 +16,9 @@ typedef struct __mavlink_ahrs_t
#define MAVLINK_MSG_ID_AHRS_LEN 28
#define MAVLINK_MSG_ID_163_LEN 28
#define MAVLINK_MSG_ID_AHRS_CRC 127
#define MAVLINK_MSG_ID_163_CRC 127
#define MAVLINK_MESSAGE_INFO_AHRS { \
...
...
@@ -51,7 +54,7 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
float
omegaIx
,
float
omegaIy
,
float
omegaIz
,
float
accel_weight
,
float
renorm_val
,
float
error_rp
,
float
error_yaw
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
28
];
char
buf
[
MAVLINK_MSG_ID_AHRS_LEN
];
_mav_put_float
(
buf
,
0
,
omegaIx
);
_mav_put_float
(
buf
,
4
,
omegaIy
);
_mav_put_float
(
buf
,
8
,
omegaIz
);
...
...
@@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
_mav_put_float
(
buf
,
20
,
error_rp
);
_mav_put_float
(
buf
,
24
,
error_yaw
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
28
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_AHRS_LEN
);
#else
mavlink_ahrs_t
packet
;
packet
.
omegaIx
=
omegaIx
;
...
...
@@ -71,11 +74,15 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
packet
.
error_rp
=
error_rp
;
packet
.
error_yaw
=
error_yaw
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
28
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_AHRS
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
28
,
127
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_AHRS_LEN
,
MAVLINK_MSG_ID_AHRS_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
}
/**
...
...
@@ -98,7 +105,7 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
float
omegaIx
,
float
omegaIy
,
float
omegaIz
,
float
accel_weight
,
float
renorm_val
,
float
error_rp
,
float
error_yaw
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
28
];
char
buf
[
MAVLINK_MSG_ID_AHRS_LEN
];
_mav_put_float
(
buf
,
0
,
omegaIx
);
_mav_put_float
(
buf
,
4
,
omegaIy
);
_mav_put_float
(
buf
,
8
,
omegaIz
);
...
...
@@ -107,7 +114,7 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
_mav_put_float
(
buf
,
20
,
error_rp
);
_mav_put_float
(
buf
,
24
,
error_yaw
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
28
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_AHRS_LEN
);
#else
mavlink_ahrs_t
packet
;
packet
.
omegaIx
=
omegaIx
;
...
...
@@ -118,11 +125,15 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
packet
.
error_rp
=
error_rp
;
packet
.
error_yaw
=
error_yaw
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
28
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_AHRS
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
28
,
127
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_AHRS_LEN
,
MAVLINK_MSG_ID_AHRS_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
}
/**
...
...
@@ -155,7 +166,7 @@ static inline uint16_t mavlink_msg_ahrs_encode(uint8_t system_id, uint8_t compon
static
inline
void
mavlink_msg_ahrs_send
(
mavlink_channel_t
chan
,
float
omegaIx
,
float
omegaIy
,
float
omegaIz
,
float
accel_weight
,
float
renorm_val
,
float
error_rp
,
float
error_yaw
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
28
];
char
buf
[
MAVLINK_MSG_ID_AHRS_LEN
];
_mav_put_float
(
buf
,
0
,
omegaIx
);
_mav_put_float
(
buf
,
4
,
omegaIy
);
_mav_put_float
(
buf
,
8
,
omegaIz
);
...
...
@@ -164,7 +175,11 @@ static inline void mavlink_msg_ahrs_send(mavlink_channel_t chan, float omegaIx,
_mav_put_float
(
buf
,
20
,
error_rp
);
_mav_put_float
(
buf
,
24
,
error_yaw
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AHRS
,
buf
,
28
,
127
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AHRS
,
buf
,
MAVLINK_MSG_ID_AHRS_LEN
,
MAVLINK_MSG_ID_AHRS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AHRS
,
buf
,
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
#else
mavlink_ahrs_t
packet
;
packet
.
omegaIx
=
omegaIx
;
...
...
@@ -175,7 +190,11 @@ static inline void mavlink_msg_ahrs_send(mavlink_channel_t chan, float omegaIx,
packet
.
error_rp
=
error_rp
;
packet
.
error_yaw
=
error_yaw
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AHRS
,
(
const
char
*
)
&
packet
,
28
,
127
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AHRS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_AHRS_LEN
,
MAVLINK_MSG_ID_AHRS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AHRS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
#endif
}
...
...
@@ -271,6 +290,6 @@ static inline void mavlink_msg_ahrs_decode(const mavlink_message_t* msg, mavlink
ahrs
->
error_rp
=
mavlink_msg_ahrs_get_error_rp
(
msg
);
ahrs
->
error_yaw
=
mavlink_msg_ahrs_get_error_yaw
(
msg
);
#else
memcpy
(
ahrs
,
_MAV_PAYLOAD
(
msg
),
28
);
memcpy
(
ahrs
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_AHRS_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_ap_adc.h
View file @
44684144
...
...
@@ -15,6 +15,9 @@ typedef struct __mavlink_ap_adc_t
#define MAVLINK_MSG_ID_AP_ADC_LEN 12
#define MAVLINK_MSG_ID_153_LEN 12
#define MAVLINK_MSG_ID_AP_ADC_CRC 188
#define MAVLINK_MSG_ID_153_CRC 188
#define MAVLINK_MESSAGE_INFO_AP_ADC { \
...
...
@@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
uint16_t
adc1
,
uint16_t
adc2
,
uint16_t
adc3
,
uint16_t
adc4
,
uint16_t
adc5
,
uint16_t
adc6
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
char
buf
[
MAVLINK_MSG_ID_AP_ADC_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
adc1
);
_mav_put_uint16_t
(
buf
,
2
,
adc2
);
_mav_put_uint16_t
(
buf
,
4
,
adc3
);
...
...
@@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
_mav_put_uint16_t
(
buf
,
8
,
adc5
);
_mav_put_uint16_t
(
buf
,
10
,
adc6
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#else
mavlink_ap_adc_t
packet
;
packet
.
adc1
=
adc1
;
...
...
@@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
packet
.
adc5
=
adc5
;
packet
.
adc6
=
adc6
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_AP_ADC
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
188
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_AP_ADC_LEN
,
MAVLINK_MSG_ID_AP_ADC_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
}
/**
...
...
@@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
uint16_t
adc1
,
uint16_t
adc2
,
uint16_t
adc3
,
uint16_t
adc4
,
uint16_t
adc5
,
uint16_t
adc6
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
char
buf
[
MAVLINK_MSG_ID_AP_ADC_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
adc1
);
_mav_put_uint16_t
(
buf
,
2
,
adc2
);
_mav_put_uint16_t
(
buf
,
4
,
adc3
);
...
...
@@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
_mav_put_uint16_t
(
buf
,
8
,
adc5
);
_mav_put_uint16_t
(
buf
,
10
,
adc6
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#else
mavlink_ap_adc_t
packet
;
packet
.
adc1
=
adc1
;
...
...
@@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
packet
.
adc5
=
adc5
;
packet
.
adc6
=
adc6
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_AP_ADC
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
188
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_AP_ADC_LEN
,
MAVLINK_MSG_ID_AP_ADC_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
}
/**
...
...
@@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_ap_adc_encode(uint8_t system_id, uint8_t comp
static
inline
void
mavlink_msg_ap_adc_send
(
mavlink_channel_t
chan
,
uint16_t
adc1
,
uint16_t
adc2
,
uint16_t
adc3
,
uint16_t
adc4
,
uint16_t
adc5
,
uint16_t
adc6
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
char
buf
[
MAVLINK_MSG_ID_AP_ADC_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
adc1
);
_mav_put_uint16_t
(
buf
,
2
,
adc2
);
_mav_put_uint16_t
(
buf
,
4
,
adc3
);
...
...
@@ -154,7 +165,11 @@ static inline void mavlink_msg_ap_adc_send(mavlink_channel_t chan, uint16_t adc1
_mav_put_uint16_t
(
buf
,
8
,
adc5
);
_mav_put_uint16_t
(
buf
,
10
,
adc6
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AP_ADC
,
buf
,
12
,
188
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AP_ADC
,
buf
,
MAVLINK_MSG_ID_AP_ADC_LEN
,
MAVLINK_MSG_ID_AP_ADC_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AP_ADC
,
buf
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
#else
mavlink_ap_adc_t
packet
;
packet
.
adc1
=
adc1
;
...
...
@@ -164,7 +179,11 @@ static inline void mavlink_msg_ap_adc_send(mavlink_channel_t chan, uint16_t adc1
packet
.
adc5
=
adc5
;
packet
.
adc6
=
adc6
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AP_ADC
,
(
const
char
*
)
&
packet
,
12
,
188
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AP_ADC
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_AP_ADC_LEN
,
MAVLINK_MSG_ID_AP_ADC_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_AP_ADC
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
#endif
}
...
...
@@ -249,6 +268,6 @@ static inline void mavlink_msg_ap_adc_decode(const mavlink_message_t* msg, mavli
ap_adc
->
adc5
=
mavlink_msg_ap_adc_get_adc5
(
msg
);
ap_adc
->
adc6
=
mavlink_msg_ap_adc_get_adc6
(
msg
);
#else
memcpy
(
ap_adc
,
_MAV_PAYLOAD
(
msg
),
12
);
memcpy
(
ap_adc
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_AP_ADC_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data16.h
View file @
44684144
...
...
@@ -12,6 +12,9 @@ typedef struct __mavlink_data16_t
#define MAVLINK_MSG_ID_DATA16_LEN 18
#define MAVLINK_MSG_ID_169_LEN 18
#define MAVLINK_MSG_ID_DATA16_CRC 234
#define MAVLINK_MSG_ID_169_CRC 234
#define MAVLINK_MSG_DATA16_FIELD_DATA_LEN 16
#define MAVLINK_MESSAGE_INFO_DATA16 { \
...
...
@@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data16_pack(uint8_t system_id, uint8_t compon
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
18
];
char
buf
[
MAVLINK_MSG_ID_DATA16_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
16
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
18
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA16_LEN
);
#else
mavlink_data16_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
16
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
18
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA16
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
18
,
234
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA16_LEN
,
MAVLINK_MSG_ID_DATA16_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
}
/**
...
...
@@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data16_pack_chan(uint8_t system_id, uint8_t c
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
18
];
char
buf
[
MAVLINK_MSG_ID_DATA16_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
16
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
18
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA16_LEN
);
#else
mavlink_data16_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
16
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
18
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA16
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
18
,
234
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA16_LEN
,
MAVLINK_MSG_ID_DATA16_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
}
/**
...
...
@@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data16_encode(uint8_t system_id, uint8_t comp
static
inline
void
mavlink_msg_data16_send
(
mavlink_channel_t
chan
,
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
18
];
char
buf
[
MAVLINK_MSG_ID_DATA16_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
16
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA16
,
buf
,
18
,
234
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA16
,
buf
,
MAVLINK_MSG_ID_DATA16_LEN
,
MAVLINK_MSG_ID_DATA16_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA16
,
buf
,
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
#else
mavlink_data16_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
16
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA16
,
(
const
char
*
)
&
packet
,
18
,
234
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA16
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA16_LEN
,
MAVLINK_MSG_ID_DATA16_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA16
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
#endif
}
...
...
@@ -177,6 +196,6 @@ static inline void mavlink_msg_data16_decode(const mavlink_message_t* msg, mavli
data16
->
len
=
mavlink_msg_data16_get_len
(
msg
);
mavlink_msg_data16_get_data
(
msg
,
data16
->
data
);
#else
memcpy
(
data16
,
_MAV_PAYLOAD
(
msg
),
18
);
memcpy
(
data16
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_DATA16_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data32.h
View file @
44684144
...
...
@@ -12,6 +12,9 @@ typedef struct __mavlink_data32_t
#define MAVLINK_MSG_ID_DATA32_LEN 34
#define MAVLINK_MSG_ID_170_LEN 34
#define MAVLINK_MSG_ID_DATA32_CRC 73
#define MAVLINK_MSG_ID_170_CRC 73
#define MAVLINK_MSG_DATA32_FIELD_DATA_LEN 32
#define MAVLINK_MESSAGE_INFO_DATA32 { \
...
...
@@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data32_pack(uint8_t system_id, uint8_t compon
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
34
];
char
buf
[
MAVLINK_MSG_ID_DATA32_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
32
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
34
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA32_LEN
);
#else
mavlink_data32_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
32
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
34
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA32
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
34
,
73
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA32_LEN
,
MAVLINK_MSG_ID_DATA32_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
}
/**
...
...
@@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data32_pack_chan(uint8_t system_id, uint8_t c
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
34
];
char
buf
[
MAVLINK_MSG_ID_DATA32_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
32
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
34
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA32_LEN
);
#else
mavlink_data32_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
32
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
34
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA32
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
34
,
73
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA32_LEN
,
MAVLINK_MSG_ID_DATA32_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
}
/**
...
...
@@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data32_encode(uint8_t system_id, uint8_t comp
static
inline
void
mavlink_msg_data32_send
(
mavlink_channel_t
chan
,
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
34
];
char
buf
[
MAVLINK_MSG_ID_DATA32_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
32
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA32
,
buf
,
34
,
73
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA32
,
buf
,
MAVLINK_MSG_ID_DATA32_LEN
,
MAVLINK_MSG_ID_DATA32_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA32
,
buf
,
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
#else
mavlink_data32_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
32
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA32
,
(
const
char
*
)
&
packet
,
34
,
73
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA32
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA32_LEN
,
MAVLINK_MSG_ID_DATA32_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA32
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
#endif
}
...
...
@@ -177,6 +196,6 @@ static inline void mavlink_msg_data32_decode(const mavlink_message_t* msg, mavli
data32
->
len
=
mavlink_msg_data32_get_len
(
msg
);
mavlink_msg_data32_get_data
(
msg
,
data32
->
data
);
#else
memcpy
(
data32
,
_MAV_PAYLOAD
(
msg
),
34
);
memcpy
(
data32
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_DATA32_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data64.h
View file @
44684144
...
...
@@ -12,6 +12,9 @@ typedef struct __mavlink_data64_t
#define MAVLINK_MSG_ID_DATA64_LEN 66
#define MAVLINK_MSG_ID_171_LEN 66
#define MAVLINK_MSG_ID_DATA64_CRC 181
#define MAVLINK_MSG_ID_171_CRC 181
#define MAVLINK_MSG_DATA64_FIELD_DATA_LEN 64
#define MAVLINK_MESSAGE_INFO_DATA64 { \
...
...
@@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data64_pack(uint8_t system_id, uint8_t compon
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
66
];
char
buf
[
MAVLINK_MSG_ID_DATA64_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
64
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
66
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA64_LEN
);
#else
mavlink_data64_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
64
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
66
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA64
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
66
,
181
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA64_LEN
,
MAVLINK_MSG_ID_DATA64_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
}
/**
...
...
@@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data64_pack_chan(uint8_t system_id, uint8_t c
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
66
];
char
buf
[
MAVLINK_MSG_ID_DATA64_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
64
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
66
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA64_LEN
);
#else
mavlink_data64_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
64
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
66
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA64
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
66
,
181
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA64_LEN
,
MAVLINK_MSG_ID_DATA64_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
}
/**
...
...
@@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data64_encode(uint8_t system_id, uint8_t comp
static
inline
void
mavlink_msg_data64_send
(
mavlink_channel_t
chan
,
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
66
];
char
buf
[
MAVLINK_MSG_ID_DATA64_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
64
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA64
,
buf
,
66
,
181
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA64
,
buf
,
MAVLINK_MSG_ID_DATA64_LEN
,
MAVLINK_MSG_ID_DATA64_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA64
,
buf
,
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
#else
mavlink_data64_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
64
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA64
,
(
const
char
*
)
&
packet
,
66
,
181
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA64
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA64_LEN
,
MAVLINK_MSG_ID_DATA64_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA64
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
#endif
}
...
...
@@ -177,6 +196,6 @@ static inline void mavlink_msg_data64_decode(const mavlink_message_t* msg, mavli
data64
->
len
=
mavlink_msg_data64_get_len
(
msg
);
mavlink_msg_data64_get_data
(
msg
,
data64
->
data
);
#else
memcpy
(
data64
,
_MAV_PAYLOAD
(
msg
),
66
);
memcpy
(
data64
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_DATA64_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_data96.h
View file @
44684144
...
...
@@ -12,6 +12,9 @@ typedef struct __mavlink_data96_t
#define MAVLINK_MSG_ID_DATA96_LEN 98
#define MAVLINK_MSG_ID_172_LEN 98
#define MAVLINK_MSG_ID_DATA96_CRC 22
#define MAVLINK_MSG_ID_172_CRC 22
#define MAVLINK_MSG_DATA96_FIELD_DATA_LEN 96
#define MAVLINK_MESSAGE_INFO_DATA96 { \
...
...
@@ -39,21 +42,25 @@ static inline uint16_t mavlink_msg_data96_pack(uint8_t system_id, uint8_t compon
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
98
];
char
buf
[
MAVLINK_MSG_ID_DATA96_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
96
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
98
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA96_LEN
);
#else
mavlink_data96_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
96
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
98
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA96
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
98
,
22
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA96_LEN
,
MAVLINK_MSG_ID_DATA96_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
}
/**
...
...
@@ -72,21 +79,25 @@ static inline uint16_t mavlink_msg_data96_pack_chan(uint8_t system_id, uint8_t c
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
98
];
char
buf
[
MAVLINK_MSG_ID_DATA96_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
96
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
98
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DATA96_LEN
);
#else
mavlink_data96_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
96
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
98
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DATA96
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
98
,
22
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA96_LEN
,
MAVLINK_MSG_ID_DATA96_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
}
/**
...
...
@@ -115,17 +126,25 @@ static inline uint16_t mavlink_msg_data96_encode(uint8_t system_id, uint8_t comp
static
inline
void
mavlink_msg_data96_send
(
mavlink_channel_t
chan
,
uint8_t
type
,
uint8_t
len
,
const
uint8_t
*
data
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
98
];
char
buf
[
MAVLINK_MSG_ID_DATA96_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
type
);
_mav_put_uint8_t
(
buf
,
1
,
len
);
_mav_put_uint8_t_array
(
buf
,
2
,
data
,
96
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA96
,
buf
,
98
,
22
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA96
,
buf
,
MAVLINK_MSG_ID_DATA96_LEN
,
MAVLINK_MSG_ID_DATA96_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA96
,
buf
,
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
#else
mavlink_data96_t
packet
;
packet
.
type
=
type
;
packet
.
len
=
len
;
mav_array_memcpy
(
packet
.
data
,
data
,
sizeof
(
uint8_t
)
*
96
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA96
,
(
const
char
*
)
&
packet
,
98
,
22
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA96
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA96_LEN
,
MAVLINK_MSG_ID_DATA96_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DATA96
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
#endif
}
...
...
@@ -177,6 +196,6 @@ static inline void mavlink_msg_data96_decode(const mavlink_message_t* msg, mavli
data96
->
len
=
mavlink_msg_data96_get_len
(
msg
);
mavlink_msg_data96_get_data
(
msg
,
data96
->
data
);
#else
memcpy
(
data96
,
_MAV_PAYLOAD
(
msg
),
98
);
memcpy
(
data96
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_DATA96_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_configure.h
View file @
44684144
...
...
@@ -20,6 +20,9 @@ typedef struct __mavlink_digicam_configure_t
#define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN 15
#define MAVLINK_MSG_ID_154_LEN 15
#define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC 84
#define MAVLINK_MSG_ID_154_CRC 84
#define MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE { \
...
...
@@ -63,7 +66,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
mode
,
uint16_t
shutter_speed
,
uint8_t
aperture
,
uint8_t
iso
,
uint8_t
exposure_type
,
uint8_t
command_id
,
uint8_t
engine_cut_off
,
uint8_t
extra_param
,
float
extra_value
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
15
];
char
buf
[
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
];
_mav_put_float
(
buf
,
0
,
extra_value
);
_mav_put_uint16_t
(
buf
,
4
,
shutter_speed
);
_mav_put_uint8_t
(
buf
,
6
,
target_system
);
...
...
@@ -76,7 +79,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
_mav_put_uint8_t
(
buf
,
13
,
engine_cut_off
);
_mav_put_uint8_t
(
buf
,
14
,
extra_param
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
15
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#else
mavlink_digicam_configure_t
packet
;
packet
.
extra_value
=
extra_value
;
...
...
@@ -91,11 +94,15 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
packet
.
engine_cut_off
=
engine_cut_off
;
packet
.
extra_param
=
extra_param
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
15
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
15
,
84
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
}
/**
...
...
@@ -122,7 +129,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
mode
,
uint16_t
shutter_speed
,
uint8_t
aperture
,
uint8_t
iso
,
uint8_t
exposure_type
,
uint8_t
command_id
,
uint8_t
engine_cut_off
,
uint8_t
extra_param
,
float
extra_value
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
15
];
char
buf
[
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
];
_mav_put_float
(
buf
,
0
,
extra_value
);
_mav_put_uint16_t
(
buf
,
4
,
shutter_speed
);
_mav_put_uint8_t
(
buf
,
6
,
target_system
);
...
...
@@ -135,7 +142,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
_mav_put_uint8_t
(
buf
,
13
,
engine_cut_off
);
_mav_put_uint8_t
(
buf
,
14
,
extra_param
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
15
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#else
mavlink_digicam_configure_t
packet
;
packet
.
extra_value
=
extra_value
;
...
...
@@ -150,11 +157,15 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
packet
.
engine_cut_off
=
engine_cut_off
;
packet
.
extra_param
=
extra_param
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
15
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
15
,
84
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
}
/**
...
...
@@ -191,7 +202,7 @@ static inline uint16_t mavlink_msg_digicam_configure_encode(uint8_t system_id, u
static
inline
void
mavlink_msg_digicam_configure_send
(
mavlink_channel_t
chan
,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
mode
,
uint16_t
shutter_speed
,
uint8_t
aperture
,
uint8_t
iso
,
uint8_t
exposure_type
,
uint8_t
command_id
,
uint8_t
engine_cut_off
,
uint8_t
extra_param
,
float
extra_value
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
15
];
char
buf
[
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
];
_mav_put_float
(
buf
,
0
,
extra_value
);
_mav_put_uint16_t
(
buf
,
4
,
shutter_speed
);
_mav_put_uint8_t
(
buf
,
6
,
target_system
);
...
...
@@ -204,7 +215,11 @@ static inline void mavlink_msg_digicam_configure_send(mavlink_channel_t chan, ui
_mav_put_uint8_t
(
buf
,
13
,
engine_cut_off
);
_mav_put_uint8_t
(
buf
,
14
,
extra_param
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
,
buf
,
15
,
84
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
,
buf
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
,
buf
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
#else
mavlink_digicam_configure_t
packet
;
packet
.
extra_value
=
extra_value
;
...
...
@@ -219,7 +234,11 @@ static inline void mavlink_msg_digicam_configure_send(mavlink_channel_t chan, ui
packet
.
engine_cut_off
=
engine_cut_off
;
packet
.
extra_param
=
extra_param
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
,
(
const
char
*
)
&
packet
,
15
,
84
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
#endif
}
...
...
@@ -359,6 +378,6 @@ static inline void mavlink_msg_digicam_configure_decode(const mavlink_message_t*
digicam_configure
->
engine_cut_off
=
mavlink_msg_digicam_configure_get_engine_cut_off
(
msg
);
digicam_configure
->
extra_param
=
mavlink_msg_digicam_configure_get_extra_param
(
msg
);
#else
memcpy
(
digicam_configure
,
_MAV_PAYLOAD
(
msg
),
15
);
memcpy
(
digicam_configure
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_digicam_control.h
View file @
44684144
...
...
@@ -19,6 +19,9 @@ typedef struct __mavlink_digicam_control_t
#define MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN 13
#define MAVLINK_MSG_ID_155_LEN 13
#define MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC 22
#define MAVLINK_MSG_ID_155_CRC 22
#define MAVLINK_MESSAGE_INFO_DIGICAM_CONTROL { \
...
...
@@ -60,7 +63,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
session
,
uint8_t
zoom_pos
,
int8_t
zoom_step
,
uint8_t
focus_lock
,
uint8_t
shot
,
uint8_t
command_id
,
uint8_t
extra_param
,
float
extra_value
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
13
];
char
buf
[
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
];
_mav_put_float
(
buf
,
0
,
extra_value
);
_mav_put_uint8_t
(
buf
,
4
,
target_system
);
_mav_put_uint8_t
(
buf
,
5
,
target_component
);
...
...
@@ -72,7 +75,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
_mav_put_uint8_t
(
buf
,
11
,
command_id
);
_mav_put_uint8_t
(
buf
,
12
,
extra_param
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
13
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#else
mavlink_digicam_control_t
packet
;
packet
.
extra_value
=
extra_value
;
...
...
@@ -86,11 +89,15 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
packet
.
command_id
=
command_id
;
packet
.
extra_param
=
extra_param
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
13
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DIGICAM_CONTROL
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
13
,
22
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
}
/**
...
...
@@ -116,7 +123,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
session
,
uint8_t
zoom_pos
,
int8_t
zoom_step
,
uint8_t
focus_lock
,
uint8_t
shot
,
uint8_t
command_id
,
uint8_t
extra_param
,
float
extra_value
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
13
];
char
buf
[
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
];
_mav_put_float
(
buf
,
0
,
extra_value
);
_mav_put_uint8_t
(
buf
,
4
,
target_system
);
_mav_put_uint8_t
(
buf
,
5
,
target_component
);
...
...
@@ -128,7 +135,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
_mav_put_uint8_t
(
buf
,
11
,
command_id
);
_mav_put_uint8_t
(
buf
,
12
,
extra_param
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
13
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#else
mavlink_digicam_control_t
packet
;
packet
.
extra_value
=
extra_value
;
...
...
@@ -142,11 +149,15 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
packet
.
command_id
=
command_id
;
packet
.
extra_param
=
extra_param
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
13
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_DIGICAM_CONTROL
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
13
,
22
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
}
/**
...
...
@@ -182,7 +193,7 @@ static inline uint16_t mavlink_msg_digicam_control_encode(uint8_t system_id, uin
static
inline
void
mavlink_msg_digicam_control_send
(
mavlink_channel_t
chan
,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
session
,
uint8_t
zoom_pos
,
int8_t
zoom_step
,
uint8_t
focus_lock
,
uint8_t
shot
,
uint8_t
command_id
,
uint8_t
extra_param
,
float
extra_value
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
13
];
char
buf
[
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
];
_mav_put_float
(
buf
,
0
,
extra_value
);
_mav_put_uint8_t
(
buf
,
4
,
target_system
);
_mav_put_uint8_t
(
buf
,
5
,
target_component
);
...
...
@@ -194,7 +205,11 @@ static inline void mavlink_msg_digicam_control_send(mavlink_channel_t chan, uint
_mav_put_uint8_t
(
buf
,
11
,
command_id
);
_mav_put_uint8_t
(
buf
,
12
,
extra_param
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL
,
buf
,
13
,
22
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL
,
buf
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL
,
buf
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
#else
mavlink_digicam_control_t
packet
;
packet
.
extra_value
=
extra_value
;
...
...
@@ -208,7 +223,11 @@ static inline void mavlink_msg_digicam_control_send(mavlink_channel_t chan, uint
packet
.
command_id
=
command_id
;
packet
.
extra_param
=
extra_param
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL
,
(
const
char
*
)
&
packet
,
13
,
22
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_DIGICAM_CONTROL
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
#endif
}
...
...
@@ -337,6 +356,6 @@ static inline void mavlink_msg_digicam_control_decode(const mavlink_message_t* m
digicam_control
->
command_id
=
mavlink_msg_digicam_control_get_command_id
(
msg
);
digicam_control
->
extra_param
=
mavlink_msg_digicam_control_get_extra_param
(
msg
);
#else
memcpy
(
digicam_control
,
_MAV_PAYLOAD
(
msg
),
13
);
memcpy
(
digicam_control
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_fetch_point.h
View file @
44684144
...
...
@@ -12,6 +12,9 @@ typedef struct __mavlink_fence_fetch_point_t
#define MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN 3
#define MAVLINK_MSG_ID_161_LEN 3
#define MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC 68
#define MAVLINK_MSG_ID_161_CRC 68
#define MAVLINK_MESSAGE_INFO_FENCE_FETCH_POINT { \
...
...
@@ -39,23 +42,27 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack(uint8_t system_id, uin
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
idx
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
3
];
char
buf
[
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
target_system
);
_mav_put_uint8_t
(
buf
,
1
,
target_component
);
_mav_put_uint8_t
(
buf
,
2
,
idx
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#else
mavlink_fence_fetch_point_t
packet
;
packet
.
target_system
=
target_system
;
packet
.
target_component
=
target_component
;
packet
.
idx
=
idx
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FENCE_FETCH_POINT
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
3
,
68
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
}
/**
...
...
@@ -74,23 +81,27 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack_chan(uint8_t system_id
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
idx
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
3
];
char
buf
[
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
target_system
);
_mav_put_uint8_t
(
buf
,
1
,
target_component
);
_mav_put_uint8_t
(
buf
,
2
,
idx
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#else
mavlink_fence_fetch_point_t
packet
;
packet
.
target_system
=
target_system
;
packet
.
target_component
=
target_component
;
packet
.
idx
=
idx
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FENCE_FETCH_POINT
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
3
,
68
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
}
/**
...
...
@@ -119,19 +130,27 @@ static inline uint16_t mavlink_msg_fence_fetch_point_encode(uint8_t system_id, u
static
inline
void
mavlink_msg_fence_fetch_point_send
(
mavlink_channel_t
chan
,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
idx
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
3
];
char
buf
[
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
target_system
);
_mav_put_uint8_t
(
buf
,
1
,
target_component
);
_mav_put_uint8_t
(
buf
,
2
,
idx
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT
,
buf
,
3
,
68
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT
,
buf
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT
,
buf
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
#else
mavlink_fence_fetch_point_t
packet
;
packet
.
target_system
=
target_system
;
packet
.
target_component
=
target_component
;
packet
.
idx
=
idx
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT
,
(
const
char
*
)
&
packet
,
3
,
68
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
#endif
}
...
...
@@ -183,6 +202,6 @@ static inline void mavlink_msg_fence_fetch_point_decode(const mavlink_message_t*
fence_fetch_point
->
target_component
=
mavlink_msg_fence_fetch_point_get_target_component
(
msg
);
fence_fetch_point
->
idx
=
mavlink_msg_fence_fetch_point_get_idx
(
msg
);
#else
memcpy
(
fence_fetch_point
,
_MAV_PAYLOAD
(
msg
),
3
);
memcpy
(
fence_fetch_point
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_point.h
View file @
44684144
...
...
@@ -15,6 +15,9 @@ typedef struct __mavlink_fence_point_t
#define MAVLINK_MSG_ID_FENCE_POINT_LEN 12
#define MAVLINK_MSG_ID_160_LEN 12
#define MAVLINK_MSG_ID_FENCE_POINT_CRC 78
#define MAVLINK_MSG_ID_160_CRC 78
#define MAVLINK_MESSAGE_INFO_FENCE_POINT { \
...
...
@@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
idx
,
uint8_t
count
,
float
lat
,
float
lng
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
char
buf
[
MAVLINK_MSG_ID_FENCE_POINT_LEN
];
_mav_put_float
(
buf
,
0
,
lat
);
_mav_put_float
(
buf
,
4
,
lng
);
_mav_put_uint8_t
(
buf
,
8
,
target_system
);
...
...
@@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
_mav_put_uint8_t
(
buf
,
10
,
idx
);
_mav_put_uint8_t
(
buf
,
11
,
count
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#else
mavlink_fence_point_t
packet
;
packet
.
lat
=
lat
;
...
...
@@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
packet
.
idx
=
idx
;
packet
.
count
=
count
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FENCE_POINT
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
78
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_POINT_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
}
/**
...
...
@@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
idx
,
uint8_t
count
,
float
lat
,
float
lng
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
char
buf
[
MAVLINK_MSG_ID_FENCE_POINT_LEN
];
_mav_put_float
(
buf
,
0
,
lat
);
_mav_put_float
(
buf
,
4
,
lng
);
_mav_put_uint8_t
(
buf
,
8
,
target_system
);
...
...
@@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
_mav_put_uint8_t
(
buf
,
10
,
idx
);
_mav_put_uint8_t
(
buf
,
11
,
count
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#else
mavlink_fence_point_t
packet
;
packet
.
lat
=
lat
;
...
...
@@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
packet
.
idx
=
idx
;
packet
.
count
=
count
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FENCE_POINT
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
78
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_POINT_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
}
/**
...
...
@@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_fence_point_encode(uint8_t system_id, uint8_t
static
inline
void
mavlink_msg_fence_point_send
(
mavlink_channel_t
chan
,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
idx
,
uint8_t
count
,
float
lat
,
float
lng
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
char
buf
[
MAVLINK_MSG_ID_FENCE_POINT_LEN
];
_mav_put_float
(
buf
,
0
,
lat
);
_mav_put_float
(
buf
,
4
,
lng
);
_mav_put_uint8_t
(
buf
,
8
,
target_system
);
...
...
@@ -154,7 +165,11 @@ static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint8_t
_mav_put_uint8_t
(
buf
,
10
,
idx
);
_mav_put_uint8_t
(
buf
,
11
,
count
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_POINT
,
buf
,
12
,
78
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_POINT
,
buf
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_POINT_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_POINT
,
buf
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
#else
mavlink_fence_point_t
packet
;
packet
.
lat
=
lat
;
...
...
@@ -164,7 +179,11 @@ static inline void mavlink_msg_fence_point_send(mavlink_channel_t chan, uint8_t
packet
.
idx
=
idx
;
packet
.
count
=
count
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_POINT
,
(
const
char
*
)
&
packet
,
12
,
78
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_POINT
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
,
MAVLINK_MSG_ID_FENCE_POINT_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_POINT
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
#endif
}
...
...
@@ -249,6 +268,6 @@ static inline void mavlink_msg_fence_point_decode(const mavlink_message_t* msg,
fence_point
->
idx
=
mavlink_msg_fence_point_get_idx
(
msg
);
fence_point
->
count
=
mavlink_msg_fence_point_get_count
(
msg
);
#else
memcpy
(
fence_point
,
_MAV_PAYLOAD
(
msg
),
12
);
memcpy
(
fence_point
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_FENCE_POINT_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_fence_status.h
View file @
44684144
...
...
@@ -13,6 +13,9 @@ typedef struct __mavlink_fence_status_t
#define MAVLINK_MSG_ID_FENCE_STATUS_LEN 8
#define MAVLINK_MSG_ID_162_LEN 8
#define MAVLINK_MSG_ID_FENCE_STATUS_CRC 189
#define MAVLINK_MSG_ID_162_CRC 189
#define MAVLINK_MESSAGE_INFO_FENCE_STATUS { \
...
...
@@ -42,13 +45,13 @@ static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t
uint8_t
breach_status
,
uint16_t
breach_count
,
uint8_t
breach_type
,
uint32_t
breach_time
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
8
];
char
buf
[
MAVLINK_MSG_ID_FENCE_STATUS_LEN
];
_mav_put_uint32_t
(
buf
,
0
,
breach_time
);
_mav_put_uint16_t
(
buf
,
4
,
breach_count
);
_mav_put_uint8_t
(
buf
,
6
,
breach_status
);
_mav_put_uint8_t
(
buf
,
7
,
breach_type
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
8
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#else
mavlink_fence_status_t
packet
;
packet
.
breach_time
=
breach_time
;
...
...
@@ -56,11 +59,15 @@ static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t
packet
.
breach_status
=
breach_status
;
packet
.
breach_type
=
breach_type
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
8
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FENCE_STATUS
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
8
,
189
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
,
MAVLINK_MSG_ID_FENCE_STATUS_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
}
/**
...
...
@@ -80,13 +87,13 @@ static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uin
uint8_t
breach_status
,
uint16_t
breach_count
,
uint8_t
breach_type
,
uint32_t
breach_time
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
8
];
char
buf
[
MAVLINK_MSG_ID_FENCE_STATUS_LEN
];
_mav_put_uint32_t
(
buf
,
0
,
breach_time
);
_mav_put_uint16_t
(
buf
,
4
,
breach_count
);
_mav_put_uint8_t
(
buf
,
6
,
breach_status
);
_mav_put_uint8_t
(
buf
,
7
,
breach_type
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
8
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#else
mavlink_fence_status_t
packet
;
packet
.
breach_time
=
breach_time
;
...
...
@@ -94,11 +101,15 @@ static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uin
packet
.
breach_status
=
breach_status
;
packet
.
breach_type
=
breach_type
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
8
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FENCE_STATUS
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
8
,
189
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
,
MAVLINK_MSG_ID_FENCE_STATUS_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
}
/**
...
...
@@ -128,13 +139,17 @@ static inline uint16_t mavlink_msg_fence_status_encode(uint8_t system_id, uint8_
static
inline
void
mavlink_msg_fence_status_send
(
mavlink_channel_t
chan
,
uint8_t
breach_status
,
uint16_t
breach_count
,
uint8_t
breach_type
,
uint32_t
breach_time
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
8
];
char
buf
[
MAVLINK_MSG_ID_FENCE_STATUS_LEN
];
_mav_put_uint32_t
(
buf
,
0
,
breach_time
);
_mav_put_uint16_t
(
buf
,
4
,
breach_count
);
_mav_put_uint8_t
(
buf
,
6
,
breach_status
);
_mav_put_uint8_t
(
buf
,
7
,
breach_type
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_STATUS
,
buf
,
8
,
189
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_STATUS
,
buf
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
,
MAVLINK_MSG_ID_FENCE_STATUS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_STATUS
,
buf
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
#else
mavlink_fence_status_t
packet
;
packet
.
breach_time
=
breach_time
;
...
...
@@ -142,7 +157,11 @@ static inline void mavlink_msg_fence_status_send(mavlink_channel_t chan, uint8_t
packet
.
breach_status
=
breach_status
;
packet
.
breach_type
=
breach_type
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_STATUS
,
(
const
char
*
)
&
packet
,
8
,
189
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_STATUS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
,
MAVLINK_MSG_ID_FENCE_STATUS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FENCE_STATUS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
#endif
}
...
...
@@ -205,6 +224,6 @@ static inline void mavlink_msg_fence_status_decode(const mavlink_message_t* msg,
fence_status
->
breach_status
=
mavlink_msg_fence_status_get_breach_status
(
msg
);
fence_status
->
breach_type
=
mavlink_msg_fence_status_get_breach_type
(
msg
);
#else
memcpy
(
fence_status
,
_MAV_PAYLOAD
(
msg
),
8
);
memcpy
(
fence_status
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_FENCE_STATUS_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_hwstatus.h
View file @
44684144
...
...
@@ -11,6 +11,9 @@ typedef struct __mavlink_hwstatus_t
#define MAVLINK_MSG_ID_HWSTATUS_LEN 3
#define MAVLINK_MSG_ID_165_LEN 3
#define MAVLINK_MSG_ID_HWSTATUS_CRC 21
#define MAVLINK_MSG_ID_165_CRC 21
#define MAVLINK_MESSAGE_INFO_HWSTATUS { \
...
...
@@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_hwstatus_pack(uint8_t system_id, uint8_t comp
uint16_t
Vcc
,
uint8_t
I2Cerr
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
3
];
char
buf
[
MAVLINK_MSG_ID_HWSTATUS_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
Vcc
);
_mav_put_uint8_t
(
buf
,
2
,
I2Cerr
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#else
mavlink_hwstatus_t
packet
;
packet
.
Vcc
=
Vcc
;
packet
.
I2Cerr
=
I2Cerr
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_HWSTATUS
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
3
,
21
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_HWSTATUS_LEN
,
MAVLINK_MSG_ID_HWSTATUS_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
}
/**
...
...
@@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_hwstatus_pack_chan(uint8_t system_id, uint8_t
uint16_t
Vcc
,
uint8_t
I2Cerr
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
3
];
char
buf
[
MAVLINK_MSG_ID_HWSTATUS_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
Vcc
);
_mav_put_uint8_t
(
buf
,
2
,
I2Cerr
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#else
mavlink_hwstatus_t
packet
;
packet
.
Vcc
=
Vcc
;
packet
.
I2Cerr
=
I2Cerr
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_HWSTATUS
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
3
,
21
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_HWSTATUS_LEN
,
MAVLINK_MSG_ID_HWSTATUS_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
}
/**
...
...
@@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_hwstatus_encode(uint8_t system_id, uint8_t co
static
inline
void
mavlink_msg_hwstatus_send
(
mavlink_channel_t
chan
,
uint16_t
Vcc
,
uint8_t
I2Cerr
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
3
];
char
buf
[
MAVLINK_MSG_ID_HWSTATUS_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
Vcc
);
_mav_put_uint8_t
(
buf
,
2
,
I2Cerr
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_HWSTATUS
,
buf
,
3
,
21
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_HWSTATUS
,
buf
,
MAVLINK_MSG_ID_HWSTATUS_LEN
,
MAVLINK_MSG_ID_HWSTATUS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_HWSTATUS
,
buf
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
#else
mavlink_hwstatus_t
packet
;
packet
.
Vcc
=
Vcc
;
packet
.
I2Cerr
=
I2Cerr
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_HWSTATUS
,
(
const
char
*
)
&
packet
,
3
,
21
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_HWSTATUS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_HWSTATUS_LEN
,
MAVLINK_MSG_ID_HWSTATUS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_HWSTATUS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
#endif
}
...
...
@@ -161,6 +180,6 @@ static inline void mavlink_msg_hwstatus_decode(const mavlink_message_t* msg, mav
hwstatus
->
Vcc
=
mavlink_msg_hwstatus_get_Vcc
(
msg
);
hwstatus
->
I2Cerr
=
mavlink_msg_hwstatus_get_I2Cerr
(
msg
);
#else
memcpy
(
hwstatus
,
_MAV_PAYLOAD
(
msg
),
3
);
memcpy
(
hwstatus
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_HWSTATUS_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_limits_status.h
View file @
44684144
...
...
@@ -18,6 +18,9 @@ typedef struct __mavlink_limits_status_t
#define MAVLINK_MSG_ID_LIMITS_STATUS_LEN 22
#define MAVLINK_MSG_ID_167_LEN 22
#define MAVLINK_MSG_ID_LIMITS_STATUS_CRC 144
#define MAVLINK_MSG_ID_167_CRC 144
#define MAVLINK_MESSAGE_INFO_LIMITS_STATUS { \
...
...
@@ -57,7 +60,7 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
uint8_t
limits_state
,
uint32_t
last_trigger
,
uint32_t
last_action
,
uint32_t
last_recovery
,
uint32_t
last_clear
,
uint16_t
breach_count
,
uint8_t
mods_enabled
,
uint8_t
mods_required
,
uint8_t
mods_triggered
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
22
];
char
buf
[
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
];
_mav_put_uint32_t
(
buf
,
0
,
last_trigger
);
_mav_put_uint32_t
(
buf
,
4
,
last_action
);
_mav_put_uint32_t
(
buf
,
8
,
last_recovery
);
...
...
@@ -68,7 +71,7 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
_mav_put_uint8_t
(
buf
,
20
,
mods_required
);
_mav_put_uint8_t
(
buf
,
21
,
mods_triggered
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
22
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#else
mavlink_limits_status_t
packet
;
packet
.
last_trigger
=
last_trigger
;
...
...
@@ -81,11 +84,15 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
packet
.
mods_required
=
mods_required
;
packet
.
mods_triggered
=
mods_triggered
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
22
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_LIMITS_STATUS
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
22
,
144
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
,
MAVLINK_MSG_ID_LIMITS_STATUS_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
}
/**
...
...
@@ -110,7 +117,7 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
uint8_t
limits_state
,
uint32_t
last_trigger
,
uint32_t
last_action
,
uint32_t
last_recovery
,
uint32_t
last_clear
,
uint16_t
breach_count
,
uint8_t
mods_enabled
,
uint8_t
mods_required
,
uint8_t
mods_triggered
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
22
];
char
buf
[
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
];
_mav_put_uint32_t
(
buf
,
0
,
last_trigger
);
_mav_put_uint32_t
(
buf
,
4
,
last_action
);
_mav_put_uint32_t
(
buf
,
8
,
last_recovery
);
...
...
@@ -121,7 +128,7 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
_mav_put_uint8_t
(
buf
,
20
,
mods_required
);
_mav_put_uint8_t
(
buf
,
21
,
mods_triggered
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
22
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#else
mavlink_limits_status_t
packet
;
packet
.
last_trigger
=
last_trigger
;
...
...
@@ -134,11 +141,15 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
packet
.
mods_required
=
mods_required
;
packet
.
mods_triggered
=
mods_triggered
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
22
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_LIMITS_STATUS
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
22
,
144
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
,
MAVLINK_MSG_ID_LIMITS_STATUS_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
}
/**
...
...
@@ -173,7 +184,7 @@ static inline uint16_t mavlink_msg_limits_status_encode(uint8_t system_id, uint8
static
inline
void
mavlink_msg_limits_status_send
(
mavlink_channel_t
chan
,
uint8_t
limits_state
,
uint32_t
last_trigger
,
uint32_t
last_action
,
uint32_t
last_recovery
,
uint32_t
last_clear
,
uint16_t
breach_count
,
uint8_t
mods_enabled
,
uint8_t
mods_required
,
uint8_t
mods_triggered
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
22
];
char
buf
[
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
];
_mav_put_uint32_t
(
buf
,
0
,
last_trigger
);
_mav_put_uint32_t
(
buf
,
4
,
last_action
);
_mav_put_uint32_t
(
buf
,
8
,
last_recovery
);
...
...
@@ -184,7 +195,11 @@ static inline void mavlink_msg_limits_status_send(mavlink_channel_t chan, uint8_
_mav_put_uint8_t
(
buf
,
20
,
mods_required
);
_mav_put_uint8_t
(
buf
,
21
,
mods_triggered
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS
,
buf
,
22
,
144
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS
,
buf
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
,
MAVLINK_MSG_ID_LIMITS_STATUS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS
,
buf
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
#else
mavlink_limits_status_t
packet
;
packet
.
last_trigger
=
last_trigger
;
...
...
@@ -197,7 +212,11 @@ static inline void mavlink_msg_limits_status_send(mavlink_channel_t chan, uint8_
packet
.
mods_required
=
mods_required
;
packet
.
mods_triggered
=
mods_triggered
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS
,
(
const
char
*
)
&
packet
,
22
,
144
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
,
MAVLINK_MSG_ID_LIMITS_STATUS_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LIMITS_STATUS
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
#endif
}
...
...
@@ -315,6 +334,6 @@ static inline void mavlink_msg_limits_status_decode(const mavlink_message_t* msg
limits_status
->
mods_required
=
mavlink_msg_limits_status_get_mods_required
(
msg
);
limits_status
->
mods_triggered
=
mavlink_msg_limits_status_get_mods_triggered
(
msg
);
#else
memcpy
(
limits_status
,
_MAV_PAYLOAD
(
msg
),
22
);
memcpy
(
limits_status
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_LIMITS_STATUS_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_meminfo.h
View file @
44684144
...
...
@@ -11,6 +11,9 @@ typedef struct __mavlink_meminfo_t
#define MAVLINK_MSG_ID_MEMINFO_LEN 4
#define MAVLINK_MSG_ID_152_LEN 4
#define MAVLINK_MSG_ID_MEMINFO_CRC 208
#define MAVLINK_MSG_ID_152_CRC 208
#define MAVLINK_MESSAGE_INFO_MEMINFO { \
...
...
@@ -36,21 +39,25 @@ static inline uint16_t mavlink_msg_meminfo_pack(uint8_t system_id, uint8_t compo
uint16_t
brkval
,
uint16_t
freemem
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
char
buf
[
MAVLINK_MSG_ID_MEMINFO_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
brkval
);
_mav_put_uint16_t
(
buf
,
2
,
freemem
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#else
mavlink_meminfo_t
packet
;
packet
.
brkval
=
brkval
;
packet
.
freemem
=
freemem
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_MEMINFO
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
4
,
208
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_MEMINFO_LEN
,
MAVLINK_MSG_ID_MEMINFO_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
}
/**
...
...
@@ -68,21 +75,25 @@ static inline uint16_t mavlink_msg_meminfo_pack_chan(uint8_t system_id, uint8_t
uint16_t
brkval
,
uint16_t
freemem
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
char
buf
[
MAVLINK_MSG_ID_MEMINFO_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
brkval
);
_mav_put_uint16_t
(
buf
,
2
,
freemem
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#else
mavlink_meminfo_t
packet
;
packet
.
brkval
=
brkval
;
packet
.
freemem
=
freemem
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_MEMINFO
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
4
,
208
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_MEMINFO_LEN
,
MAVLINK_MSG_ID_MEMINFO_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
}
/**
...
...
@@ -110,17 +121,25 @@ static inline uint16_t mavlink_msg_meminfo_encode(uint8_t system_id, uint8_t com
static
inline
void
mavlink_msg_meminfo_send
(
mavlink_channel_t
chan
,
uint16_t
brkval
,
uint16_t
freemem
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
char
buf
[
MAVLINK_MSG_ID_MEMINFO_LEN
];
_mav_put_uint16_t
(
buf
,
0
,
brkval
);
_mav_put_uint16_t
(
buf
,
2
,
freemem
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MEMINFO
,
buf
,
4
,
208
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MEMINFO
,
buf
,
MAVLINK_MSG_ID_MEMINFO_LEN
,
MAVLINK_MSG_ID_MEMINFO_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MEMINFO
,
buf
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
#else
mavlink_meminfo_t
packet
;
packet
.
brkval
=
brkval
;
packet
.
freemem
=
freemem
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MEMINFO
,
(
const
char
*
)
&
packet
,
4
,
208
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MEMINFO
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_MEMINFO_LEN
,
MAVLINK_MSG_ID_MEMINFO_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MEMINFO
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
#endif
}
...
...
@@ -161,6 +180,6 @@ static inline void mavlink_msg_meminfo_decode(const mavlink_message_t* msg, mavl
meminfo
->
brkval
=
mavlink_msg_meminfo_get_brkval
(
msg
);
meminfo
->
freemem
=
mavlink_msg_meminfo_get_freemem
(
msg
);
#else
memcpy
(
meminfo
,
_MAV_PAYLOAD
(
msg
),
4
);
memcpy
(
meminfo
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_MEMINFO_LEN
);
#endif
}
libs/mavlink/include/mavlink/v1.0/ardupilotmega/mavlink_msg_mount_configure.h
View file @
44684144
...
...
@@ -15,6 +15,9 @@ typedef struct __mavlink_mount_configure_t
#define MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN 6
#define MAVLINK_MSG_ID_156_LEN 6
#define MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC 19
#define MAVLINK_MSG_ID_156_CRC 19
#define MAVLINK_MESSAGE_INFO_MOUNT_CONFIGURE { \
...
...
@@ -48,7 +51,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
mount_mode
,
uint8_t
stab_roll
,
uint8_t
stab_pitch
,
uint8_t
stab_yaw
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
6
];
char
buf
[
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
target_system
);
_mav_put_uint8_t
(
buf
,
1
,
target_component
);
_mav_put_uint8_t
(
buf
,
2
,
mount_mode
);
...
...
@@ -56,7 +59,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
_mav_put_uint8_t
(
buf
,
4
,
stab_pitch
);
_mav_put_uint8_t
(
buf
,
5
,
stab_yaw
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
6
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#else
mavlink_mount_configure_t
packet
;
packet
.
target_system
=
target_system
;
...
...
@@ -66,11 +69,15 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
packet
.
stab_pitch
=
stab_pitch
;
packet
.
stab_yaw
=
stab_yaw
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
6
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_MOUNT_CONFIGURE
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
6
,
19
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC
);
#else
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
}
/**
...
...
@@ -92,7 +99,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
mount_mode
,
uint8_t
stab_roll
,
uint8_t
stab_pitch
,
uint8_t
stab_yaw
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
6
];
char
buf
[
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
target_system
);
_mav_put_uint8_t
(
buf
,
1
,
target_component
);
_mav_put_uint8_t
(
buf
,
2
,
mount_mode
);
...
...
@@ -100,7 +107,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
_mav_put_uint8_t
(
buf
,
4
,
stab_pitch
);
_mav_put_uint8_t
(
buf
,
5
,
stab_yaw
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
6
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#else
mavlink_mount_configure_t
packet
;
packet
.
target_system
=
target_system
;
...
...
@@ -110,11 +117,15 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
packet
.
stab_pitch
=
stab_pitch
;
packet
.
stab_yaw
=
stab_yaw
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
6
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_MOUNT_CONFIGURE
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
6
,
19
);
#if MAVLINK_CRC_EXTRA
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC
);
#else
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
}
/**
...
...
@@ -146,7 +157,7 @@ static inline uint16_t mavlink_msg_mount_configure_encode(uint8_t system_id, uin
static
inline
void
mavlink_msg_mount_configure_send
(
mavlink_channel_t
chan
,
uint8_t
target_system
,
uint8_t
target_component
,
uint8_t
mount_mode
,
uint8_t
stab_roll
,
uint8_t
stab_pitch
,
uint8_t
stab_yaw
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
6
];
char
buf
[
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
];
_mav_put_uint8_t
(
buf
,
0
,
target_system
);
_mav_put_uint8_t
(
buf
,
1
,
target_component
);
_mav_put_uint8_t
(
buf
,
2
,
mount_mode
);
...
...
@@ -154,7 +165,11 @@ static inline void mavlink_msg_mount_configure_send(mavlink_channel_t chan, uint
_mav_put_uint8_t
(
buf
,
4
,
stab_pitch
);
_mav_put_uint8_t
(
buf
,
5
,
stab_yaw
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE
,
buf
,
6
,
19
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE
,
buf
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE
,
buf
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
#else
mavlink_mount_configure_t
packet
;
packet
.
target_system
=
target_system
;
...
...
@@ -164,7 +179,11 @@ static inline void mavlink_msg_mount_configure_send(mavlink_channel_t chan, uint
packet
.
stab_pitch
=
stab_pitch
;
packet
.
stab_yaw
=
stab_yaw
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE
,
(
const
char
*
)
&
packet
,
6
,
19
);
#if MAVLINK_CRC_EXTRA
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC
);
#else
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE
,
(
const
char
*
)
&
packet
,
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
#endif
}
...
...
@@ -249,6 +268,6 @@ static inline void mavlink_msg_mount_configure_decode(const mavlink_message_t* m
mount_configure
->
stab_pitch
=
mavlink_msg_mount_configure_get_stab_pitch
(
msg
);
mount_configure
->
stab_yaw
=
mavlink_msg_mount_configure_get_stab_yaw
(
msg
);
#else
memcpy
(
mount_configure
,
_MAV_PAYLOAD
(
msg
),
6
);
memcpy
(
mount_configure
,
_MAV_PAYLOAD
(
msg
),
MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN
);
#endif
}
Prev
1
2
3
4
5
…
13
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment