Compare commits
117 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 233757d0fe | |||
| d038a0a353 | |||
| 30c87f5cf5 | |||
| eca752d80d | |||
| d30176763f | |||
| d08e1e8e7a | |||
| e7a7916d8a | |||
| dd3a41e4ce | |||
| 62183fc8dd | |||
| 30ce4a328d | |||
| 4f55c6d3aa | |||
| defb936d33 | |||
| bc8d6ef9c0 | |||
| eb14396223 | |||
| b3d5b7c107 | |||
| a02dc351f3 | |||
| 831866bf26 | |||
| ec7dbcfa59 | |||
| 246076dcd7 | |||
| 9d4887d864 | |||
| 3d603143dd | |||
| 121dad121c | |||
| 95a1fd273b | |||
| 05e46242b0 | |||
| c163e2513b | |||
| bbb2b25ac8 | |||
| dc29a32f02 | |||
| cefd7ee08c | |||
| 8af733fb3d | |||
| 1cb4834c38 | |||
| cb28cccf50 | |||
| 498323a8e2 | |||
| a518696cad | |||
| 8429ab57b3 | |||
| 740fc27d5c | |||
| 1c77990d0f | |||
| 53473e75ea | |||
| e2b645bf5b | |||
| fa386a9477 | |||
| 96c49676d4 | |||
| 851c4c0225 | |||
| 8453e13fe1 | |||
| 347283cb32 | |||
| 1c940aebb4 | |||
| 0b48b71c56 | |||
| 2db13ce1a4 | |||
| 3f036e38b5 | |||
| 013a7d3fb5 | |||
| 080240d16f | |||
| 102d069400 | |||
| 9c0b09855c | |||
| 17b347e785 | |||
| 3e61939b0b | |||
| a43e1a8025 | |||
| 20af6b2c0e | |||
| d2322c738d | |||
| 8c4610ede7 | |||
| cb3a0cb823 | |||
| c6ff076bd8 | |||
| f4e0724018 | |||
| 9de6c04844 | |||
| dfacf867c1 | |||
| 035e0df210 | |||
| 34445b6f15 | |||
| d5e7bf2433 | |||
| 5441c10412 | |||
| cc6e00e806 | |||
| bab514ff75 | |||
| 900b3249d4 | |||
| 1c7e7226de | |||
| 0394b70d40 | |||
| 514022284c | |||
| 94ffd75c88 | |||
| 2e1ac80a25 | |||
| b130a8dbbd | |||
| 306e3886d7 | |||
| 3f47a2daf5 | |||
| 666b3ad94c | |||
| 52142e5ea5 | |||
| ad25ad00b1 | |||
| 79e152e1bf | |||
| 07c786d19c | |||
| ab7a99b9af | |||
| 9de9bc8147 | |||
| 381b786025 | |||
| 4e100c542d | |||
| 56bcdec148 | |||
| 2d90443257 | |||
| dfbd269c4d | |||
| 53baa62e48 | |||
| 6b49ae7c23 | |||
| c50ff6c1ff | |||
| 980b2cb0dd | |||
| 0ef7021cff | |||
| 308537ed17 | |||
| 5419429ad0 | |||
| 42dc9ddf35 | |||
| da654f45c6 | |||
| b8d5c343a8 | |||
| 091d5122af | |||
| 87c86e344a | |||
| 9b8320a8e4 | |||
| 9d600f6119 | |||
| 3c88b34ba3 | |||
| 7ee9b0a064 | |||
| b069829a5d | |||
| e78f8de757 | |||
| 33aa4f00b1 | |||
| 8c76a379b5 | |||
| 52dd8fc3c3 | |||
| abe6eddc58 | |||
| 3bf24aff2f | |||
| b3c11ef02c | |||
| 2945ee250a | |||
| 6fc96cb786 | |||
| afe979d51f | |||
| 460046cb4b |
@@ -1,5 +0,0 @@
|
||||
TODO list (no particular order)
|
||||
|
||||
- DSM2 channel order (Cam)
|
||||
- Variometer (rate as cm/sec)
|
||||
- Trace telemetry data
|
||||
-235
@@ -1,235 +0,0 @@
|
||||
******************************************
|
||||
CHANGELOG: 07-05-2012 BSS
|
||||
AutoSwitch feature added
|
||||
Mix Warning was not so regular (sometime 2 ticks instead of 3)
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 06-05-2012 BSS
|
||||
FW options now stored in a byte of the EEPROM
|
||||
[Arm] getSwitch() problem with Custom Switches
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 05-05-2012 BSS
|
||||
[FrSky] Speed in Gauges configuration was buggy
|
||||
[FrSky] We stored Min Speed instead of Max Speed
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 04-05-2012 BSS
|
||||
Momentary Switches in Function Switches
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 03-05-2012 BSS
|
||||
[Arm] Audio / Haptic refactoring
|
||||
[Arm] Timer blocked at 10:55
|
||||
[V4] SDcard menu reworked
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 02-05-2012 BSS
|
||||
[V4/Arm] Problem in Models Move
|
||||
[stock] Flash saving (840bytes)
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 01-05-2012 BSS
|
||||
[FrSky] GPS distance bug fix
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 29-04-2012 BSS
|
||||
[V4/Arm] EEPROM marked as dirty on reboot
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 27-04-2012 BSS
|
||||
Vario feature added
|
||||
New EEPROM format 205
|
||||
[FrSky] Telemetry offset for A1/A2 on 12bits
|
||||
[V4] Models with empty name bug when SDcard backup
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 26-04-2012 BSS
|
||||
[Arm] 32Channels 9Phases 64Mixes 32Expos 32VSwitches 32FSwitches
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 23-04-2012 BSS
|
||||
[V4] SDcard Models storage implemented
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 20-04-2012 BSS
|
||||
[Stock] 400bytes flash saving
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 15-03-2012 BSS
|
||||
FAAST option in protocol to enable startPulses before the splash screen
|
||||
Telemetry configurable screen
|
||||
Confirmation before applying templates
|
||||
Used channels cleaned before applying a template
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 14-03-2012 BSS
|
||||
Potscroll option added
|
||||
|
||||
******************************************
|
||||
|
||||
Version 364:
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 04-03-2012 BSS
|
||||
New EEPROM format 205
|
||||
Introduction of differential in Mixers
|
||||
Introduction of Switches as Mixer Source (FULL now removed)
|
||||
Negative curves in Mixers
|
||||
Optimizations in Mixer
|
||||
Extended chars for localization
|
||||
Swedish translations
|
||||
Beep length updated
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 01-03-2012 BSS
|
||||
Feature "Use THR trim as a slider" now finished
|
||||
[FrSky] Jitter (2us) introduced by last optimization removed
|
||||
Trim parameter in Mixer is OFF if the source is not a stick
|
||||
GPS distance fixed
|
||||
|
||||
******************************************
|
||||
|
||||
Version 304:
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 28-02-2012 BSS
|
||||
Flash saving (600bytes)
|
||||
[FrSky] NO DATA displayed on the status line when nothing received
|
||||
Sticks/Pots center beep now more accurate
|
||||
Beeps length for center beep and inactivity reduced
|
||||
Vibration when MIN/MID/MAX trim position reached
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 27-02-2012 BSS
|
||||
Flash saving (idea from er9x)
|
||||
Trims2Offsets function removed
|
||||
A "Safety CHxx" function is not applied when it is currently edited
|
||||
The Stick Mode needs confirmation before being applied
|
||||
|
||||
******************************************
|
||||
|
||||
Version 288:
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 24-02-2012 BSS
|
||||
Throttle Trace bug solved when using P1-P3
|
||||
New way of dealing with recursive mixers in Flight Phases (with FadeIn / FadeOut)
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 23-02-2012 BSS
|
||||
PXX updates + optimizations pulled from er9x
|
||||
FrSky TELEMETRY menu is now moved to [DOWN long]
|
||||
Optimizations
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 22-02-2012 BSS
|
||||
Blades count may now be 4
|
||||
V4: New mixers/expos fields inflight modifiable through RE1
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 21-02-2012 BSS
|
||||
V4: Logs format ported from gruvin9x
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 20-02-2012 BSS
|
||||
Last GPS coords displayed even when streaming stops (model lost)
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 19-02-2012 BSS
|
||||
V4: Inflight fields modification through RE1 feature added
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 17-02-2012 BSS
|
||||
RSSI thresholds on a per model basis
|
||||
Flash Saving
|
||||
FrSky Hub variometer + cells voltage fix
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 16-02-2012 BSS
|
||||
Beeper mode splitted from Beeper length
|
||||
Haptic redesigned
|
||||
No FrSky alarms when Tx asked to be quiet
|
||||
Flash Saving
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 14-02-2012 BSS
|
||||
Blades count configuration for RPMs
|
||||
Instant trim bug fixed for stick modes != RETA
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 1O-02-2012 BSS
|
||||
Copyright updated
|
||||
GPS distance and speed bug fixes
|
||||
|
||||
******************************************
|
||||
|
||||
Version 232:
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 09-02-2012 BSS
|
||||
Multiplier added for telemetry A1/A2 => 204.0v!
|
||||
GPS distance added
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 08-02-2012 BSS
|
||||
Telemetry bars screen
|
||||
Add individual cell voltages from FrSky Hub 2.0
|
||||
New units for A1/A2
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 06-02-2012 BSS
|
||||
Flash saving
|
||||
Telemetry screens redesigned
|
||||
|
||||
******************************************
|
||||
|
||||
Version 213:
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 05-02-2012 BSS
|
||||
Add GPS speed display, with max speed
|
||||
GPS screen redesigned
|
||||
|
||||
******************************************
|
||||
|
||||
Version 205:
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 04-02-2012 BSS
|
||||
New way of configuring A1 and A2 using Range and Offset
|
||||
Named sounds in Func Switches
|
||||
Haptic only sounds skipped when HAPTIC option disable
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 03-02-2012 BSS
|
||||
Safety switches screen removed (moved to Func Switches)
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 02-02-2012 BSS
|
||||
French translations updated
|
||||
AUDIO optimizations
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 01-02-2012 BSS
|
||||
AUDIO and HAPTIC may be enabled separately
|
||||
AUDIO bug fixes
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 31-01-2012 BSS
|
||||
HAPTIC now working
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 29-01-2012 BSS
|
||||
Inactivity timer reset on Keys and Trims press
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 28-01-2012 BSS
|
||||
New splash
|
||||
|
||||
******************************************
|
||||
CHANGELOG: 27-01-2012 BSS
|
||||
NMEA and ARDUPILOT ported from er9x
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<SVN CURRENT>
|
||||
|
||||
<h2>2834 / 2013-10-29</h2>
|
||||
|
||||
<h2>2768 / 2013-09-20</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>Name badly displayed after SD Model Restore</li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
<ul>
|
||||
<li>Custom switches not working when comparing a timer with a value (stock only without telemetry mod)</li>
|
||||
</ul>
|
||||
|
||||
[sky9x/gruvin]
|
||||
<ul>
|
||||
<li>Fixes in logging function</li>
|
||||
<li>Confirmation Popup before SD Format</li>
|
||||
</ul>
|
||||
|
||||
<h2>2751 / 2013-09-01</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>Fixes in translations (FR, IT, PT)</li>
|
||||
</ul>
|
||||
|
||||
<h2>2746 / 2013-08-30</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>Limits are now [-125:0] and [0:125] instead of [-125:25] and [-25:125]</li>
|
||||
<li>INPUTS instead of STICKS for BL activation</li>
|
||||
<li>Curves presets bug fix</li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
<ul>
|
||||
<li>Fix bug with Battery calibration</li>
|
||||
<li>14051 can be used for THR and AIL connections (telemetry)</li>
|
||||
<li>CH1 PPM output was truncated</li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
<ul>
|
||||
<li>Flight mode sound files now are read from: /SOUNDS/(lang)/modelname/fpname-ON.wav and /SOUNDS/(lang)/modelname/fpname-OFF.wav</li>
|
||||
</ul>
|
||||
|
||||
<h2>2688 / 2013-07-28</h2>
|
||||
[stock]
|
||||
<ul>
|
||||
<li>Fix bug with imperial units</li>
|
||||
</ul>
|
||||
|
||||
[gruvin9x]
|
||||
<ul>
|
||||
<li>Fix bug with imperial units</li>
|
||||
<li>Fix small bug with SOMO 14D </li>
|
||||
<li>Telemetry logs renamed modelname-yyyy-mm-dd.csv</li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
<ul>
|
||||
<li>Telemetry logs renamed modelname-yyyy-mm-dd.csv</li>
|
||||
</ul>
|
||||
|
||||
<h2>2647 / 2013-07-21</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>Some bug fixes</li>
|
||||
<li>Better fonts</li>
|
||||
</ul>
|
||||
|
||||
<h2>2491 / 2013-06-24</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>PlaySound has now a repeat argument</li>
|
||||
<li>FAI mode added (disable telemetry other than A1/A2/RSSI for contests)</li>
|
||||
<li>Delays now also apply to 3POS switch!</li>
|
||||
<li>RSSI alarms default thresholds now 45 / 42 </li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
<ul>
|
||||
<li>Flash savings</li>
|
||||
<li>Vario sink tones removed</li>
|
||||
<li>Audio files renumbered (see here) </li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
<ul>
|
||||
<li>Audio mixer: several sounds can now be played simulataneously, and beeps won't interrupt and clear voice alerts anymore. Note that sound files now need to have sampling rates of either 8, 16 or 32kHz and may need to be replaced. </li>
|
||||
</ul>
|
||||
|
||||
<h2>2413 / 2013-05-22</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>Calibration screen automatically appears following an EEPROM format</li>
|
||||
<li>Wraparound in popup menus </li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
<ul>
|
||||
<li>More options supported (novario / nogps / nogauges)</li>
|
||||
<li>Flash savings</li>
|
||||
<li>Mavlink huge rework by Rienk! </li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
<ul>
|
||||
<li>Audio language can now be selected in the general settings! Note that the sound files need to be moved to subfolders of the SOUNDS folder (SOUNDS/en for English, same with it, fr, de, pt, se, cz)</li>
|
||||
<li>More settings for the 2nd PPM port</li>
|
||||
</ul>
|
||||
|
||||
<h2>2215 / 2013-04-05</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>New option AUTOSOURCE to automatically select the stick / pot / switch which is moved when editing a Mix source </li>
|
||||
</ul>
|
||||
|
||||
[stock]
|
||||
<ul>
|
||||
<li>All prompts renumbered to have the "custom" prompts starting at 0 and to be able to use PlayTrack?(GVAR) with Adjust(GVAR) to play tracks sequences </li>
|
||||
</ul>
|
||||
|
||||
[gruvin9x]
|
||||
<ul>
|
||||
<li>Possibility to have both BEEPER and SPEAKER enable in the same time </li>
|
||||
</ul>
|
||||
|
||||
[sky9x]
|
||||
<ul>
|
||||
<li>Fixed a bug with audio stopped until next reboot in BackgroundMusic with no track selected</li>
|
||||
<li>Imperial is now an option selectable in the menus</li>
|
||||
<li>Possibility to have both BEEPER and SPEAKER enable in the same time</li>
|
||||
<li>New menu in Main Views / Telemetry Views</li>
|
||||
<li>Vario sounds improved!</li>
|
||||
<li>SD Folders renamed. "9XSOUNDS" becomes "SOUNDS", don't forget to updateyour cards!</li>
|
||||
</ul>
|
||||
@@ -0,0 +1,79 @@
|
||||
<SVN CURRENT>
|
||||
|
||||
<h2>2834 / 2013-10-29</h2>
|
||||
|
||||
<h2>2768 / 2013-09-20</h2>
|
||||
<ul>
|
||||
<li>SD card format confirmation popup</li>
|
||||
<li>Name badly displayed after SD Model Restore</li>
|
||||
<li>Model image not reloaded after Copy/Move/Delete/Restore</li>
|
||||
</ul>
|
||||
|
||||
<h2>2751 / 2013-09-01</h2>
|
||||
<ul>
|
||||
<li>Fixes in translations (FR, IT, PT)</li>
|
||||
</ul>
|
||||
|
||||
<h2>2746 / 2013-08-30</h2>
|
||||
<ul>
|
||||
<li>Rx voltage was not displayed on main screen if VFAS or CELLS chosen!</li>
|
||||
<li>GVARS can now refer to the GVAR of another phase</li>
|
||||
<li>Vario and Altitude bug fixes</li>
|
||||
<li>INPUTS instead of STICKS for BL activation</li>
|
||||
<li>PPM_UNIT=PREC0 / US taken into account in channels view</li>
|
||||
<li>DJT removed and receiver number hidden from PXX settings when proto != D16</li>
|
||||
<li>Limits are now [-125:0] and [0:125] instead of [-125:25] and [-25:125]</li>
|
||||
<li>Curves presets bug fix</li>
|
||||
<li>Flight mode sound files now are read from: /SOUNDS/(lang)/modelname/fpname-ON.wav and /SOUNDS/(lang)/modelname/fpname-OFF.wav</li>
|
||||
</ul>
|
||||
|
||||
<h2>2688 / 2013-07-28</h2>
|
||||
<ul>
|
||||
<li>Telemetry logs renamed modelname-yyyy-mm-dd.csv</li>
|
||||
</ul>
|
||||
|
||||
<h2>2667 / 2013-07-25 (Taranis only)</h2>
|
||||
<ul>
|
||||
<li>Brightness adjustment added</li>
|
||||
<li>Remove units from SWR</li>
|
||||
<li>Copy/Cut/Paste of custom functions</li>
|
||||
<li>Copy/Cut/Paste of custom switches</li>
|
||||
<li>Translations fixes</li>
|
||||
</ul>
|
||||
|
||||
<h2>2647 / 2013-07-21</h2>
|
||||
<ul>
|
||||
<li>Negative timer display fix.</li>
|
||||
</ul>
|
||||
|
||||
<h2>2604 / 2013-07-13 (Taranis only)</h2>
|
||||
<ul>
|
||||
<li>Contrast adjustment added</li>
|
||||
</ul>
|
||||
|
||||
<h2>2590 / 2013-07-08 (Taranis only)</h2>
|
||||
<ul>
|
||||
<li>First official release version!</li>
|
||||
</ul>
|
||||
|
||||
<h2>2491 / 2013-06-24</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>PlaySound has now a repeat argument</li>
|
||||
<li>FAI mode added (disable telemetry other than A1/A2/RSSI for contests)</li>
|
||||
<li>Delays now also apply to 3POS switch!</li>
|
||||
<li>RSSI alarms default thresholds now 45 / 42</li>
|
||||
</ul>
|
||||
|
||||
<h2>2413 / 2013-05-22</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>Calibration screen automatically appears following an EEPROM format</li>
|
||||
<li>Wraparound in popup menus</li>
|
||||
</ul>
|
||||
|
||||
<h2>2215 / 2012-04-05</h2>
|
||||
[all]
|
||||
<ul>
|
||||
<li>New option AUTOSOURCE to automatically select the stick / pot / switch which is moved when editing a Mix source</li>
|
||||
</ul>
|
||||
File diff suppressed because one or more lines are too long
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
|
||||
* @brief Pack a ahrs message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param omegaIx X gyro drift estimate rad/s
|
||||
* @param omegaIy Y gyro drift estimate rad/s
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_ahrs_pack_chan(uint8_t system_id, uint8_t com
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ahrs struct into a message
|
||||
* @brief Encode a ahrs struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_ahrs_encode(uint8_t system_id, uint8_t compon
|
||||
return mavlink_msg_ahrs_pack(system_id, component_id, msg, ahrs->omegaIx, ahrs->omegaIy, ahrs->omegaIz, ahrs->accel_weight, ahrs->renorm_val, ahrs->error_rp, ahrs->error_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ahrs struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ahrs_t* ahrs)
|
||||
{
|
||||
return mavlink_msg_ahrs_pack_chan(system_id, component_id, chan, msg, ahrs->omegaIx, ahrs->omegaIy, ahrs->omegaIz, ahrs->accel_weight, ahrs->renorm_val, ahrs->error_rp, ahrs->error_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ahrs message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
|
||||
* @brief Pack a ap_adc message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param adc1 ADC output 1
|
||||
* @param adc2 ADC output 2
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_ap_adc_pack_chan(uint8_t system_id, uint8_t c
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ap_adc struct into a message
|
||||
* @brief Encode a ap_adc struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -141,6 +141,20 @@ static inline uint16_t mavlink_msg_ap_adc_encode(uint8_t system_id, uint8_t comp
|
||||
return mavlink_msg_ap_adc_pack(system_id, component_id, msg, ap_adc->adc1, ap_adc->adc2, ap_adc->adc3, ap_adc->adc4, ap_adc->adc5, ap_adc->adc6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ap_adc struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ap_adc C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ap_adc_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ap_adc_t* ap_adc)
|
||||
{
|
||||
return mavlink_msg_ap_adc_pack_chan(system_id, component_id, chan, msg, ap_adc->adc1, ap_adc->adc2, ap_adc->adc3, ap_adc->adc4, ap_adc->adc5, ap_adc->adc6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ap_adc message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_data16_pack(uint8_t system_id, uint8_t compon
|
||||
* @brief Pack a data16 message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param type data type
|
||||
* @param len data length
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_data16_pack_chan(uint8_t system_id, uint8_t c
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data16 struct into a message
|
||||
* @brief Encode a data16 struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_data16_encode(uint8_t system_id, uint8_t comp
|
||||
return mavlink_msg_data16_pack(system_id, component_id, msg, data16->type, data16->len, data16->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data16 struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data16 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data16_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_data16_t* data16)
|
||||
{
|
||||
return mavlink_msg_data16_pack_chan(system_id, component_id, chan, msg, data16->type, data16->len, data16->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data16 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_data32_pack(uint8_t system_id, uint8_t compon
|
||||
* @brief Pack a data32 message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param type data type
|
||||
* @param len data length
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_data32_pack_chan(uint8_t system_id, uint8_t c
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data32 struct into a message
|
||||
* @brief Encode a data32 struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_data32_encode(uint8_t system_id, uint8_t comp
|
||||
return mavlink_msg_data32_pack(system_id, component_id, msg, data32->type, data32->len, data32->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data32 struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data32 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data32_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_data32_t* data32)
|
||||
{
|
||||
return mavlink_msg_data32_pack_chan(system_id, component_id, chan, msg, data32->type, data32->len, data32->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data32 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_data64_pack(uint8_t system_id, uint8_t compon
|
||||
* @brief Pack a data64 message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param type data type
|
||||
* @param len data length
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_data64_pack_chan(uint8_t system_id, uint8_t c
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data64 struct into a message
|
||||
* @brief Encode a data64 struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_data64_encode(uint8_t system_id, uint8_t comp
|
||||
return mavlink_msg_data64_pack(system_id, component_id, msg, data64->type, data64->len, data64->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data64 struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data64 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data64_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_data64_t* data64)
|
||||
{
|
||||
return mavlink_msg_data64_pack_chan(system_id, component_id, chan, msg, data64->type, data64->len, data64->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data64 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_data96_pack(uint8_t system_id, uint8_t compon
|
||||
* @brief Pack a data96 message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param type data type
|
||||
* @param len data length
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_data96_pack_chan(uint8_t system_id, uint8_t c
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data96 struct into a message
|
||||
* @brief Encode a data96 struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_data96_encode(uint8_t system_id, uint8_t comp
|
||||
return mavlink_msg_data96_pack(system_id, component_id, msg, data96->type, data96->len, data96->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data96 struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data96 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data96_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_data96_t* data96)
|
||||
{
|
||||
return mavlink_msg_data96_pack_chan(system_id, component_id, chan, msg, data96->type, data96->len, data96->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data96 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
|
||||
* @brief Pack a digicam_configure message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -169,7 +169,7 @@ static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a digicam_configure struct into a message
|
||||
* @brief Encode a digicam_configure struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -181,6 +181,20 @@ static inline uint16_t mavlink_msg_digicam_configure_encode(uint8_t system_id, u
|
||||
return mavlink_msg_digicam_configure_pack(system_id, component_id, msg, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a digicam_configure struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param digicam_configure C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_digicam_configure_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_digicam_configure_t* digicam_configure)
|
||||
{
|
||||
return mavlink_msg_digicam_configure_pack_chan(system_id, component_id, chan, msg, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a digicam_configure message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -104,7 +104,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a digicam_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -161,7 +161,7 @@ static inline uint16_t mavlink_msg_digicam_control_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a digicam_control struct into a message
|
||||
* @brief Encode a digicam_control struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -173,6 +173,20 @@ static inline uint16_t mavlink_msg_digicam_control_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_digicam_control_pack(system_id, component_id, msg, digicam_control->target_system, digicam_control->target_component, digicam_control->session, digicam_control->zoom_pos, digicam_control->zoom_step, digicam_control->focus_lock, digicam_control->shot, digicam_control->command_id, digicam_control->extra_param, digicam_control->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a digicam_control struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param digicam_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_digicam_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_digicam_control_t* digicam_control)
|
||||
{
|
||||
return mavlink_msg_digicam_control_pack_chan(system_id, component_id, chan, msg, digicam_control->target_system, digicam_control->target_component, digicam_control->session, digicam_control->zoom_pos, digicam_control->zoom_step, digicam_control->focus_lock, digicam_control->shot, digicam_control->command_id, digicam_control->extra_param, digicam_control->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a digicam_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack(uint8_t system_id, uin
|
||||
* @brief Pack a fence_fetch_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_fetch_point struct into a message
|
||||
* @brief Encode a fence_fetch_point struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_fence_fetch_point_encode(uint8_t system_id, u
|
||||
return mavlink_msg_fence_fetch_point_pack(system_id, component_id, msg, fence_fetch_point->target_system, fence_fetch_point->target_component, fence_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_fetch_point struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_fetch_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_fetch_point_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_fetch_point_t* fence_fetch_point)
|
||||
{
|
||||
return mavlink_msg_fence_fetch_point_pack_chan(system_id, component_id, chan, msg, fence_fetch_point->target_system, fence_fetch_point->target_component, fence_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fence_fetch_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a fence_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_fence_point_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_point struct into a message
|
||||
* @brief Encode a fence_point struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -141,6 +141,20 @@ static inline uint16_t mavlink_msg_fence_point_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_fence_point_pack(system_id, component_id, msg, fence_point->target_system, fence_point->target_component, fence_point->idx, fence_point->count, fence_point->lat, fence_point->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_point struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_point_t* fence_point)
|
||||
{
|
||||
return mavlink_msg_fence_point_pack_chan(system_id, component_id, chan, msg, fence_point->target_system, fence_point->target_component, fence_point->idx, fence_point->count, fence_point->lat, fence_point->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fence_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -74,7 +74,7 @@ static inline uint16_t mavlink_msg_fence_status_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a fence_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param breach_status 0 if currently inside fence, 1 if outside
|
||||
* @param breach_count number of fence breaches
|
||||
@@ -113,7 +113,7 @@ static inline uint16_t mavlink_msg_fence_status_pack_chan(uint8_t system_id, uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_status struct into a message
|
||||
* @brief Encode a fence_status struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -125,6 +125,20 @@ static inline uint16_t mavlink_msg_fence_status_encode(uint8_t system_id, uint8_
|
||||
return mavlink_msg_fence_status_pack(system_id, component_id, msg, fence_status->breach_status, fence_status->breach_count, fence_status->breach_type, fence_status->breach_time);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_status struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fence_status_t* fence_status)
|
||||
{
|
||||
return mavlink_msg_fence_status_pack_chan(system_id, component_id, chan, msg, fence_status->breach_status, fence_status->breach_count, fence_status->breach_type, fence_status->breach_time);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fence_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
// MESSAGE FENCED_FETCH_POINT PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCED_FETCH_POINT 161
|
||||
|
||||
typedef struct __mavlink_fenced_fetch_point_t
|
||||
{
|
||||
uint8_t idx; ///< point index (first point is 1, 0 is for return point)
|
||||
} mavlink_fenced_fetch_point_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCED_FETCH_POINT_LEN 1
|
||||
#define MAVLINK_MSG_ID_161_LEN 1
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_FENCED_FETCH_POINT { \
|
||||
"FENCED_FETCH_POINT", \
|
||||
1, \
|
||||
{ { "idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_fenced_fetch_point_t, idx) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a fenced_fetch_point message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param idx point index (first point is 1, 0 is for return point)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fenced_fetch_point_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t idx)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[1];
|
||||
_mav_put_uint8_t(buf, 0, idx);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 1);
|
||||
#else
|
||||
mavlink_fenced_fetch_point_t packet;
|
||||
packet.idx = idx;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 1);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FENCED_FETCH_POINT;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 1, 33);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fenced_fetch_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param idx point index (first point is 1, 0 is for return point)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fenced_fetch_point_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t idx)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[1];
|
||||
_mav_put_uint8_t(buf, 0, idx);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 1);
|
||||
#else
|
||||
mavlink_fenced_fetch_point_t packet;
|
||||
packet.idx = idx;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 1);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FENCED_FETCH_POINT;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 1, 33);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fenced_fetch_point struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fenced_fetch_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fenced_fetch_point_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fenced_fetch_point_t* fenced_fetch_point)
|
||||
{
|
||||
return mavlink_msg_fenced_fetch_point_pack(system_id, component_id, msg, fenced_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fenced_fetch_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param idx point index (first point is 1, 0 is for return point)
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_fenced_fetch_point_send(mavlink_channel_t chan, uint8_t idx)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[1];
|
||||
_mav_put_uint8_t(buf, 0, idx);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCED_FETCH_POINT, buf, 1, 33);
|
||||
#else
|
||||
mavlink_fenced_fetch_point_t packet;
|
||||
packet.idx = idx;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCED_FETCH_POINT, (const char *)&packet, 1, 33);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE FENCED_FETCH_POINT UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field idx from fenced_fetch_point message
|
||||
*
|
||||
* @return point index (first point is 1, 0 is for return point)
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fenced_fetch_point_get_idx(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a fenced_fetch_point message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param fenced_fetch_point C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_fenced_fetch_point_decode(const mavlink_message_t* msg, mavlink_fenced_fetch_point_t* fenced_fetch_point)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
fenced_fetch_point->idx = mavlink_msg_fenced_fetch_point_get_idx(msg);
|
||||
#else
|
||||
memcpy(fenced_fetch_point, _MAV_PAYLOAD(msg), 1);
|
||||
#endif
|
||||
}
|
||||
@@ -1,210 +0,0 @@
|
||||
// MESSAGE FENCED_POINT PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCED_POINT 160
|
||||
|
||||
typedef struct __mavlink_fenced_point_t
|
||||
{
|
||||
float lat; ///< Latitude of point
|
||||
float lng; ///< Longitude of point
|
||||
uint8_t idx; ///< point index (first point is 1, 0 is for return point)
|
||||
uint8_t count; ///< total number of points (for sanity checking)
|
||||
} mavlink_fenced_point_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_FENCED_POINT_LEN 10
|
||||
#define MAVLINK_MSG_ID_160_LEN 10
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_FENCED_POINT { \
|
||||
"FENCED_POINT", \
|
||||
4, \
|
||||
{ { "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_fenced_point_t, lat) }, \
|
||||
{ "lng", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_fenced_point_t, lng) }, \
|
||||
{ "idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_fenced_point_t, idx) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_fenced_point_t, count) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a fenced_point message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param idx point index (first point is 1, 0 is for return point)
|
||||
* @param count total number of points (for sanity checking)
|
||||
* @param lat Latitude of point
|
||||
* @param lng Longitude of point
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fenced_point_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t idx, uint8_t count, float lat, float lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[10];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, idx);
|
||||
_mav_put_uint8_t(buf, 9, count);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 10);
|
||||
#else
|
||||
mavlink_fenced_point_t packet;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.idx = idx;
|
||||
packet.count = count;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 10);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FENCED_POINT;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 10, 225);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fenced_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param idx point index (first point is 1, 0 is for return point)
|
||||
* @param count total number of points (for sanity checking)
|
||||
* @param lat Latitude of point
|
||||
* @param lng Longitude of point
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fenced_point_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t idx,uint8_t count,float lat,float lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[10];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, idx);
|
||||
_mav_put_uint8_t(buf, 9, count);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 10);
|
||||
#else
|
||||
mavlink_fenced_point_t packet;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.idx = idx;
|
||||
packet.count = count;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 10);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FENCED_POINT;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 10, 225);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fenced_point struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fenced_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fenced_point_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fenced_point_t* fenced_point)
|
||||
{
|
||||
return mavlink_msg_fenced_point_pack(system_id, component_id, msg, fenced_point->idx, fenced_point->count, fenced_point->lat, fenced_point->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fenced_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param idx point index (first point is 1, 0 is for return point)
|
||||
* @param count total number of points (for sanity checking)
|
||||
* @param lat Latitude of point
|
||||
* @param lng Longitude of point
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_fenced_point_send(mavlink_channel_t chan, uint8_t idx, uint8_t count, float lat, float lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[10];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, idx);
|
||||
_mav_put_uint8_t(buf, 9, count);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCED_POINT, buf, 10, 225);
|
||||
#else
|
||||
mavlink_fenced_point_t packet;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.idx = idx;
|
||||
packet.count = count;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FENCED_POINT, (const char *)&packet, 10, 225);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE FENCED_POINT UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field idx from fenced_point message
|
||||
*
|
||||
* @return point index (first point is 1, 0 is for return point)
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fenced_point_get_idx(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field count from fenced_point message
|
||||
*
|
||||
* @return total number of points (for sanity checking)
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_fenced_point_get_count(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 9);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lat from fenced_point message
|
||||
*
|
||||
* @return Latitude of point
|
||||
*/
|
||||
static inline float mavlink_msg_fenced_point_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lng from fenced_point message
|
||||
*
|
||||
* @return Longitude of point
|
||||
*/
|
||||
static inline float mavlink_msg_fenced_point_get_lng(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a fenced_point message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param fenced_point C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_fenced_point_decode(const mavlink_message_t* msg, mavlink_fenced_point_t* fenced_point)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
fenced_point->lat = mavlink_msg_fenced_point_get_lat(msg);
|
||||
fenced_point->lng = mavlink_msg_fenced_point_get_lng(msg);
|
||||
fenced_point->idx = mavlink_msg_fenced_point_get_idx(msg);
|
||||
fenced_point->count = mavlink_msg_fenced_point_get_count(msg);
|
||||
#else
|
||||
memcpy(fenced_point, _MAV_PAYLOAD(msg), 10);
|
||||
#endif
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_hwstatus_pack(uint8_t system_id, uint8_t comp
|
||||
* @brief Pack a hwstatus message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param Vcc board voltage (mV)
|
||||
* @param I2Cerr I2C error count
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_hwstatus_pack_chan(uint8_t system_id, uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hwstatus struct into a message
|
||||
* @brief Encode a hwstatus struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_hwstatus_encode(uint8_t system_id, uint8_t co
|
||||
return mavlink_msg_hwstatus_pack(system_id, component_id, msg, hwstatus->Vcc, hwstatus->I2Cerr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hwstatus struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hwstatus C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hwstatus_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hwstatus_t* hwstatus)
|
||||
{
|
||||
return mavlink_msg_hwstatus_pack_chan(system_id, component_id, chan, msg, hwstatus->Vcc, hwstatus->I2Cerr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hwstatus message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,7 +99,7 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a limits_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param limits_state state of AP_Limits, (see enum LimitState, LIMITS_STATE)
|
||||
* @param last_trigger time of last breach in milliseconds since boot
|
||||
@@ -153,7 +153,7 @@ static inline uint16_t mavlink_msg_limits_status_pack_chan(uint8_t system_id, ui
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a limits_status struct into a message
|
||||
* @brief Encode a limits_status struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -165,6 +165,20 @@ static inline uint16_t mavlink_msg_limits_status_encode(uint8_t system_id, uint8
|
||||
return mavlink_msg_limits_status_pack(system_id, component_id, msg, limits_status->limits_state, limits_status->last_trigger, limits_status->last_action, limits_status->last_recovery, limits_status->last_clear, limits_status->breach_count, limits_status->mods_enabled, limits_status->mods_required, limits_status->mods_triggered);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a limits_status struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param limits_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_limits_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_limits_status_t* limits_status)
|
||||
{
|
||||
return mavlink_msg_limits_status_pack_chan(system_id, component_id, chan, msg, limits_status->limits_state, limits_status->last_trigger, limits_status->last_action, limits_status->last_recovery, limits_status->last_clear, limits_status->breach_count, limits_status->mods_enabled, limits_status->mods_required, limits_status->mods_triggered);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a limits_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_meminfo_pack(uint8_t system_id, uint8_t compo
|
||||
* @brief Pack a meminfo message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param brkval heap top
|
||||
* @param freemem free memory
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_meminfo_pack_chan(uint8_t system_id, uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a meminfo struct into a message
|
||||
* @brief Encode a meminfo struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_meminfo_encode(uint8_t system_id, uint8_t com
|
||||
return mavlink_msg_meminfo_pack(system_id, component_id, msg, meminfo->brkval, meminfo->freemem);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a meminfo struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param meminfo C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_meminfo_t* meminfo)
|
||||
{
|
||||
return mavlink_msg_meminfo_pack_chan(system_id, component_id, chan, msg, meminfo->brkval, meminfo->freemem);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a meminfo message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a mount_configure message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_mount_configure_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_configure struct into a message
|
||||
* @brief Encode a mount_configure struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -141,6 +141,20 @@ static inline uint16_t mavlink_msg_mount_configure_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_mount_configure_pack(system_id, component_id, msg, mount_configure->target_system, mount_configure->target_component, mount_configure->mount_mode, mount_configure->stab_roll, mount_configure->stab_pitch, mount_configure->stab_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_configure struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mount_configure C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_configure_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mount_configure_t* mount_configure)
|
||||
{
|
||||
return mavlink_msg_mount_configure_pack_chan(system_id, component_id, chan, msg, mount_configure->target_system, mount_configure->target_component, mount_configure->mount_mode, mount_configure->stab_roll, mount_configure->stab_pitch, mount_configure->stab_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mount_configure message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline uint16_t mavlink_msg_mount_control_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a mount_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_mount_control_pack_chan(uint8_t system_id, ui
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_control struct into a message
|
||||
* @brief Encode a mount_control struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -141,6 +141,20 @@ static inline uint16_t mavlink_msg_mount_control_encode(uint8_t system_id, uint8
|
||||
return mavlink_msg_mount_control_pack(system_id, component_id, msg, mount_control->target_system, mount_control->target_component, mount_control->input_a, mount_control->input_b, mount_control->input_c, mount_control->save_position);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_control struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mount_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mount_control_t* mount_control)
|
||||
{
|
||||
return mavlink_msg_mount_control_pack_chan(system_id, component_id, chan, msg, mount_control->target_system, mount_control->target_component, mount_control->input_a, mount_control->input_b, mount_control->input_c, mount_control->save_position);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mount_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -79,7 +79,7 @@ static inline uint16_t mavlink_msg_mount_status_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a mount_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -121,7 +121,7 @@ static inline uint16_t mavlink_msg_mount_status_pack_chan(uint8_t system_id, uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_status struct into a message
|
||||
* @brief Encode a mount_status struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -133,6 +133,20 @@ static inline uint16_t mavlink_msg_mount_status_encode(uint8_t system_id, uint8_
|
||||
return mavlink_msg_mount_status_pack(system_id, component_id, msg, mount_status->target_system, mount_status->target_component, mount_status->pointing_a, mount_status->pointing_b, mount_status->pointing_c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_status struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mount_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mount_status_t* mount_status)
|
||||
{
|
||||
return mavlink_msg_mount_status_pack_chan(system_id, component_id, chan, msg, mount_status->target_system, mount_status->target_component, mount_status->pointing_a, mount_status->pointing_b, mount_status->pointing_c);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mount_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_radio_pack(uint8_t system_id, uint8_t compone
|
||||
* @brief Pack a radio message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rssi local signal strength
|
||||
* @param remrssi remote signal strength
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_radio_pack_chan(uint8_t system_id, uint8_t co
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a radio struct into a message
|
||||
* @brief Encode a radio struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_radio_encode(uint8_t system_id, uint8_t compo
|
||||
return mavlink_msg_radio_pack(system_id, component_id, msg, radio->rssi, radio->remrssi, radio->txbuf, radio->noise, radio->remnoise, radio->rxerrors, radio->fixed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a radio struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param radio C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_radio_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_radio_t* radio)
|
||||
{
|
||||
return mavlink_msg_radio_pack_chan(system_id, component_id, chan, msg, radio->rssi, radio->remrssi, radio->txbuf, radio->noise, radio->remnoise, radio->rxerrors, radio->fixed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a radio message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_rangefinder_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a rangefinder message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param distance distance in meters
|
||||
* @param voltage raw voltage if available, zero otherwise
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_rangefinder_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a rangefinder struct into a message
|
||||
* @brief Encode a rangefinder struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_rangefinder_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_rangefinder_pack(system_id, component_id, msg, rangefinder->distance, rangefinder->voltage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a rangefinder struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rangefinder C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rangefinder_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_rangefinder_t* rangefinder)
|
||||
{
|
||||
return mavlink_msg_rangefinder_pack_chan(system_id, component_id, chan, msg, rangefinder->distance, rangefinder->voltage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a rangefinder message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -114,7 +114,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_
|
||||
* @brief Pack a sensor_offsets message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mag_ofs_x magnetometer X offset
|
||||
* @param mag_ofs_y magnetometer Y offset
|
||||
@@ -177,7 +177,7 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack_chan(uint8_t system_id, u
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sensor_offsets struct into a message
|
||||
* @brief Encode a sensor_offsets struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -189,6 +189,20 @@ static inline uint16_t mavlink_msg_sensor_offsets_encode(uint8_t system_id, uint
|
||||
return mavlink_msg_sensor_offsets_pack(system_id, component_id, msg, sensor_offsets->mag_ofs_x, sensor_offsets->mag_ofs_y, sensor_offsets->mag_ofs_z, sensor_offsets->mag_declination, sensor_offsets->raw_press, sensor_offsets->raw_temp, sensor_offsets->gyro_cal_x, sensor_offsets->gyro_cal_y, sensor_offsets->gyro_cal_z, sensor_offsets->accel_cal_x, sensor_offsets->accel_cal_y, sensor_offsets->accel_cal_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sensor_offsets struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sensor_offsets C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensor_offsets_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sensor_offsets_t* sensor_offsets)
|
||||
{
|
||||
return mavlink_msg_sensor_offsets_pack_chan(system_id, component_id, chan, msg, sensor_offsets->mag_ofs_x, sensor_offsets->mag_ofs_y, sensor_offsets->mag_ofs_z, sensor_offsets->mag_declination, sensor_offsets->raw_press, sensor_offsets->raw_temp, sensor_offsets->gyro_cal_x, sensor_offsets->gyro_cal_y, sensor_offsets->gyro_cal_z, sensor_offsets->accel_cal_x, sensor_offsets->accel_cal_y, sensor_offsets->accel_cal_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sensor_offsets message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -79,7 +79,7 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a set_mag_offsets message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -121,7 +121,7 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a set_mag_offsets struct into a message
|
||||
* @brief Encode a set_mag_offsets struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -133,6 +133,20 @@ static inline uint16_t mavlink_msg_set_mag_offsets_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_set_mag_offsets_pack(system_id, component_id, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a set_mag_offsets struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param set_mag_offsets C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
|
||||
{
|
||||
return mavlink_msg_set_mag_offsets_pack_chan(system_id, component_id, chan, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a set_mag_offsets message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -13,15 +13,15 @@ typedef struct __mavlink_simstate_t
|
||||
float xgyro; ///< Angular speed around X axis rad/s
|
||||
float ygyro; ///< Angular speed around Y axis rad/s
|
||||
float zgyro; ///< Angular speed around Z axis rad/s
|
||||
float lat; ///< Latitude in degrees
|
||||
float lng; ///< Longitude in degrees
|
||||
int32_t lat; ///< Latitude in degrees * 1E7
|
||||
int32_t lng; ///< Longitude in degrees * 1E7
|
||||
} mavlink_simstate_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_SIMSTATE_LEN 44
|
||||
#define MAVLINK_MSG_ID_164_LEN 44
|
||||
|
||||
#define MAVLINK_MSG_ID_SIMSTATE_CRC 111
|
||||
#define MAVLINK_MSG_ID_164_CRC 111
|
||||
#define MAVLINK_MSG_ID_SIMSTATE_CRC 154
|
||||
#define MAVLINK_MSG_ID_164_CRC 154
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ typedef struct __mavlink_simstate_t
|
||||
{ "xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_simstate_t, xgyro) }, \
|
||||
{ "ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_simstate_t, ygyro) }, \
|
||||
{ "zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_simstate_t, zgyro) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_simstate_t, lat) }, \
|
||||
{ "lng", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_simstate_t, lng) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_simstate_t, lat) }, \
|
||||
{ "lng", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_simstate_t, lng) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -58,12 +58,12 @@ typedef struct __mavlink_simstate_t
|
||||
* @param xgyro Angular speed around X axis rad/s
|
||||
* @param ygyro Angular speed around Y axis rad/s
|
||||
* @param zgyro Angular speed around Z axis rad/s
|
||||
* @param lat Latitude in degrees
|
||||
* @param lng Longitude in degrees
|
||||
* @param lat Latitude in degrees * 1E7
|
||||
* @param lng Longitude in degrees * 1E7
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float lat, float lng)
|
||||
float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, int32_t lat, int32_t lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
|
||||
@@ -76,8 +76,8 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
|
||||
_mav_put_float(buf, 24, xgyro);
|
||||
_mav_put_float(buf, 28, ygyro);
|
||||
_mav_put_float(buf, 32, zgyro);
|
||||
_mav_put_float(buf, 36, lat);
|
||||
_mav_put_float(buf, 40, lng);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lng);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMSTATE_LEN);
|
||||
#else
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
|
||||
* @brief Pack a simstate message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
@@ -120,13 +120,13 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
|
||||
* @param xgyro Angular speed around X axis rad/s
|
||||
* @param ygyro Angular speed around Y axis rad/s
|
||||
* @param zgyro Angular speed around Z axis rad/s
|
||||
* @param lat Latitude in degrees
|
||||
* @param lng Longitude in degrees
|
||||
* @param lat Latitude in degrees * 1E7
|
||||
* @param lng Longitude in degrees * 1E7
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
float roll,float pitch,float yaw,float xacc,float yacc,float zacc,float xgyro,float ygyro,float zgyro,float lat,float lng)
|
||||
float roll,float pitch,float yaw,float xacc,float yacc,float zacc,float xgyro,float ygyro,float zgyro,int32_t lat,int32_t lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
|
||||
@@ -139,8 +139,8 @@ static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t
|
||||
_mav_put_float(buf, 24, xgyro);
|
||||
_mav_put_float(buf, 28, ygyro);
|
||||
_mav_put_float(buf, 32, zgyro);
|
||||
_mav_put_float(buf, 36, lat);
|
||||
_mav_put_float(buf, 40, lng);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lng);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMSTATE_LEN);
|
||||
#else
|
||||
@@ -169,7 +169,7 @@ static inline uint16_t mavlink_msg_simstate_pack_chan(uint8_t system_id, uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a simstate struct into a message
|
||||
* @brief Encode a simstate struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -181,6 +181,20 @@ static inline uint16_t mavlink_msg_simstate_encode(uint8_t system_id, uint8_t co
|
||||
return mavlink_msg_simstate_pack(system_id, component_id, msg, simstate->roll, simstate->pitch, simstate->yaw, simstate->xacc, simstate->yacc, simstate->zacc, simstate->xgyro, simstate->ygyro, simstate->zgyro, simstate->lat, simstate->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a simstate struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param simstate C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_simstate_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_simstate_t* simstate)
|
||||
{
|
||||
return mavlink_msg_simstate_pack_chan(system_id, component_id, chan, msg, simstate->roll, simstate->pitch, simstate->yaw, simstate->xacc, simstate->yacc, simstate->zacc, simstate->xgyro, simstate->ygyro, simstate->zgyro, simstate->lat, simstate->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a simstate message
|
||||
* @param chan MAVLink channel to send the message
|
||||
@@ -194,12 +208,12 @@ static inline uint16_t mavlink_msg_simstate_encode(uint8_t system_id, uint8_t co
|
||||
* @param xgyro Angular speed around X axis rad/s
|
||||
* @param ygyro Angular speed around Y axis rad/s
|
||||
* @param zgyro Angular speed around Z axis rad/s
|
||||
* @param lat Latitude in degrees
|
||||
* @param lng Longitude in degrees
|
||||
* @param lat Latitude in degrees * 1E7
|
||||
* @param lng Longitude in degrees * 1E7
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_simstate_send(mavlink_channel_t chan, float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float lat, float lng)
|
||||
static inline void mavlink_msg_simstate_send(mavlink_channel_t chan, float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, int32_t lat, int32_t lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
|
||||
@@ -212,8 +226,8 @@ static inline void mavlink_msg_simstate_send(mavlink_channel_t chan, float roll,
|
||||
_mav_put_float(buf, 24, xgyro);
|
||||
_mav_put_float(buf, 28, ygyro);
|
||||
_mav_put_float(buf, 32, zgyro);
|
||||
_mav_put_float(buf, 36, lat);
|
||||
_mav_put_float(buf, 40, lng);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lng);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SIMSTATE, buf, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
|
||||
@@ -340,21 +354,21 @@ static inline float mavlink_msg_simstate_get_zgyro(const mavlink_message_t* msg)
|
||||
/**
|
||||
* @brief Get field lat from simstate message
|
||||
*
|
||||
* @return Latitude in degrees
|
||||
* @return Latitude in degrees * 1E7
|
||||
*/
|
||||
static inline float mavlink_msg_simstate_get_lat(const mavlink_message_t* msg)
|
||||
static inline int32_t mavlink_msg_simstate_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 36);
|
||||
return _MAV_RETURN_int32_t(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lng from simstate message
|
||||
*
|
||||
* @return Longitude in degrees
|
||||
* @return Longitude in degrees * 1E7
|
||||
*/
|
||||
static inline float mavlink_msg_simstate_get_lng(const mavlink_message_t* msg)
|
||||
static inline int32_t mavlink_msg_simstate_get_lng(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 40);
|
||||
return _MAV_RETURN_int32_t(msg, 40);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_wind_pack(uint8_t system_id, uint8_t componen
|
||||
* @brief Pack a wind message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param direction wind direction that wind is coming from (degrees)
|
||||
* @param speed wind speed in ground plane (m/s)
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_wind_pack_chan(uint8_t system_id, uint8_t com
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a wind struct into a message
|
||||
* @brief Encode a wind struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_wind_encode(uint8_t system_id, uint8_t compon
|
||||
return mavlink_msg_wind_pack(system_id, component_id, msg, wind->direction, wind->speed, wind->speed_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a wind struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param wind C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_wind_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_wind_t* wind)
|
||||
{
|
||||
return mavlink_msg_wind_pack_chan(system_id, component_id, chan, msg, wind->direction, wind->speed, wind->speed_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a wind message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -738,8 +738,8 @@ static void mavlink_test_simstate(uint8_t system_id, uint8_t component_id, mavli
|
||||
185.0,
|
||||
213.0,
|
||||
241.0,
|
||||
269.0,
|
||||
297.0,
|
||||
963499336,
|
||||
963499544,
|
||||
};
|
||||
mavlink_simstate_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon May 20 23:07:03 2013"
|
||||
#define MAVLINK_BUILD_DATE "Tue Aug 20 00:01:00 2013"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 254
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,188 +0,0 @@
|
||||
// MESSAGE ACTION PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_ACTION 10
|
||||
|
||||
typedef struct __mavlink_action_t
|
||||
{
|
||||
uint8_t target; ///< The system executing the action
|
||||
uint8_t target_component; ///< The component executing the action
|
||||
uint8_t action; ///< The action id
|
||||
} mavlink_action_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_ACTION_LEN 3
|
||||
#define MAVLINK_MSG_ID_10_LEN 3
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_ACTION { \
|
||||
"ACTION", \
|
||||
3, \
|
||||
{ { "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_action_t, target) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_action_t, target_component) }, \
|
||||
{ "action", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_action_t, action) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a action message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target The system executing the action
|
||||
* @param target_component The component executing the action
|
||||
* @param action The action id
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_action_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target, uint8_t target_component, uint8_t action)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[3];
|
||||
_mav_put_uint8_t(buf, 0, target);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, action);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 3);
|
||||
#else
|
||||
mavlink_action_t packet;
|
||||
packet.target = target;
|
||||
packet.target_component = target_component;
|
||||
packet.action = action;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 3);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ACTION;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 3, 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a action message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target The system executing the action
|
||||
* @param target_component The component executing the action
|
||||
* @param action The action id
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_action_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target,uint8_t target_component,uint8_t action)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[3];
|
||||
_mav_put_uint8_t(buf, 0, target);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, action);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 3);
|
||||
#else
|
||||
mavlink_action_t packet;
|
||||
packet.target = target;
|
||||
packet.target_component = target_component;
|
||||
packet.action = action;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 3);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ACTION;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a action struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param action C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_action_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_action_t* action)
|
||||
{
|
||||
return mavlink_msg_action_pack(system_id, component_id, msg, action->target, action->target_component, action->action);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a action message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target The system executing the action
|
||||
* @param target_component The component executing the action
|
||||
* @param action The action id
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_action_send(mavlink_channel_t chan, uint8_t target, uint8_t target_component, uint8_t action)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[3];
|
||||
_mav_put_uint8_t(buf, 0, target);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, action);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ACTION, buf, 3, 60);
|
||||
#else
|
||||
mavlink_action_t packet;
|
||||
packet.target = target;
|
||||
packet.target_component = target_component;
|
||||
packet.action = action;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ACTION, (const char *)&packet, 3, 60);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE ACTION UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target from action message
|
||||
*
|
||||
* @return The system executing the action
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_action_get_target(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from action message
|
||||
*
|
||||
* @return The component executing the action
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_action_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field action from action message
|
||||
*
|
||||
* @return The action id
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_action_get_action(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a action message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param action C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_action_decode(const mavlink_message_t* msg, mavlink_action_t* action)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
action->target = mavlink_msg_action_get_target(msg);
|
||||
action->target_component = mavlink_msg_action_get_target_component(msg);
|
||||
action->action = mavlink_msg_action_get_action(msg);
|
||||
#else
|
||||
memcpy(action, _MAV_PAYLOAD(msg), 3);
|
||||
#endif
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
// MESSAGE ACTION_ACK PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_ACTION_ACK 9
|
||||
|
||||
typedef struct __mavlink_action_ack_t
|
||||
{
|
||||
uint8_t action; ///< The action id
|
||||
uint8_t result; ///< 0: Action DENIED, 1: Action executed
|
||||
} mavlink_action_ack_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_ACTION_ACK_LEN 2
|
||||
#define MAVLINK_MSG_ID_9_LEN 2
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_ACTION_ACK { \
|
||||
"ACTION_ACK", \
|
||||
2, \
|
||||
{ { "action", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_action_ack_t, action) }, \
|
||||
{ "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_action_ack_t, result) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a action_ack message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param action The action id
|
||||
* @param result 0: Action DENIED, 1: Action executed
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_action_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t action, uint8_t result)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[2];
|
||||
_mav_put_uint8_t(buf, 0, action);
|
||||
_mav_put_uint8_t(buf, 1, result);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 2);
|
||||
#else
|
||||
mavlink_action_ack_t packet;
|
||||
packet.action = action;
|
||||
packet.result = result;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 2);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ACTION_ACK;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 2, 219);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a action_ack message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param action The action id
|
||||
* @param result 0: Action DENIED, 1: Action executed
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_action_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t action,uint8_t result)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[2];
|
||||
_mav_put_uint8_t(buf, 0, action);
|
||||
_mav_put_uint8_t(buf, 1, result);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 2);
|
||||
#else
|
||||
mavlink_action_ack_t packet;
|
||||
packet.action = action;
|
||||
packet.result = result;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 2);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ACTION_ACK;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 2, 219);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a action_ack struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param action_ack C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_action_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_action_ack_t* action_ack)
|
||||
{
|
||||
return mavlink_msg_action_ack_pack(system_id, component_id, msg, action_ack->action, action_ack->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a action_ack message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param action The action id
|
||||
* @param result 0: Action DENIED, 1: Action executed
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_action_ack_send(mavlink_channel_t chan, uint8_t action, uint8_t result)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[2];
|
||||
_mav_put_uint8_t(buf, 0, action);
|
||||
_mav_put_uint8_t(buf, 1, result);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ACTION_ACK, buf, 2, 219);
|
||||
#else
|
||||
mavlink_action_ack_t packet;
|
||||
packet.action = action;
|
||||
packet.result = result;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ACTION_ACK, (const char *)&packet, 2, 219);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE ACTION_ACK UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field action from action_ack message
|
||||
*
|
||||
* @return The action id
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_action_ack_get_action(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field result from action_ack message
|
||||
*
|
||||
* @return 0: Action DENIED, 1: Action executed
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_action_ack_get_result(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a action_ack message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param action_ack C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_action_ack_decode(const mavlink_message_t* msg, mavlink_action_ack_t* action_ack)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
action_ack->action = mavlink_msg_action_ack_get_action(msg);
|
||||
action_ack->result = mavlink_msg_action_ack_get_result(msg);
|
||||
#else
|
||||
memcpy(action_ack, _MAV_PAYLOAD(msg), 2);
|
||||
#endif
|
||||
}
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_attitude_pack(uint8_t system_id, uint8_t comp
|
||||
* @brief Pack a attitude message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param roll Roll angle (rad, -pi..+pi)
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_attitude_pack_chan(uint8_t system_id, uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a attitude struct into a message
|
||||
* @brief Encode a attitude struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_attitude_encode(uint8_t system_id, uint8_t co
|
||||
return mavlink_msg_attitude_pack(system_id, component_id, msg, attitude->time_boot_ms, attitude->roll, attitude->pitch, attitude->yaw, attitude->rollspeed, attitude->pitchspeed, attitude->yawspeed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a attitude struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param attitude C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_attitude_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_attitude_t* attitude)
|
||||
{
|
||||
return mavlink_msg_attitude_pack_chan(system_id, component_id, chan, msg, attitude->time_boot_ms, attitude->roll, attitude->pitch, attitude->yaw, attitude->rollspeed, attitude->pitchspeed, attitude->yawspeed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a attitude message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -94,7 +94,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack(uint8_t system_id, u
|
||||
* @brief Pack a attitude_quaternion message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param q1 Quaternion component 1
|
||||
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_attitude_quaternion_pack_chan(uint8_t system_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a attitude_quaternion struct into a message
|
||||
* @brief Encode a attitude_quaternion struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -157,6 +157,20 @@ static inline uint16_t mavlink_msg_attitude_quaternion_encode(uint8_t system_id,
|
||||
return mavlink_msg_attitude_quaternion_pack(system_id, component_id, msg, attitude_quaternion->time_boot_ms, attitude_quaternion->q1, attitude_quaternion->q2, attitude_quaternion->q3, attitude_quaternion->q4, attitude_quaternion->rollspeed, attitude_quaternion->pitchspeed, attitude_quaternion->yawspeed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a attitude_quaternion struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param attitude_quaternion C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_attitude_quaternion_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_attitude_quaternion_t* attitude_quaternion)
|
||||
{
|
||||
return mavlink_msg_attitude_quaternion_pack_chan(system_id, component_id, chan, msg, attitude_quaternion->time_boot_ms, attitude_quaternion->q1, attitude_quaternion->q2, attitude_quaternion->q3, attitude_quaternion->q4, attitude_quaternion->rollspeed, attitude_quaternion->pitchspeed, attitude_quaternion->yawspeed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a attitude_quaternion message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -59,7 +59,7 @@ static inline uint16_t mavlink_msg_auth_key_pack(uint8_t system_id, uint8_t comp
|
||||
* @brief Pack a auth_key message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param key key
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_auth_key_pack_chan(uint8_t system_id, uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a auth_key struct into a message
|
||||
* @brief Encode a auth_key struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -101,6 +101,20 @@ static inline uint16_t mavlink_msg_auth_key_encode(uint8_t system_id, uint8_t co
|
||||
return mavlink_msg_auth_key_pack(system_id, component_id, msg, auth_key->key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a auth_key struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param auth_key C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_auth_key_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_auth_key_t* auth_key)
|
||||
{
|
||||
return mavlink_msg_auth_key_pack_chan(system_id, component_id, chan, msg, auth_key->key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a auth_key message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,7 +99,7 @@ static inline uint16_t mavlink_msg_battery_status_pack(uint8_t system_id, uint8_
|
||||
* @brief Pack a battery_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param accu_id Accupack ID
|
||||
* @param voltage_cell_1 Battery voltage of cell 1, in millivolts (1 = 1 millivolt)
|
||||
@@ -153,7 +153,7 @@ static inline uint16_t mavlink_msg_battery_status_pack_chan(uint8_t system_id, u
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a battery_status struct into a message
|
||||
* @brief Encode a battery_status struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -165,6 +165,20 @@ static inline uint16_t mavlink_msg_battery_status_encode(uint8_t system_id, uint
|
||||
return mavlink_msg_battery_status_pack(system_id, component_id, msg, battery_status->accu_id, battery_status->voltage_cell_1, battery_status->voltage_cell_2, battery_status->voltage_cell_3, battery_status->voltage_cell_4, battery_status->voltage_cell_5, battery_status->voltage_cell_6, battery_status->current_battery, battery_status->battery_remaining);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a battery_status struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param battery_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_battery_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_battery_status_t* battery_status)
|
||||
{
|
||||
return mavlink_msg_battery_status_pack_chan(system_id, component_id, chan, msg, battery_status->accu_id, battery_status->voltage_cell_1, battery_status->voltage_cell_2, battery_status->voltage_cell_3, battery_status->voltage_cell_4, battery_status->voltage_cell_5, battery_status->voltage_cell_6, battery_status->current_battery, battery_status->battery_remaining);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a battery_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
// MESSAGE BOOT PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_BOOT 1
|
||||
|
||||
typedef struct __mavlink_boot_t
|
||||
{
|
||||
uint32_t version; ///< The onboard software version
|
||||
} mavlink_boot_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_BOOT_LEN 4
|
||||
#define MAVLINK_MSG_ID_1_LEN 4
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_BOOT { \
|
||||
"BOOT", \
|
||||
1, \
|
||||
{ { "version", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_boot_t, version) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a boot message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param version The onboard software version
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_boot_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint32_t version)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[4];
|
||||
_mav_put_uint32_t(buf, 0, version);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 4);
|
||||
#else
|
||||
mavlink_boot_t packet;
|
||||
packet.version = version;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 4);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_BOOT;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 4, 39);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a boot message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param version The onboard software version
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_boot_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint32_t version)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[4];
|
||||
_mav_put_uint32_t(buf, 0, version);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 4);
|
||||
#else
|
||||
mavlink_boot_t packet;
|
||||
packet.version = version;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 4);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_BOOT;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 4, 39);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a boot struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param boot C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_boot_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_boot_t* boot)
|
||||
{
|
||||
return mavlink_msg_boot_pack(system_id, component_id, msg, boot->version);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a boot message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param version The onboard software version
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_boot_send(mavlink_channel_t chan, uint32_t version)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[4];
|
||||
_mav_put_uint32_t(buf, 0, version);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, buf, 4, 39);
|
||||
#else
|
||||
mavlink_boot_t packet;
|
||||
packet.version = version;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BOOT, (const char *)&packet, 4, 39);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE BOOT UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field version from boot message
|
||||
*
|
||||
* @return The onboard software version
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_boot_get_version(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a boot message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param boot C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_boot_decode(const mavlink_message_t* msg, mavlink_boot_t* boot)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
boot->version = mavlink_msg_boot_get_version(msg);
|
||||
#else
|
||||
memcpy(boot, _MAV_PAYLOAD(msg), 4);
|
||||
#endif
|
||||
}
|
||||
@@ -72,7 +72,7 @@ static inline uint16_t mavlink_msg_change_operator_control_pack(uint8_t system_i
|
||||
* @brief Pack a change_operator_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System the GCS requests control for
|
||||
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_change_operator_control_pack_chan(uint8_t sys
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a change_operator_control struct into a message
|
||||
* @brief Encode a change_operator_control struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -121,6 +121,20 @@ static inline uint16_t mavlink_msg_change_operator_control_encode(uint8_t system
|
||||
return mavlink_msg_change_operator_control_pack(system_id, component_id, msg, change_operator_control->target_system, change_operator_control->control_request, change_operator_control->version, change_operator_control->passkey);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a change_operator_control struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param change_operator_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_change_operator_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_change_operator_control_t* change_operator_control)
|
||||
{
|
||||
return mavlink_msg_change_operator_control_pack_chan(system_id, component_id, chan, msg, change_operator_control->target_system, change_operator_control->control_request, change_operator_control->version, change_operator_control->passkey);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a change_operator_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_change_operator_control_ack_pack(uint8_t syst
|
||||
* @brief Pack a change_operator_control_ack message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gcs_system_id ID of the GCS this message
|
||||
* @param control_request 0: request control of this MAV, 1: Release control of this MAV
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_change_operator_control_ack_pack_chan(uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a change_operator_control_ack struct into a message
|
||||
* @brief Encode a change_operator_control_ack struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_change_operator_control_ack_encode(uint8_t sy
|
||||
return mavlink_msg_change_operator_control_ack_pack(system_id, component_id, msg, change_operator_control_ack->gcs_system_id, change_operator_control_ack->control_request, change_operator_control_ack->ack);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a change_operator_control_ack struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param change_operator_control_ack C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_change_operator_control_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_change_operator_control_ack_t* change_operator_control_ack)
|
||||
{
|
||||
return mavlink_msg_change_operator_control_ack_pack_chan(system_id, component_id, chan, msg, change_operator_control_ack->gcs_system_id, change_operator_control_ack->control_request, change_operator_control_ack->ack);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a change_operator_control_ack message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,298 +0,0 @@
|
||||
// MESSAGE COMMAND PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_COMMAND 75
|
||||
|
||||
typedef struct __mavlink_command_t
|
||||
{
|
||||
float param1; ///< Parameter 1, as defined by MAV_CMD enum.
|
||||
float param2; ///< Parameter 2, as defined by MAV_CMD enum.
|
||||
float param3; ///< Parameter 3, as defined by MAV_CMD enum.
|
||||
float param4; ///< Parameter 4, as defined by MAV_CMD enum.
|
||||
uint8_t target_system; ///< System which should execute the command
|
||||
uint8_t target_component; ///< Component which should execute the command, 0 for all components
|
||||
uint8_t command; ///< Command ID, as defined by MAV_CMD enum.
|
||||
uint8_t confirmation; ///< 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
|
||||
} mavlink_command_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_COMMAND_LEN 20
|
||||
#define MAVLINK_MSG_ID_75_LEN 20
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_COMMAND { \
|
||||
"COMMAND", \
|
||||
8, \
|
||||
{ { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_command_t, param1) }, \
|
||||
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_command_t, param2) }, \
|
||||
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_command_t, param3) }, \
|
||||
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_t, param4) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_command_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_command_t, target_component) }, \
|
||||
{ "command", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_command_t, command) }, \
|
||||
{ "confirmation", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_command_t, confirmation) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a command message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param command Command ID, as defined by MAV_CMD enum.
|
||||
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
|
||||
* @param param1 Parameter 1, as defined by MAV_CMD enum.
|
||||
* @param param2 Parameter 2, as defined by MAV_CMD enum.
|
||||
* @param param3 Parameter 3, as defined by MAV_CMD enum.
|
||||
* @param param4 Parameter 4, as defined by MAV_CMD enum.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t command, uint8_t confirmation, float param1, float param2, float param3, float param4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[20];
|
||||
_mav_put_float(buf, 0, param1);
|
||||
_mav_put_float(buf, 4, param2);
|
||||
_mav_put_float(buf, 8, param3);
|
||||
_mav_put_float(buf, 12, param4);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
_mav_put_uint8_t(buf, 18, command);
|
||||
_mav_put_uint8_t(buf, 19, confirmation);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 20);
|
||||
#else
|
||||
mavlink_command_t packet;
|
||||
packet.param1 = param1;
|
||||
packet.param2 = param2;
|
||||
packet.param3 = param3;
|
||||
packet.param4 = param4;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.command = command;
|
||||
packet.confirmation = confirmation;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 20);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_COMMAND;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 20, 133);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a command message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param command Command ID, as defined by MAV_CMD enum.
|
||||
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
|
||||
* @param param1 Parameter 1, as defined by MAV_CMD enum.
|
||||
* @param param2 Parameter 2, as defined by MAV_CMD enum.
|
||||
* @param param3 Parameter 3, as defined by MAV_CMD enum.
|
||||
* @param param4 Parameter 4, as defined by MAV_CMD enum.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component,uint8_t command,uint8_t confirmation,float param1,float param2,float param3,float param4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[20];
|
||||
_mav_put_float(buf, 0, param1);
|
||||
_mav_put_float(buf, 4, param2);
|
||||
_mav_put_float(buf, 8, param3);
|
||||
_mav_put_float(buf, 12, param4);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
_mav_put_uint8_t(buf, 18, command);
|
||||
_mav_put_uint8_t(buf, 19, confirmation);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 20);
|
||||
#else
|
||||
mavlink_command_t packet;
|
||||
packet.param1 = param1;
|
||||
packet.param2 = param2;
|
||||
packet.param3 = param3;
|
||||
packet.param4 = param4;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.command = command;
|
||||
packet.confirmation = confirmation;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 20);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_COMMAND;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 20, 133);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param command C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_command_t* command)
|
||||
{
|
||||
return mavlink_msg_command_pack(system_id, component_id, msg, command->target_system, command->target_component, command->command, command->confirmation, command->param1, command->param2, command->param3, command->param4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a command message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param command Command ID, as defined by MAV_CMD enum.
|
||||
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
|
||||
* @param param1 Parameter 1, as defined by MAV_CMD enum.
|
||||
* @param param2 Parameter 2, as defined by MAV_CMD enum.
|
||||
* @param param3 Parameter 3, as defined by MAV_CMD enum.
|
||||
* @param param4 Parameter 4, as defined by MAV_CMD enum.
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_command_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t command, uint8_t confirmation, float param1, float param2, float param3, float param4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[20];
|
||||
_mav_put_float(buf, 0, param1);
|
||||
_mav_put_float(buf, 4, param2);
|
||||
_mav_put_float(buf, 8, param3);
|
||||
_mav_put_float(buf, 12, param4);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
_mav_put_uint8_t(buf, 18, command);
|
||||
_mav_put_uint8_t(buf, 19, confirmation);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND, buf, 20, 133);
|
||||
#else
|
||||
mavlink_command_t packet;
|
||||
packet.param1 = param1;
|
||||
packet.param2 = param2;
|
||||
packet.param3 = param3;
|
||||
packet.param4 = param4;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.command = command;
|
||||
packet.confirmation = confirmation;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND, (const char *)&packet, 20, 133);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE COMMAND UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from command message
|
||||
*
|
||||
* @return System which should execute the command
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_command_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from command message
|
||||
*
|
||||
* @return Component which should execute the command, 0 for all components
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_command_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 17);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field command from command message
|
||||
*
|
||||
* @return Command ID, as defined by MAV_CMD enum.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_command_get_command(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 18);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field confirmation from command message
|
||||
*
|
||||
* @return 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_command_get_confirmation(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 19);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param1 from command message
|
||||
*
|
||||
* @return Parameter 1, as defined by MAV_CMD enum.
|
||||
*/
|
||||
static inline float mavlink_msg_command_get_param1(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param2 from command message
|
||||
*
|
||||
* @return Parameter 2, as defined by MAV_CMD enum.
|
||||
*/
|
||||
static inline float mavlink_msg_command_get_param2(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param3 from command message
|
||||
*
|
||||
* @return Parameter 3, as defined by MAV_CMD enum.
|
||||
*/
|
||||
static inline float mavlink_msg_command_get_param3(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param4 from command message
|
||||
*
|
||||
* @return Parameter 4, as defined by MAV_CMD enum.
|
||||
*/
|
||||
static inline float mavlink_msg_command_get_param4(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a command message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param command C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_command_decode(const mavlink_message_t* msg, mavlink_command_t* command)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
command->param1 = mavlink_msg_command_get_param1(msg);
|
||||
command->param2 = mavlink_msg_command_get_param2(msg);
|
||||
command->param3 = mavlink_msg_command_get_param3(msg);
|
||||
command->param4 = mavlink_msg_command_get_param4(msg);
|
||||
command->target_system = mavlink_msg_command_get_target_system(msg);
|
||||
command->target_component = mavlink_msg_command_get_target_component(msg);
|
||||
command->command = mavlink_msg_command_get_command(msg);
|
||||
command->confirmation = mavlink_msg_command_get_confirmation(msg);
|
||||
#else
|
||||
memcpy(command, _MAV_PAYLOAD(msg), 20);
|
||||
#endif
|
||||
}
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a command_ack message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param command Command ID, as defined by MAV_CMD enum.
|
||||
* @param result See MAV_RESULT enum
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_command_ack_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command_ack struct into a message
|
||||
* @brief Encode a command_ack struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_command_ack_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_command_ack_pack(system_id, component_id, msg, command_ack->command, command_ack->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command_ack struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param command_ack C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_command_ack_t* command_ack)
|
||||
{
|
||||
return mavlink_msg_command_ack_pack_chan(system_id, component_id, chan, msg, command_ack->command, command_ack->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a command_ack message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_command_long_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a command_long message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
@@ -169,7 +169,7 @@ static inline uint16_t mavlink_msg_command_long_pack_chan(uint8_t system_id, uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command_long struct into a message
|
||||
* @brief Encode a command_long struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -181,6 +181,20 @@ static inline uint16_t mavlink_msg_command_long_encode(uint8_t system_id, uint8_
|
||||
return mavlink_msg_command_long_pack(system_id, component_id, msg, command_long->target_system, command_long->target_component, command_long->command, command_long->confirmation, command_long->param1, command_long->param2, command_long->param3, command_long->param4, command_long->param5, command_long->param6, command_long->param7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command_long struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param command_long C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_long_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_command_long_t* command_long)
|
||||
{
|
||||
return mavlink_msg_command_long_pack_chan(system_id, component_id, chan, msg, command_long->target_system, command_long->target_component, command_long->command, command_long->confirmation, command_long->param1, command_long->param2, command_long->param3, command_long->param4, command_long->param5, command_long->param6, command_long->param7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a command_long message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,298 +0,0 @@
|
||||
// MESSAGE CONTROL_STATUS PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_CONTROL_STATUS 52
|
||||
|
||||
typedef struct __mavlink_control_status_t
|
||||
{
|
||||
uint8_t position_fix; ///< Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
|
||||
uint8_t vision_fix; ///< Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
|
||||
uint8_t gps_fix; ///< GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
|
||||
uint8_t ahrs_health; ///< Attitude estimation health: 0: poor, 255: excellent
|
||||
uint8_t control_att; ///< 0: Attitude control disabled, 1: enabled
|
||||
uint8_t control_pos_xy; ///< 0: X, Y position control disabled, 1: enabled
|
||||
uint8_t control_pos_z; ///< 0: Z position control disabled, 1: enabled
|
||||
uint8_t control_pos_yaw; ///< 0: Yaw angle control disabled, 1: enabled
|
||||
} mavlink_control_status_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_CONTROL_STATUS_LEN 8
|
||||
#define MAVLINK_MSG_ID_52_LEN 8
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_CONTROL_STATUS { \
|
||||
"CONTROL_STATUS", \
|
||||
8, \
|
||||
{ { "position_fix", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_control_status_t, position_fix) }, \
|
||||
{ "vision_fix", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_control_status_t, vision_fix) }, \
|
||||
{ "gps_fix", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_control_status_t, gps_fix) }, \
|
||||
{ "ahrs_health", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_control_status_t, ahrs_health) }, \
|
||||
{ "control_att", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_control_status_t, control_att) }, \
|
||||
{ "control_pos_xy", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_control_status_t, control_pos_xy) }, \
|
||||
{ "control_pos_z", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_control_status_t, control_pos_z) }, \
|
||||
{ "control_pos_yaw", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_control_status_t, control_pos_yaw) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a control_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param position_fix Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
|
||||
* @param vision_fix Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
|
||||
* @param gps_fix GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
|
||||
* @param ahrs_health Attitude estimation health: 0: poor, 255: excellent
|
||||
* @param control_att 0: Attitude control disabled, 1: enabled
|
||||
* @param control_pos_xy 0: X, Y position control disabled, 1: enabled
|
||||
* @param control_pos_z 0: Z position control disabled, 1: enabled
|
||||
* @param control_pos_yaw 0: Yaw angle control disabled, 1: enabled
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_control_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t position_fix, uint8_t vision_fix, uint8_t gps_fix, uint8_t ahrs_health, uint8_t control_att, uint8_t control_pos_xy, uint8_t control_pos_z, uint8_t control_pos_yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[8];
|
||||
_mav_put_uint8_t(buf, 0, position_fix);
|
||||
_mav_put_uint8_t(buf, 1, vision_fix);
|
||||
_mav_put_uint8_t(buf, 2, gps_fix);
|
||||
_mav_put_uint8_t(buf, 3, ahrs_health);
|
||||
_mav_put_uint8_t(buf, 4, control_att);
|
||||
_mav_put_uint8_t(buf, 5, control_pos_xy);
|
||||
_mav_put_uint8_t(buf, 6, control_pos_z);
|
||||
_mav_put_uint8_t(buf, 7, control_pos_yaw);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 8);
|
||||
#else
|
||||
mavlink_control_status_t packet;
|
||||
packet.position_fix = position_fix;
|
||||
packet.vision_fix = vision_fix;
|
||||
packet.gps_fix = gps_fix;
|
||||
packet.ahrs_health = ahrs_health;
|
||||
packet.control_att = control_att;
|
||||
packet.control_pos_xy = control_pos_xy;
|
||||
packet.control_pos_z = control_pos_z;
|
||||
packet.control_pos_yaw = control_pos_yaw;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 8);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CONTROL_STATUS;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 8, 157);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a control_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param position_fix Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
|
||||
* @param vision_fix Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
|
||||
* @param gps_fix GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
|
||||
* @param ahrs_health Attitude estimation health: 0: poor, 255: excellent
|
||||
* @param control_att 0: Attitude control disabled, 1: enabled
|
||||
* @param control_pos_xy 0: X, Y position control disabled, 1: enabled
|
||||
* @param control_pos_z 0: Z position control disabled, 1: enabled
|
||||
* @param control_pos_yaw 0: Yaw angle control disabled, 1: enabled
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_control_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t position_fix,uint8_t vision_fix,uint8_t gps_fix,uint8_t ahrs_health,uint8_t control_att,uint8_t control_pos_xy,uint8_t control_pos_z,uint8_t control_pos_yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[8];
|
||||
_mav_put_uint8_t(buf, 0, position_fix);
|
||||
_mav_put_uint8_t(buf, 1, vision_fix);
|
||||
_mav_put_uint8_t(buf, 2, gps_fix);
|
||||
_mav_put_uint8_t(buf, 3, ahrs_health);
|
||||
_mav_put_uint8_t(buf, 4, control_att);
|
||||
_mav_put_uint8_t(buf, 5, control_pos_xy);
|
||||
_mav_put_uint8_t(buf, 6, control_pos_z);
|
||||
_mav_put_uint8_t(buf, 7, control_pos_yaw);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 8);
|
||||
#else
|
||||
mavlink_control_status_t packet;
|
||||
packet.position_fix = position_fix;
|
||||
packet.vision_fix = vision_fix;
|
||||
packet.gps_fix = gps_fix;
|
||||
packet.ahrs_health = ahrs_health;
|
||||
packet.control_att = control_att;
|
||||
packet.control_pos_xy = control_pos_xy;
|
||||
packet.control_pos_z = control_pos_z;
|
||||
packet.control_pos_yaw = control_pos_yaw;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 8);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CONTROL_STATUS;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 8, 157);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a control_status struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param control_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_control_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_control_status_t* control_status)
|
||||
{
|
||||
return mavlink_msg_control_status_pack(system_id, component_id, msg, control_status->position_fix, control_status->vision_fix, control_status->gps_fix, control_status->ahrs_health, control_status->control_att, control_status->control_pos_xy, control_status->control_pos_z, control_status->control_pos_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a control_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param position_fix Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
|
||||
* @param vision_fix Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
|
||||
* @param gps_fix GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
|
||||
* @param ahrs_health Attitude estimation health: 0: poor, 255: excellent
|
||||
* @param control_att 0: Attitude control disabled, 1: enabled
|
||||
* @param control_pos_xy 0: X, Y position control disabled, 1: enabled
|
||||
* @param control_pos_z 0: Z position control disabled, 1: enabled
|
||||
* @param control_pos_yaw 0: Yaw angle control disabled, 1: enabled
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_control_status_send(mavlink_channel_t chan, uint8_t position_fix, uint8_t vision_fix, uint8_t gps_fix, uint8_t ahrs_health, uint8_t control_att, uint8_t control_pos_xy, uint8_t control_pos_z, uint8_t control_pos_yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[8];
|
||||
_mav_put_uint8_t(buf, 0, position_fix);
|
||||
_mav_put_uint8_t(buf, 1, vision_fix);
|
||||
_mav_put_uint8_t(buf, 2, gps_fix);
|
||||
_mav_put_uint8_t(buf, 3, ahrs_health);
|
||||
_mav_put_uint8_t(buf, 4, control_att);
|
||||
_mav_put_uint8_t(buf, 5, control_pos_xy);
|
||||
_mav_put_uint8_t(buf, 6, control_pos_z);
|
||||
_mav_put_uint8_t(buf, 7, control_pos_yaw);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_STATUS, buf, 8, 157);
|
||||
#else
|
||||
mavlink_control_status_t packet;
|
||||
packet.position_fix = position_fix;
|
||||
packet.vision_fix = vision_fix;
|
||||
packet.gps_fix = gps_fix;
|
||||
packet.ahrs_health = ahrs_health;
|
||||
packet.control_att = control_att;
|
||||
packet.control_pos_xy = control_pos_xy;
|
||||
packet.control_pos_z = control_pos_z;
|
||||
packet.control_pos_yaw = control_pos_yaw;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CONTROL_STATUS, (const char *)&packet, 8, 157);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE CONTROL_STATUS UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field position_fix from control_status message
|
||||
*
|
||||
* @return Position fix: 0: lost, 2: 2D position fix, 3: 3D position fix
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_position_fix(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vision_fix from control_status message
|
||||
*
|
||||
* @return Vision position fix: 0: lost, 1: 2D local position hold, 2: 2D global position fix, 3: 3D global position fix
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_vision_fix(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field gps_fix from control_status message
|
||||
*
|
||||
* @return GPS position fix: 0: no reception, 1: Minimum 1 satellite, but no position fix, 2: 2D position fix, 3: 3D position fix
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_gps_fix(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ahrs_health from control_status message
|
||||
*
|
||||
* @return Attitude estimation health: 0: poor, 255: excellent
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_ahrs_health(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field control_att from control_status message
|
||||
*
|
||||
* @return 0: Attitude control disabled, 1: enabled
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_control_att(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field control_pos_xy from control_status message
|
||||
*
|
||||
* @return 0: X, Y position control disabled, 1: enabled
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_control_pos_xy(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field control_pos_z from control_status message
|
||||
*
|
||||
* @return 0: Z position control disabled, 1: enabled
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_control_pos_z(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field control_pos_yaw from control_status message
|
||||
*
|
||||
* @return 0: Yaw angle control disabled, 1: enabled
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_control_status_get_control_pos_yaw(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a control_status message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param control_status C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_control_status_decode(const mavlink_message_t* msg, mavlink_control_status_t* control_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
control_status->position_fix = mavlink_msg_control_status_get_position_fix(msg);
|
||||
control_status->vision_fix = mavlink_msg_control_status_get_vision_fix(msg);
|
||||
control_status->gps_fix = mavlink_msg_control_status_get_gps_fix(msg);
|
||||
control_status->ahrs_health = mavlink_msg_control_status_get_ahrs_health(msg);
|
||||
control_status->control_att = mavlink_msg_control_status_get_control_att(msg);
|
||||
control_status->control_pos_xy = mavlink_msg_control_status_get_control_pos_xy(msg);
|
||||
control_status->control_pos_z = mavlink_msg_control_status_get_control_pos_z(msg);
|
||||
control_status->control_pos_yaw = mavlink_msg_control_status_get_control_pos_yaw(msg);
|
||||
#else
|
||||
memcpy(control_status, _MAV_PAYLOAD(msg), 8);
|
||||
#endif
|
||||
}
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_data_stream_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a data_stream message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param stream_id The ID of the requested data stream
|
||||
* @param message_rate The requested interval between two messages of this type
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_data_stream_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data_stream struct into a message
|
||||
* @brief Encode a data_stream struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_data_stream_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_data_stream_pack(system_id, component_id, msg, data_stream->stream_id, data_stream->message_rate, data_stream->on_off);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data_stream struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data_stream C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data_stream_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_data_stream_t* data_stream)
|
||||
{
|
||||
return mavlink_msg_data_stream_pack_chan(system_id, component_id, chan, msg, data_stream->stream_id, data_stream->message_rate, data_stream->on_off);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data_stream message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_debug_pack(uint8_t system_id, uint8_t compone
|
||||
* @brief Pack a debug message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param ind index of debug variable
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_debug_pack_chan(uint8_t system_id, uint8_t co
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a debug struct into a message
|
||||
* @brief Encode a debug struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_debug_encode(uint8_t system_id, uint8_t compo
|
||||
return mavlink_msg_debug_pack(system_id, component_id, msg, debug->time_boot_ms, debug->ind, debug->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a debug struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param debug C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_debug_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_debug_t* debug)
|
||||
{
|
||||
return mavlink_msg_debug_pack_chan(system_id, component_id, chan, msg, debug->time_boot_ms, debug->ind, debug->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a debug message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -77,7 +77,7 @@ static inline uint16_t mavlink_msg_debug_vect_pack(uint8_t system_id, uint8_t co
|
||||
* @brief Pack a debug_vect message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param name Name
|
||||
* @param time_usec Timestamp
|
||||
@@ -117,7 +117,7 @@ static inline uint16_t mavlink_msg_debug_vect_pack_chan(uint8_t system_id, uint8
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a debug_vect struct into a message
|
||||
* @brief Encode a debug_vect struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -129,6 +129,20 @@ static inline uint16_t mavlink_msg_debug_vect_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_debug_vect_pack(system_id, component_id, msg, debug_vect->name, debug_vect->time_usec, debug_vect->x, debug_vect->y, debug_vect->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a debug_vect struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param debug_vect C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_debug_vect_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_debug_vect_t* debug_vect)
|
||||
{
|
||||
return mavlink_msg_debug_vect_pack_chan(system_id, component_id, chan, msg, debug_vect->name, debug_vect->time_usec, debug_vect->x, debug_vect->y, debug_vect->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a debug_vect message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
// MESSAGE EXTENDED_MESSAGE PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_EXTENDED_MESSAGE 255
|
||||
|
||||
typedef struct __mavlink_extended_message_t
|
||||
{
|
||||
uint8_t target_system; ///< System which should execute the command
|
||||
uint8_t target_component; ///< Component which should execute the command, 0 for all components
|
||||
uint8_t protocol_flags; ///< Retransmission / ACK flags
|
||||
} mavlink_extended_message_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_EXTENDED_MESSAGE_LEN 3
|
||||
#define MAVLINK_MSG_ID_255_LEN 3
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_EXTENDED_MESSAGE { \
|
||||
"EXTENDED_MESSAGE", \
|
||||
3, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_extended_message_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_extended_message_t, target_component) }, \
|
||||
{ "protocol_flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_extended_message_t, protocol_flags) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a extended_message message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param protocol_flags Retransmission / ACK flags
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_extended_message_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t protocol_flags)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[3];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, protocol_flags);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 3);
|
||||
#else
|
||||
mavlink_extended_message_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.protocol_flags = protocol_flags;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 3);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_EXTENDED_MESSAGE;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 3, 247);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a extended_message message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param protocol_flags Retransmission / ACK flags
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_extended_message_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component,uint8_t protocol_flags)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[3];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, protocol_flags);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 3);
|
||||
#else
|
||||
mavlink_extended_message_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.protocol_flags = protocol_flags;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 3);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_EXTENDED_MESSAGE;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 3, 247);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a extended_message struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param extended_message C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_extended_message_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_extended_message_t* extended_message)
|
||||
{
|
||||
return mavlink_msg_extended_message_pack(system_id, component_id, msg, extended_message->target_system, extended_message->target_component, extended_message->protocol_flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a extended_message message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param protocol_flags Retransmission / ACK flags
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_extended_message_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t protocol_flags)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[3];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, protocol_flags);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_MESSAGE, buf, 3, 247);
|
||||
#else
|
||||
mavlink_extended_message_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.protocol_flags = protocol_flags;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EXTENDED_MESSAGE, (const char *)&packet, 3, 247);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE EXTENDED_MESSAGE UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from extended_message message
|
||||
*
|
||||
* @return System which should execute the command
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_extended_message_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from extended_message message
|
||||
*
|
||||
* @return Component which should execute the command, 0 for all components
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_extended_message_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field protocol_flags from extended_message message
|
||||
*
|
||||
* @return Retransmission / ACK flags
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_extended_message_get_protocol_flags(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a extended_message message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param extended_message C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_extended_message_decode(const mavlink_message_t* msg, mavlink_extended_message_t* extended_message)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
extended_message->target_system = mavlink_msg_extended_message_get_target_system(msg);
|
||||
extended_message->target_component = mavlink_msg_extended_message_get_target_component(msg);
|
||||
extended_message->protocol_flags = mavlink_msg_extended_message_get_protocol_flags(msg);
|
||||
#else
|
||||
memcpy(extended_message, _MAV_PAYLOAD(msg), 3);
|
||||
#endif
|
||||
}
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_file_transfer_dir_list_pack(uint8_t system_id
|
||||
* @brief Pack a file_transfer_dir_list message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param transfer_uid Unique transfer ID
|
||||
* @param dir_path Directory path to list
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_file_transfer_dir_list_pack_chan(uint8_t syst
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a file_transfer_dir_list struct into a message
|
||||
* @brief Encode a file_transfer_dir_list struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_file_transfer_dir_list_encode(uint8_t system_
|
||||
return mavlink_msg_file_transfer_dir_list_pack(system_id, component_id, msg, file_transfer_dir_list->transfer_uid, file_transfer_dir_list->dir_path, file_transfer_dir_list->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a file_transfer_dir_list struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param file_transfer_dir_list C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_file_transfer_dir_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_file_transfer_dir_list_t* file_transfer_dir_list)
|
||||
{
|
||||
return mavlink_msg_file_transfer_dir_list_pack_chan(system_id, component_id, chan, msg, file_transfer_dir_list->transfer_uid, file_transfer_dir_list->dir_path, file_transfer_dir_list->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a file_transfer_dir_list message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_file_transfer_res_pack(uint8_t system_id, uin
|
||||
* @brief Pack a file_transfer_res message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param transfer_uid Unique transfer ID
|
||||
* @param result 0: OK, 1: not permitted, 2: bad path / file name, 3: no space left on device
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_file_transfer_res_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a file_transfer_res struct into a message
|
||||
* @brief Encode a file_transfer_res struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_file_transfer_res_encode(uint8_t system_id, u
|
||||
return mavlink_msg_file_transfer_res_pack(system_id, component_id, msg, file_transfer_res->transfer_uid, file_transfer_res->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a file_transfer_res struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param file_transfer_res C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_file_transfer_res_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_file_transfer_res_t* file_transfer_res)
|
||||
{
|
||||
return mavlink_msg_file_transfer_res_pack_chan(system_id, component_id, chan, msg, file_transfer_res->transfer_uid, file_transfer_res->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a file_transfer_res message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -77,7 +77,7 @@ static inline uint16_t mavlink_msg_file_transfer_start_pack(uint8_t system_id, u
|
||||
* @brief Pack a file_transfer_start message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param transfer_uid Unique transfer ID
|
||||
* @param dest_path Destination path
|
||||
@@ -117,7 +117,7 @@ static inline uint16_t mavlink_msg_file_transfer_start_pack_chan(uint8_t system_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a file_transfer_start struct into a message
|
||||
* @brief Encode a file_transfer_start struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -129,6 +129,20 @@ static inline uint16_t mavlink_msg_file_transfer_start_encode(uint8_t system_id,
|
||||
return mavlink_msg_file_transfer_start_pack(system_id, component_id, msg, file_transfer_start->transfer_uid, file_transfer_start->dest_path, file_transfer_start->direction, file_transfer_start->file_size, file_transfer_start->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a file_transfer_start struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param file_transfer_start C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_file_transfer_start_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_file_transfer_start_t* file_transfer_start)
|
||||
{
|
||||
return mavlink_msg_file_transfer_start_pack_chan(system_id, component_id, chan, msg, file_transfer_start->transfer_uid, file_transfer_start->dest_path, file_transfer_start->direction, file_transfer_start->file_size, file_transfer_start->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a file_transfer_start message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,276 +0,0 @@
|
||||
// MESSAGE GLOBAL_POSITION PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_GLOBAL_POSITION 33
|
||||
|
||||
typedef struct __mavlink_global_position_t
|
||||
{
|
||||
uint64_t usec; ///< Timestamp (microseconds since unix epoch)
|
||||
float lat; ///< Latitude, in degrees
|
||||
float lon; ///< Longitude, in degrees
|
||||
float alt; ///< Absolute altitude, in meters
|
||||
float vx; ///< X Speed (in Latitude direction, positive: going north)
|
||||
float vy; ///< Y Speed (in Longitude direction, positive: going east)
|
||||
float vz; ///< Z Speed (in Altitude direction, positive: going up)
|
||||
} mavlink_global_position_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GLOBAL_POSITION_LEN 32
|
||||
#define MAVLINK_MSG_ID_33_LEN 32
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_GLOBAL_POSITION { \
|
||||
"GLOBAL_POSITION", \
|
||||
7, \
|
||||
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_global_position_t, usec) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_global_position_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_global_position_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_global_position_t, alt) }, \
|
||||
{ "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_global_position_t, vx) }, \
|
||||
{ "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_global_position_t, vy) }, \
|
||||
{ "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_global_position_t, vz) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a global_position message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param usec Timestamp (microseconds since unix epoch)
|
||||
* @param lat Latitude, in degrees
|
||||
* @param lon Longitude, in degrees
|
||||
* @param alt Absolute altitude, in meters
|
||||
* @param vx X Speed (in Latitude direction, positive: going north)
|
||||
* @param vy Y Speed (in Longitude direction, positive: going east)
|
||||
* @param vz Z Speed (in Altitude direction, positive: going up)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t usec, float lat, float lon, float alt, float vx, float vy, float vz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[32];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, lat);
|
||||
_mav_put_float(buf, 12, lon);
|
||||
_mav_put_float(buf, 16, alt);
|
||||
_mav_put_float(buf, 20, vx);
|
||||
_mav_put_float(buf, 24, vy);
|
||||
_mav_put_float(buf, 28, vz);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 32);
|
||||
#else
|
||||
mavlink_global_position_t packet;
|
||||
packet.usec = usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 32);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 32, 147);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a global_position message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param usec Timestamp (microseconds since unix epoch)
|
||||
* @param lat Latitude, in degrees
|
||||
* @param lon Longitude, in degrees
|
||||
* @param alt Absolute altitude, in meters
|
||||
* @param vx X Speed (in Latitude direction, positive: going north)
|
||||
* @param vy Y Speed (in Longitude direction, positive: going east)
|
||||
* @param vz Z Speed (in Altitude direction, positive: going up)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t usec,float lat,float lon,float alt,float vx,float vy,float vz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[32];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, lat);
|
||||
_mav_put_float(buf, 12, lon);
|
||||
_mav_put_float(buf, 16, alt);
|
||||
_mav_put_float(buf, 20, vx);
|
||||
_mav_put_float(buf, 24, vy);
|
||||
_mav_put_float(buf, 28, vz);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 32);
|
||||
#else
|
||||
mavlink_global_position_t packet;
|
||||
packet.usec = usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 32);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GLOBAL_POSITION;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 147);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_position struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param global_position C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_global_position_t* global_position)
|
||||
{
|
||||
return mavlink_msg_global_position_pack(system_id, component_id, msg, global_position->usec, global_position->lat, global_position->lon, global_position->alt, global_position->vx, global_position->vy, global_position->vz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a global_position message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param usec Timestamp (microseconds since unix epoch)
|
||||
* @param lat Latitude, in degrees
|
||||
* @param lon Longitude, in degrees
|
||||
* @param alt Absolute altitude, in meters
|
||||
* @param vx X Speed (in Latitude direction, positive: going north)
|
||||
* @param vy Y Speed (in Longitude direction, positive: going east)
|
||||
* @param vz Z Speed (in Altitude direction, positive: going up)
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_global_position_send(mavlink_channel_t chan, uint64_t usec, float lat, float lon, float alt, float vx, float vy, float vz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[32];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, lat);
|
||||
_mav_put_float(buf, 12, lon);
|
||||
_mav_put_float(buf, 16, alt);
|
||||
_mav_put_float(buf, 20, vx);
|
||||
_mav_put_float(buf, 24, vy);
|
||||
_mav_put_float(buf, 28, vz);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION, buf, 32, 147);
|
||||
#else
|
||||
mavlink_global_position_t packet;
|
||||
packet.usec = usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GLOBAL_POSITION, (const char *)&packet, 32, 147);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE GLOBAL_POSITION UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field usec from global_position message
|
||||
*
|
||||
* @return Timestamp (microseconds since unix epoch)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_global_position_get_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lat from global_position message
|
||||
*
|
||||
* @return Latitude, in degrees
|
||||
*/
|
||||
static inline float mavlink_msg_global_position_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lon from global_position message
|
||||
*
|
||||
* @return Longitude, in degrees
|
||||
*/
|
||||
static inline float mavlink_msg_global_position_get_lon(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field alt from global_position message
|
||||
*
|
||||
* @return Absolute altitude, in meters
|
||||
*/
|
||||
static inline float mavlink_msg_global_position_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vx from global_position message
|
||||
*
|
||||
* @return X Speed (in Latitude direction, positive: going north)
|
||||
*/
|
||||
static inline float mavlink_msg_global_position_get_vx(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vy from global_position message
|
||||
*
|
||||
* @return Y Speed (in Longitude direction, positive: going east)
|
||||
*/
|
||||
static inline float mavlink_msg_global_position_get_vy(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vz from global_position message
|
||||
*
|
||||
* @return Z Speed (in Altitude direction, positive: going up)
|
||||
*/
|
||||
static inline float mavlink_msg_global_position_get_vz(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a global_position message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param global_position C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_global_position_decode(const mavlink_message_t* msg, mavlink_global_position_t* global_position)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
global_position->usec = mavlink_msg_global_position_get_usec(msg);
|
||||
global_position->lat = mavlink_msg_global_position_get_lat(msg);
|
||||
global_position->lon = mavlink_msg_global_position_get_lon(msg);
|
||||
global_position->alt = mavlink_msg_global_position_get_alt(msg);
|
||||
global_position->vx = mavlink_msg_global_position_get_vx(msg);
|
||||
global_position->vy = mavlink_msg_global_position_get_vy(msg);
|
||||
global_position->vz = mavlink_msg_global_position_get_vz(msg);
|
||||
#else
|
||||
memcpy(global_position, _MAV_PAYLOAD(msg), 32);
|
||||
#endif
|
||||
}
|
||||
@@ -12,7 +12,7 @@ typedef struct __mavlink_global_position_int_t
|
||||
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
|
||||
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
uint16_t hdg; ///< Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
} mavlink_global_position_int_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GLOBAL_POSITION_INT_LEN 28
|
||||
@@ -53,7 +53,7 @@ typedef struct __mavlink_global_position_int_t
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
@@ -99,7 +99,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u
|
||||
* @brief Pack a global_position_int message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
@@ -153,7 +153,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack_chan(uint8_t system_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_position_int struct into a message
|
||||
* @brief Encode a global_position_int struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -165,6 +165,20 @@ static inline uint16_t mavlink_msg_global_position_int_encode(uint8_t system_id,
|
||||
return mavlink_msg_global_position_int_pack(system_id, component_id, msg, global_position_int->time_boot_ms, global_position_int->lat, global_position_int->lon, global_position_int->alt, global_position_int->relative_alt, global_position_int->vx, global_position_int->vy, global_position_int->vz, global_position_int->hdg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_position_int struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param global_position_int C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_global_position_int_t* global_position_int)
|
||||
{
|
||||
return mavlink_msg_global_position_int_pack_chan(system_id, component_id, chan, msg, global_position_int->time_boot_ms, global_position_int->lat, global_position_int->lon, global_position_int->alt, global_position_int->relative_alt, global_position_int->vx, global_position_int->vy, global_position_int->vz, global_position_int->hdg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a global_position_int message
|
||||
* @param chan MAVLink channel to send the message
|
||||
@@ -177,7 +191,7 @@ static inline uint16_t mavlink_msg_global_position_int_encode(uint8_t system_id,
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param hdg Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
@@ -308,7 +322,7 @@ static inline int16_t mavlink_msg_global_position_int_get_vz(const mavlink_messa
|
||||
/**
|
||||
* @brief Get field hdg from global_position_int message
|
||||
*
|
||||
* @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @return Compass heading in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_int_get_hdg(const mavlink_message_t* msg)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack(uint8_t sys
|
||||
* @brief Pack a global_position_setpoint_int message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_GLOBAL or MAV_FRAME_GLOBAL_RELATIVE_ALT
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
@@ -121,7 +121,7 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_pack_chan(uint8_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_position_setpoint_int struct into a message
|
||||
* @brief Encode a global_position_setpoint_int struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -133,6 +133,20 @@ static inline uint16_t mavlink_msg_global_position_setpoint_int_encode(uint8_t s
|
||||
return mavlink_msg_global_position_setpoint_int_pack(system_id, component_id, msg, global_position_setpoint_int->coordinate_frame, global_position_setpoint_int->latitude, global_position_setpoint_int->longitude, global_position_setpoint_int->altitude, global_position_setpoint_int->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_position_setpoint_int struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param global_position_setpoint_int C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_position_setpoint_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_global_position_setpoint_int_t* global_position_setpoint_int)
|
||||
{
|
||||
return mavlink_msg_global_position_setpoint_int_pack_chan(system_id, component_id, chan, msg, global_position_setpoint_int->coordinate_frame, global_position_setpoint_int->latitude, global_position_setpoint_int->longitude, global_position_setpoint_int->altitude, global_position_setpoint_int->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a global_position_setpoint_int message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack(uint8_t
|
||||
* @brief Pack a global_vision_position_estimate message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param usec Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
* @param x Global X position
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_pack_chan(uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_vision_position_estimate struct into a message
|
||||
* @brief Encode a global_vision_position_estimate struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_global_vision_position_estimate_encode(uint8_
|
||||
return mavlink_msg_global_vision_position_estimate_pack(system_id, component_id, msg, global_vision_position_estimate->usec, global_vision_position_estimate->x, global_vision_position_estimate->y, global_vision_position_estimate->z, global_vision_position_estimate->roll, global_vision_position_estimate->pitch, global_vision_position_estimate->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a global_vision_position_estimate struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param global_vision_position_estimate C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_global_vision_position_estimate_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_global_vision_position_estimate_t* global_vision_position_estimate)
|
||||
{
|
||||
return mavlink_msg_global_vision_position_estimate_pack_chan(system_id, component_id, chan, msg, global_vision_position_estimate->usec, global_vision_position_estimate->x, global_vision_position_estimate->y, global_vision_position_estimate->z, global_vision_position_estimate->roll, global_vision_position_estimate->pitch, global_vision_position_estimate->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a global_vision_position_estimate message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin
|
||||
* @brief Pack a gps_global_origin message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84), in degrees * 1E7
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_global_origin struct into a message
|
||||
* @brief Encode a gps_global_origin struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode(uint8_t system_id, u
|
||||
return mavlink_msg_gps_global_origin_pack(system_id, component_id, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_global_origin struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps_global_origin C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_global_origin_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_global_origin_t* gps_global_origin)
|
||||
{
|
||||
return mavlink_msg_gps_global_origin_pack_chan(system_id, component_id, chan, msg, gps_global_origin->latitude, gps_global_origin->longitude, gps_global_origin->altitude);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gps_global_origin message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
// MESSAGE GPS_LOCAL_ORIGIN_SET PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_LOCAL_ORIGIN_SET 49
|
||||
|
||||
typedef struct __mavlink_gps_local_origin_set_t
|
||||
{
|
||||
int32_t latitude; ///< Latitude (WGS84), expressed as * 1E7
|
||||
int32_t longitude; ///< Longitude (WGS84), expressed as * 1E7
|
||||
int32_t altitude; ///< Altitude(WGS84), expressed as * 1000
|
||||
} mavlink_gps_local_origin_set_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_LOCAL_ORIGIN_SET_LEN 12
|
||||
#define MAVLINK_MSG_ID_49_LEN 12
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_GPS_LOCAL_ORIGIN_SET { \
|
||||
"GPS_LOCAL_ORIGIN_SET", \
|
||||
3, \
|
||||
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_local_origin_set_t, latitude) }, \
|
||||
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_local_origin_set_t, longitude) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_local_origin_set_t, altitude) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a gps_local_origin_set message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param latitude Latitude (WGS84), expressed as * 1E7
|
||||
* @param longitude Longitude (WGS84), expressed as * 1E7
|
||||
* @param altitude Altitude(WGS84), expressed as * 1000
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_local_origin_set_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
int32_t latitude, int32_t longitude, int32_t altitude)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[12];
|
||||
_mav_put_int32_t(buf, 0, latitude);
|
||||
_mav_put_int32_t(buf, 4, longitude);
|
||||
_mav_put_int32_t(buf, 8, altitude);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 12);
|
||||
#else
|
||||
mavlink_gps_local_origin_set_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 12);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GPS_LOCAL_ORIGIN_SET;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 12, 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gps_local_origin_set message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param latitude Latitude (WGS84), expressed as * 1E7
|
||||
* @param longitude Longitude (WGS84), expressed as * 1E7
|
||||
* @param altitude Altitude(WGS84), expressed as * 1000
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_local_origin_set_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
int32_t latitude,int32_t longitude,int32_t altitude)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[12];
|
||||
_mav_put_int32_t(buf, 0, latitude);
|
||||
_mav_put_int32_t(buf, 4, longitude);
|
||||
_mav_put_int32_t(buf, 8, altitude);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 12);
|
||||
#else
|
||||
mavlink_gps_local_origin_set_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 12);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GPS_LOCAL_ORIGIN_SET;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 12, 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_local_origin_set struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps_local_origin_set C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_local_origin_set_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_local_origin_set_t* gps_local_origin_set)
|
||||
{
|
||||
return mavlink_msg_gps_local_origin_set_pack(system_id, component_id, msg, gps_local_origin_set->latitude, gps_local_origin_set->longitude, gps_local_origin_set->altitude);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gps_local_origin_set message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param latitude Latitude (WGS84), expressed as * 1E7
|
||||
* @param longitude Longitude (WGS84), expressed as * 1E7
|
||||
* @param altitude Altitude(WGS84), expressed as * 1000
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_gps_local_origin_set_send(mavlink_channel_t chan, int32_t latitude, int32_t longitude, int32_t altitude)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[12];
|
||||
_mav_put_int32_t(buf, 0, latitude);
|
||||
_mav_put_int32_t(buf, 4, longitude);
|
||||
_mav_put_int32_t(buf, 8, altitude);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_LOCAL_ORIGIN_SET, buf, 12, 14);
|
||||
#else
|
||||
mavlink_gps_local_origin_set_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_LOCAL_ORIGIN_SET, (const char *)&packet, 12, 14);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE GPS_LOCAL_ORIGIN_SET UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field latitude from gps_local_origin_set message
|
||||
*
|
||||
* @return Latitude (WGS84), expressed as * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_local_origin_set_get_latitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field longitude from gps_local_origin_set message
|
||||
*
|
||||
* @return Longitude (WGS84), expressed as * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_local_origin_set_get_longitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field altitude from gps_local_origin_set message
|
||||
*
|
||||
* @return Altitude(WGS84), expressed as * 1000
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_local_origin_set_get_altitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a gps_local_origin_set message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param gps_local_origin_set C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_gps_local_origin_set_decode(const mavlink_message_t* msg, mavlink_gps_local_origin_set_t* gps_local_origin_set)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
gps_local_origin_set->latitude = mavlink_msg_gps_local_origin_set_get_latitude(msg);
|
||||
gps_local_origin_set->longitude = mavlink_msg_gps_local_origin_set_get_longitude(msg);
|
||||
gps_local_origin_set->altitude = mavlink_msg_gps_local_origin_set_get_altitude(msg);
|
||||
#else
|
||||
memcpy(gps_local_origin_set, _MAV_PAYLOAD(msg), 12);
|
||||
#endif
|
||||
}
|
||||
@@ -1,320 +0,0 @@
|
||||
// MESSAGE GPS_RAW PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_RAW 32
|
||||
|
||||
typedef struct __mavlink_gps_raw_t
|
||||
{
|
||||
uint64_t usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
float lat; ///< Latitude in degrees
|
||||
float lon; ///< Longitude in degrees
|
||||
float alt; ///< Altitude in meters
|
||||
float eph; ///< GPS HDOP
|
||||
float epv; ///< GPS VDOP
|
||||
float v; ///< GPS ground speed
|
||||
float hdg; ///< Compass heading in degrees, 0..360 degrees
|
||||
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
} mavlink_gps_raw_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_RAW_LEN 37
|
||||
#define MAVLINK_MSG_ID_32_LEN 37
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_GPS_RAW { \
|
||||
"GPS_RAW", \
|
||||
9, \
|
||||
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gps_raw_t, usec) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_gps_raw_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_gps_raw_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_gps_raw_t, alt) }, \
|
||||
{ "eph", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_gps_raw_t, eph) }, \
|
||||
{ "epv", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_gps_raw_t, epv) }, \
|
||||
{ "v", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_gps_raw_t, v) }, \
|
||||
{ "hdg", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_gps_raw_t, hdg) }, \
|
||||
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_gps_raw_t, fix_type) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a gps_raw message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude in degrees
|
||||
* @param lon Longitude in degrees
|
||||
* @param alt Altitude in meters
|
||||
* @param eph GPS HDOP
|
||||
* @param epv GPS VDOP
|
||||
* @param v GPS ground speed
|
||||
* @param hdg Compass heading in degrees, 0..360 degrees
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t usec, uint8_t fix_type, float lat, float lon, float alt, float eph, float epv, float v, float hdg)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[37];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, lat);
|
||||
_mav_put_float(buf, 12, lon);
|
||||
_mav_put_float(buf, 16, alt);
|
||||
_mav_put_float(buf, 20, eph);
|
||||
_mav_put_float(buf, 24, epv);
|
||||
_mav_put_float(buf, 28, v);
|
||||
_mav_put_float(buf, 32, hdg);
|
||||
_mav_put_uint8_t(buf, 36, fix_type);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 37);
|
||||
#else
|
||||
mavlink_gps_raw_t packet;
|
||||
packet.usec = usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.eph = eph;
|
||||
packet.epv = epv;
|
||||
packet.v = v;
|
||||
packet.hdg = hdg;
|
||||
packet.fix_type = fix_type;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 37);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GPS_RAW;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 37, 220);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gps_raw message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude in degrees
|
||||
* @param lon Longitude in degrees
|
||||
* @param alt Altitude in meters
|
||||
* @param eph GPS HDOP
|
||||
* @param epv GPS VDOP
|
||||
* @param v GPS ground speed
|
||||
* @param hdg Compass heading in degrees, 0..360 degrees
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t usec,uint8_t fix_type,float lat,float lon,float alt,float eph,float epv,float v,float hdg)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[37];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, lat);
|
||||
_mav_put_float(buf, 12, lon);
|
||||
_mav_put_float(buf, 16, alt);
|
||||
_mav_put_float(buf, 20, eph);
|
||||
_mav_put_float(buf, 24, epv);
|
||||
_mav_put_float(buf, 28, v);
|
||||
_mav_put_float(buf, 32, hdg);
|
||||
_mav_put_uint8_t(buf, 36, fix_type);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 37);
|
||||
#else
|
||||
mavlink_gps_raw_t packet;
|
||||
packet.usec = usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.eph = eph;
|
||||
packet.epv = epv;
|
||||
packet.v = v;
|
||||
packet.hdg = hdg;
|
||||
packet.fix_type = fix_type;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 37);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GPS_RAW;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 37, 220);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_raw struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps_raw C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_raw_t* gps_raw)
|
||||
{
|
||||
return mavlink_msg_gps_raw_pack(system_id, component_id, msg, gps_raw->usec, gps_raw->fix_type, gps_raw->lat, gps_raw->lon, gps_raw->alt, gps_raw->eph, gps_raw->epv, gps_raw->v, gps_raw->hdg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gps_raw message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude in degrees
|
||||
* @param lon Longitude in degrees
|
||||
* @param alt Altitude in meters
|
||||
* @param eph GPS HDOP
|
||||
* @param epv GPS VDOP
|
||||
* @param v GPS ground speed
|
||||
* @param hdg Compass heading in degrees, 0..360 degrees
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_gps_raw_send(mavlink_channel_t chan, uint64_t usec, uint8_t fix_type, float lat, float lon, float alt, float eph, float epv, float v, float hdg)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[37];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, lat);
|
||||
_mav_put_float(buf, 12, lon);
|
||||
_mav_put_float(buf, 16, alt);
|
||||
_mav_put_float(buf, 20, eph);
|
||||
_mav_put_float(buf, 24, epv);
|
||||
_mav_put_float(buf, 28, v);
|
||||
_mav_put_float(buf, 32, hdg);
|
||||
_mav_put_uint8_t(buf, 36, fix_type);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW, buf, 37, 220);
|
||||
#else
|
||||
mavlink_gps_raw_t packet;
|
||||
packet.usec = usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.eph = eph;
|
||||
packet.epv = epv;
|
||||
packet.v = v;
|
||||
packet.hdg = hdg;
|
||||
packet.fix_type = fix_type;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_RAW, (const char *)&packet, 37, 220);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE GPS_RAW UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field usec from gps_raw message
|
||||
*
|
||||
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_gps_raw_get_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field fix_type from gps_raw message
|
||||
*
|
||||
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gps_raw_get_fix_type(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lat from gps_raw message
|
||||
*
|
||||
* @return Latitude in degrees
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lon from gps_raw message
|
||||
*
|
||||
* @return Longitude in degrees
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_lon(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field alt from gps_raw message
|
||||
*
|
||||
* @return Altitude in meters
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field eph from gps_raw message
|
||||
*
|
||||
* @return GPS HDOP
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_eph(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field epv from gps_raw message
|
||||
*
|
||||
* @return GPS VDOP
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_epv(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field v from gps_raw message
|
||||
*
|
||||
* @return GPS ground speed
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_v(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field hdg from gps_raw message
|
||||
*
|
||||
* @return Compass heading in degrees, 0..360 degrees
|
||||
*/
|
||||
static inline float mavlink_msg_gps_raw_get_hdg(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a gps_raw message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param gps_raw C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_gps_raw_decode(const mavlink_message_t* msg, mavlink_gps_raw_t* gps_raw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
gps_raw->usec = mavlink_msg_gps_raw_get_usec(msg);
|
||||
gps_raw->lat = mavlink_msg_gps_raw_get_lat(msg);
|
||||
gps_raw->lon = mavlink_msg_gps_raw_get_lon(msg);
|
||||
gps_raw->alt = mavlink_msg_gps_raw_get_alt(msg);
|
||||
gps_raw->eph = mavlink_msg_gps_raw_get_eph(msg);
|
||||
gps_raw->epv = mavlink_msg_gps_raw_get_epv(msg);
|
||||
gps_raw->v = mavlink_msg_gps_raw_get_v(msg);
|
||||
gps_raw->hdg = mavlink_msg_gps_raw_get_hdg(msg);
|
||||
gps_raw->fix_type = mavlink_msg_gps_raw_get_fix_type(msg);
|
||||
#else
|
||||
memcpy(gps_raw, _MAV_PAYLOAD(msg), 37);
|
||||
#endif
|
||||
}
|
||||
@@ -8,10 +8,10 @@ typedef struct __mavlink_gps_raw_int_t
|
||||
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
|
||||
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255
|
||||
} mavlink_gps_raw_int_t;
|
||||
@@ -52,10 +52,10 @@ typedef struct __mavlink_gps_raw_int_t
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
* @param satellites_visible Number of satellites visible. If unknown, set to 255
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
@@ -104,17 +104,17 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a gps_raw_int message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
* @param satellites_visible Number of satellites visible. If unknown, set to 255
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
@@ -161,7 +161,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_raw_int struct into a message
|
||||
* @brief Encode a gps_raw_int struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -173,6 +173,20 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_gps_raw_int_pack(system_id, component_id, msg, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_raw_int struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps_raw_int C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_raw_int_t* gps_raw_int)
|
||||
{
|
||||
return mavlink_msg_gps_raw_int_pack_chan(system_id, component_id, chan, msg, gps_raw_int->time_usec, gps_raw_int->fix_type, gps_raw_int->lat, gps_raw_int->lon, gps_raw_int->alt, gps_raw_int->eph, gps_raw_int->epv, gps_raw_int->vel, gps_raw_int->cog, gps_raw_int->satellites_visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gps_raw_int message
|
||||
* @param chan MAVLink channel to send the message
|
||||
@@ -182,10 +196,10 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode(uint8_t system_id, uint8_t
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
* @param satellites_visible Number of satellites visible. If unknown, set to 255
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
@@ -289,7 +303,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* m
|
||||
/**
|
||||
* @brief Get field eph from gps_raw_int message
|
||||
*
|
||||
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t* msg)
|
||||
{
|
||||
@@ -299,7 +313,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_eph(const mavlink_message_t*
|
||||
/**
|
||||
* @brief Get field epv from gps_raw_int message
|
||||
*
|
||||
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t* msg)
|
||||
{
|
||||
@@ -309,7 +323,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_epv(const mavlink_message_t*
|
||||
/**
|
||||
* @brief Get field vel from gps_raw_int message
|
||||
*
|
||||
* @return GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @return GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t* msg)
|
||||
{
|
||||
@@ -319,7 +333,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_get_vel(const mavlink_message_t*
|
||||
/**
|
||||
* @brief Get field cog from gps_raw_int message
|
||||
*
|
||||
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_raw_int_get_cog(const mavlink_message_t* msg)
|
||||
{
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
// MESSAGE GPS_SET_GLOBAL_ORIGIN PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_SET_GLOBAL_ORIGIN 48
|
||||
|
||||
typedef struct __mavlink_gps_set_global_origin_t
|
||||
{
|
||||
int32_t latitude; ///< global position * 1E7
|
||||
int32_t longitude; ///< global position * 1E7
|
||||
int32_t altitude; ///< global position * 1000
|
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_gps_set_global_origin_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_SET_GLOBAL_ORIGIN_LEN 14
|
||||
#define MAVLINK_MSG_ID_48_LEN 14
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_GPS_SET_GLOBAL_ORIGIN { \
|
||||
"GPS_SET_GLOBAL_ORIGIN", \
|
||||
5, \
|
||||
{ { "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_gps_set_global_origin_t, latitude) }, \
|
||||
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_gps_set_global_origin_t, longitude) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_gps_set_global_origin_t, altitude) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_gps_set_global_origin_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_gps_set_global_origin_t, target_component) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a gps_set_global_origin message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param latitude global position * 1E7
|
||||
* @param longitude global position * 1E7
|
||||
* @param altitude global position * 1000
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_set_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, int32_t latitude, int32_t longitude, int32_t altitude)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[14];
|
||||
_mav_put_int32_t(buf, 0, latitude);
|
||||
_mav_put_int32_t(buf, 4, longitude);
|
||||
_mav_put_int32_t(buf, 8, altitude);
|
||||
_mav_put_uint8_t(buf, 12, target_system);
|
||||
_mav_put_uint8_t(buf, 13, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 14);
|
||||
#else
|
||||
mavlink_gps_set_global_origin_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 14);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GPS_SET_GLOBAL_ORIGIN;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 14, 170);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gps_set_global_origin message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param latitude global position * 1E7
|
||||
* @param longitude global position * 1E7
|
||||
* @param altitude global position * 1000
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_set_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component,int32_t latitude,int32_t longitude,int32_t altitude)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[14];
|
||||
_mav_put_int32_t(buf, 0, latitude);
|
||||
_mav_put_int32_t(buf, 4, longitude);
|
||||
_mav_put_int32_t(buf, 8, altitude);
|
||||
_mav_put_uint8_t(buf, 12, target_system);
|
||||
_mav_put_uint8_t(buf, 13, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 14);
|
||||
#else
|
||||
mavlink_gps_set_global_origin_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 14);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GPS_SET_GLOBAL_ORIGIN;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 14, 170);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_set_global_origin struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps_set_global_origin C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_set_global_origin_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gps_set_global_origin_t* gps_set_global_origin)
|
||||
{
|
||||
return mavlink_msg_gps_set_global_origin_pack(system_id, component_id, msg, gps_set_global_origin->target_system, gps_set_global_origin->target_component, gps_set_global_origin->latitude, gps_set_global_origin->longitude, gps_set_global_origin->altitude);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gps_set_global_origin message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param latitude global position * 1E7
|
||||
* @param longitude global position * 1E7
|
||||
* @param altitude global position * 1000
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_gps_set_global_origin_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, int32_t latitude, int32_t longitude, int32_t altitude)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[14];
|
||||
_mav_put_int32_t(buf, 0, latitude);
|
||||
_mav_put_int32_t(buf, 4, longitude);
|
||||
_mav_put_int32_t(buf, 8, altitude);
|
||||
_mav_put_uint8_t(buf, 12, target_system);
|
||||
_mav_put_uint8_t(buf, 13, target_component);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_SET_GLOBAL_ORIGIN, buf, 14, 170);
|
||||
#else
|
||||
mavlink_gps_set_global_origin_t packet;
|
||||
packet.latitude = latitude;
|
||||
packet.longitude = longitude;
|
||||
packet.altitude = altitude;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GPS_SET_GLOBAL_ORIGIN, (const char *)&packet, 14, 170);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE GPS_SET_GLOBAL_ORIGIN UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from gps_set_global_origin message
|
||||
*
|
||||
* @return System ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gps_set_global_origin_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from gps_set_global_origin message
|
||||
*
|
||||
* @return Component ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_gps_set_global_origin_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field latitude from gps_set_global_origin message
|
||||
*
|
||||
* @return global position * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_set_global_origin_get_latitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field longitude from gps_set_global_origin message
|
||||
*
|
||||
* @return global position * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_set_global_origin_get_longitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field altitude from gps_set_global_origin message
|
||||
*
|
||||
* @return global position * 1000
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_set_global_origin_get_altitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a gps_set_global_origin message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param gps_set_global_origin C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_gps_set_global_origin_decode(const mavlink_message_t* msg, mavlink_gps_set_global_origin_t* gps_set_global_origin)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
gps_set_global_origin->latitude = mavlink_msg_gps_set_global_origin_get_latitude(msg);
|
||||
gps_set_global_origin->longitude = mavlink_msg_gps_set_global_origin_get_longitude(msg);
|
||||
gps_set_global_origin->altitude = mavlink_msg_gps_set_global_origin_get_altitude(msg);
|
||||
gps_set_global_origin->target_system = mavlink_msg_gps_set_global_origin_get_target_system(msg);
|
||||
gps_set_global_origin->target_component = mavlink_msg_gps_set_global_origin_get_target_component(msg);
|
||||
#else
|
||||
memcpy(gps_set_global_origin, _MAV_PAYLOAD(msg), 14);
|
||||
#endif
|
||||
}
|
||||
@@ -86,7 +86,7 @@ static inline uint16_t mavlink_msg_gps_status_pack(uint8_t system_id, uint8_t co
|
||||
* @brief Pack a gps_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param satellites_visible Number of satellites visible
|
||||
* @param satellite_prn Global satellite ID
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_gps_status_pack_chan(uint8_t system_id, uint8
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_status struct into a message
|
||||
* @brief Encode a gps_status struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -141,6 +141,20 @@ static inline uint16_t mavlink_msg_gps_status_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_gps_status_pack(system_id, component_id, msg, gps_status->satellites_visible, gps_status->satellite_prn, gps_status->satellite_used, gps_status->satellite_elevation, gps_status->satellite_azimuth, gps_status->satellite_snr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gps_status struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gps_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gps_status_t* gps_status)
|
||||
{
|
||||
return mavlink_msg_gps_status_pack_chan(system_id, component_id, chan, msg, gps_status->satellites_visible, gps_status->satellite_prn, gps_status->satellite_used, gps_status->satellite_elevation, gps_status->satellite_azimuth, gps_status->satellite_snr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gps_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -83,7 +83,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack(uint8_t system_id, uint8_t com
|
||||
* @brief Pack a heartbeat message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param type Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
|
||||
* @param autopilot Autopilot type / class. defined in MAV_AUTOPILOT ENUM
|
||||
@@ -127,7 +127,7 @@ static inline uint16_t mavlink_msg_heartbeat_pack_chan(uint8_t system_id, uint8_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a heartbeat struct into a message
|
||||
* @brief Encode a heartbeat struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -139,6 +139,20 @@ static inline uint16_t mavlink_msg_heartbeat_encode(uint8_t system_id, uint8_t c
|
||||
return mavlink_msg_heartbeat_pack(system_id, component_id, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a heartbeat struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param heartbeat C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_heartbeat_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_heartbeat_t* heartbeat)
|
||||
{
|
||||
return mavlink_msg_heartbeat_pack_chan(system_id, component_id, chan, msg, heartbeat->type, heartbeat->autopilot, heartbeat->base_mode, heartbeat->custom_mode, heartbeat->system_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a heartbeat message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a highres_imu message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
* @param xacc X acceleration (m/s^2)
|
||||
@@ -201,7 +201,7 @@ static inline uint16_t mavlink_msg_highres_imu_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a highres_imu struct into a message
|
||||
* @brief Encode a highres_imu struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -213,6 +213,20 @@ static inline uint16_t mavlink_msg_highres_imu_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_highres_imu_pack(system_id, component_id, msg, highres_imu->time_usec, highres_imu->xacc, highres_imu->yacc, highres_imu->zacc, highres_imu->xgyro, highres_imu->ygyro, highres_imu->zgyro, highres_imu->xmag, highres_imu->ymag, highres_imu->zmag, highres_imu->abs_pressure, highres_imu->diff_pressure, highres_imu->pressure_alt, highres_imu->temperature, highres_imu->fields_updated);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a highres_imu struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param highres_imu C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_highres_imu_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_highres_imu_t* highres_imu)
|
||||
{
|
||||
return mavlink_msg_highres_imu_pack_chan(system_id, component_id, chan, msg, highres_imu->time_usec, highres_imu->xacc, highres_imu->yacc, highres_imu->zacc, highres_imu->xgyro, highres_imu->ygyro, highres_imu->zgyro, highres_imu->xmag, highres_imu->ymag, highres_imu->zmag, highres_imu->abs_pressure, highres_imu->diff_pressure, highres_imu->pressure_alt, highres_imu->temperature, highres_imu->fields_updated);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a highres_imu message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_hil_controls_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a hil_controls message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param roll_ailerons Control output -1 .. 1
|
||||
@@ -169,7 +169,7 @@ static inline uint16_t mavlink_msg_hil_controls_pack_chan(uint8_t system_id, uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_controls struct into a message
|
||||
* @brief Encode a hil_controls struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -181,6 +181,20 @@ static inline uint16_t mavlink_msg_hil_controls_encode(uint8_t system_id, uint8_
|
||||
return mavlink_msg_hil_controls_pack(system_id, component_id, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_controls struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_controls C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_controls_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_controls_t* hil_controls)
|
||||
{
|
||||
return mavlink_msg_hil_controls_pack_chan(system_id, component_id, chan, msg, hil_controls->time_usec, hil_controls->roll_ailerons, hil_controls->pitch_elevator, hil_controls->yaw_rudder, hil_controls->throttle, hil_controls->aux1, hil_controls->aux2, hil_controls->aux3, hil_controls->aux4, hil_controls->mode, hil_controls->nav_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_controls message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
// MESSAGE HIL_GPS PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_GPS 113
|
||||
|
||||
typedef struct __mavlink_hil_gps_t
|
||||
{
|
||||
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
|
||||
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
uint16_t epv; ///< GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
int16_t vn; ///< GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
|
||||
int16_t ve; ///< GPS velocity in cm/s in EAST direction in earth-fixed NED frame
|
||||
int16_t vd; ///< GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
|
||||
uint16_t cog; ///< Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
uint8_t fix_type; ///< 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
uint8_t satellites_visible; ///< Number of satellites visible. If unknown, set to 255
|
||||
} mavlink_hil_gps_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_GPS_LEN 36
|
||||
#define MAVLINK_MSG_ID_113_LEN 36
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_GPS_CRC 124
|
||||
#define MAVLINK_MSG_ID_113_CRC 124
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_HIL_GPS { \
|
||||
"HIL_GPS", \
|
||||
13, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_gps_t, time_usec) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_hil_gps_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 12, offsetof(mavlink_hil_gps_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_hil_gps_t, alt) }, \
|
||||
{ "eph", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_hil_gps_t, eph) }, \
|
||||
{ "epv", NULL, MAVLINK_TYPE_UINT16_T, 0, 22, offsetof(mavlink_hil_gps_t, epv) }, \
|
||||
{ "vel", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_hil_gps_t, vel) }, \
|
||||
{ "vn", NULL, MAVLINK_TYPE_INT16_T, 0, 26, offsetof(mavlink_hil_gps_t, vn) }, \
|
||||
{ "ve", NULL, MAVLINK_TYPE_INT16_T, 0, 28, offsetof(mavlink_hil_gps_t, ve) }, \
|
||||
{ "vd", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_hil_gps_t, vd) }, \
|
||||
{ "cog", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_hil_gps_t, cog) }, \
|
||||
{ "fix_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_hil_gps_t, fix_type) }, \
|
||||
{ "satellites_visible", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_hil_gps_t, satellites_visible) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_gps message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @param vn GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
|
||||
* @param ve GPS velocity in cm/s in EAST direction in earth-fixed NED frame
|
||||
* @param vd GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param satellites_visible Number of satellites visible. If unknown, set to 255
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 8, lat);
|
||||
_mav_put_int32_t(buf, 12, lon);
|
||||
_mav_put_int32_t(buf, 16, alt);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_int16_t(buf, 26, vn);
|
||||
_mav_put_int16_t(buf, 28, ve);
|
||||
_mav_put_int16_t(buf, 30, vd);
|
||||
_mav_put_uint16_t(buf, 32, cog);
|
||||
_mav_put_uint8_t(buf, 34, fix_type);
|
||||
_mav_put_uint8_t(buf, 35, satellites_visible);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#else
|
||||
mavlink_hil_gps_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.eph = eph;
|
||||
packet.epv = epv;
|
||||
packet.vel = vel;
|
||||
packet.vn = vn;
|
||||
packet.ve = ve;
|
||||
packet.vd = vd;
|
||||
packet.cog = cog;
|
||||
packet.fix_type = fix_type;
|
||||
packet.satellites_visible = satellites_visible;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_GPS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_gps message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @param vn GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
|
||||
* @param ve GPS velocity in cm/s in EAST direction in earth-fixed NED frame
|
||||
* @param vd GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param satellites_visible Number of satellites visible. If unknown, set to 255
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t time_usec,uint8_t fix_type,int32_t lat,int32_t lon,int32_t alt,uint16_t eph,uint16_t epv,uint16_t vel,int16_t vn,int16_t ve,int16_t vd,uint16_t cog,uint8_t satellites_visible)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 8, lat);
|
||||
_mav_put_int32_t(buf, 12, lon);
|
||||
_mav_put_int32_t(buf, 16, alt);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_int16_t(buf, 26, vn);
|
||||
_mav_put_int16_t(buf, 28, ve);
|
||||
_mav_put_int16_t(buf, 30, vd);
|
||||
_mav_put_uint16_t(buf, 32, cog);
|
||||
_mav_put_uint8_t(buf, 34, fix_type);
|
||||
_mav_put_uint8_t(buf, 35, satellites_visible);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#else
|
||||
mavlink_hil_gps_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.eph = eph;
|
||||
packet.epv = epv;
|
||||
packet.vel = vel;
|
||||
packet.vn = vn;
|
||||
packet.ve = ve;
|
||||
packet.vd = vd;
|
||||
packet.cog = cog;
|
||||
packet.fix_type = fix_type;
|
||||
packet.satellites_visible = satellites_visible;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_GPS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_gps struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_gps C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_gps_t* hil_gps)
|
||||
{
|
||||
return mavlink_msg_hil_gps_pack(system_id, component_id, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_gps struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_gps C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_gps_t* hil_gps)
|
||||
{
|
||||
return mavlink_msg_hil_gps_pack_chan(system_id, component_id, chan, msg, hil_gps->time_usec, hil_gps->fix_type, hil_gps->lat, hil_gps->lon, hil_gps->alt, hil_gps->eph, hil_gps->epv, hil_gps->vel, hil_gps->vn, hil_gps->ve, hil_gps->vd, hil_gps->cog, hil_gps->satellites_visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_gps message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
* @param vn GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
|
||||
* @param ve GPS velocity in cm/s in EAST direction in earth-fixed NED frame
|
||||
* @param vd GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
|
||||
* @param cog Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
* @param satellites_visible Number of satellites visible. If unknown, set to 255
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_hil_gps_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t fix_type, int32_t lat, int32_t lon, int32_t alt, uint16_t eph, uint16_t epv, uint16_t vel, int16_t vn, int16_t ve, int16_t vd, uint16_t cog, uint8_t satellites_visible)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_GPS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 8, lat);
|
||||
_mav_put_int32_t(buf, 12, lon);
|
||||
_mav_put_int32_t(buf, 16, alt);
|
||||
_mav_put_uint16_t(buf, 20, eph);
|
||||
_mav_put_uint16_t(buf, 22, epv);
|
||||
_mav_put_uint16_t(buf, 24, vel);
|
||||
_mav_put_int16_t(buf, 26, vn);
|
||||
_mav_put_int16_t(buf, 28, ve);
|
||||
_mav_put_int16_t(buf, 30, vd);
|
||||
_mav_put_uint16_t(buf, 32, cog);
|
||||
_mav_put_uint8_t(buf, 34, fix_type);
|
||||
_mav_put_uint8_t(buf, 35, satellites_visible);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, buf, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, buf, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_hil_gps_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.eph = eph;
|
||||
packet.epv = epv;
|
||||
packet.vel = vel;
|
||||
packet.vn = vn;
|
||||
packet.ve = ve;
|
||||
packet.vd = vd;
|
||||
packet.cog = cog;
|
||||
packet.fix_type = fix_type;
|
||||
packet.satellites_visible = satellites_visible;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)&packet, MAVLINK_MSG_ID_HIL_GPS_LEN, MAVLINK_MSG_ID_HIL_GPS_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_GPS, (const char *)&packet, MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE HIL_GPS UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field time_usec from hil_gps message
|
||||
*
|
||||
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_hil_gps_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field fix_type from hil_gps message
|
||||
*
|
||||
* @return 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_hil_gps_get_fix_type(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 34);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lat from hil_gps message
|
||||
*
|
||||
* @return Latitude (WGS84), in degrees * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_gps_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lon from hil_gps message
|
||||
*
|
||||
* @return Longitude (WGS84), in degrees * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_gps_get_lon(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field alt from hil_gps message
|
||||
*
|
||||
* @return Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_gps_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field eph from hil_gps message
|
||||
*
|
||||
* @return GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_get_eph(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field epv from hil_gps message
|
||||
*
|
||||
* @return GPS VDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_get_epv(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 22);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vel from hil_gps message
|
||||
*
|
||||
* @return GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_get_vel(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vn from hil_gps message
|
||||
*
|
||||
* @return GPS velocity in cm/s in NORTH direction in earth-fixed NED frame
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_gps_get_vn(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 26);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ve from hil_gps message
|
||||
*
|
||||
* @return GPS velocity in cm/s in EAST direction in earth-fixed NED frame
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_gps_get_ve(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vd from hil_gps message
|
||||
*
|
||||
* @return GPS velocity in cm/s in DOWN direction in earth-fixed NED frame
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_gps_get_vd(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field cog from hil_gps message
|
||||
*
|
||||
* @return Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: 65535
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_gps_get_cog(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field satellites_visible from hil_gps message
|
||||
*
|
||||
* @return Number of satellites visible. If unknown, set to 255
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_hil_gps_get_satellites_visible(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 35);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a hil_gps message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param hil_gps C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_hil_gps_decode(const mavlink_message_t* msg, mavlink_hil_gps_t* hil_gps)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
hil_gps->time_usec = mavlink_msg_hil_gps_get_time_usec(msg);
|
||||
hil_gps->lat = mavlink_msg_hil_gps_get_lat(msg);
|
||||
hil_gps->lon = mavlink_msg_hil_gps_get_lon(msg);
|
||||
hil_gps->alt = mavlink_msg_hil_gps_get_alt(msg);
|
||||
hil_gps->eph = mavlink_msg_hil_gps_get_eph(msg);
|
||||
hil_gps->epv = mavlink_msg_hil_gps_get_epv(msg);
|
||||
hil_gps->vel = mavlink_msg_hil_gps_get_vel(msg);
|
||||
hil_gps->vn = mavlink_msg_hil_gps_get_vn(msg);
|
||||
hil_gps->ve = mavlink_msg_hil_gps_get_ve(msg);
|
||||
hil_gps->vd = mavlink_msg_hil_gps_get_vd(msg);
|
||||
hil_gps->cog = mavlink_msg_hil_gps_get_cog(msg);
|
||||
hil_gps->fix_type = mavlink_msg_hil_gps_get_fix_type(msg);
|
||||
hil_gps->satellites_visible = mavlink_msg_hil_gps_get_satellites_visible(msg);
|
||||
#else
|
||||
memcpy(hil_gps, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_GPS_LEN);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
// MESSAGE HIL_OPTICAL_FLOW PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW 114
|
||||
|
||||
typedef struct __mavlink_hil_optical_flow_t
|
||||
{
|
||||
uint64_t time_usec; ///< Timestamp (UNIX)
|
||||
float flow_comp_m_x; ///< Flow in meters in x-sensor direction, angular-speed compensated
|
||||
float flow_comp_m_y; ///< Flow in meters in y-sensor direction, angular-speed compensated
|
||||
float ground_distance; ///< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
|
||||
int16_t flow_x; ///< Flow in pixels in x-sensor direction
|
||||
int16_t flow_y; ///< Flow in pixels in y-sensor direction
|
||||
uint8_t sensor_id; ///< Sensor ID
|
||||
uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
} mavlink_hil_optical_flow_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN 26
|
||||
#define MAVLINK_MSG_ID_114_LEN 26
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC 119
|
||||
#define MAVLINK_MSG_ID_114_CRC 119
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_HIL_OPTICAL_FLOW { \
|
||||
"HIL_OPTICAL_FLOW", \
|
||||
8, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_optical_flow_t, time_usec) }, \
|
||||
{ "flow_comp_m_x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_optical_flow_t, flow_comp_m_x) }, \
|
||||
{ "flow_comp_m_y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_optical_flow_t, flow_comp_m_y) }, \
|
||||
{ "ground_distance", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_optical_flow_t, ground_distance) }, \
|
||||
{ "flow_x", NULL, MAVLINK_TYPE_INT16_T, 0, 20, offsetof(mavlink_hil_optical_flow_t, flow_x) }, \
|
||||
{ "flow_y", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_hil_optical_flow_t, flow_y) }, \
|
||||
{ "sensor_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_hil_optical_flow_t, sensor_id) }, \
|
||||
{ "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_hil_optical_flow_t, quality) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_optical_flow message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec Timestamp (UNIX)
|
||||
* @param sensor_id Sensor ID
|
||||
* @param flow_x Flow in pixels in x-sensor direction
|
||||
* @param flow_y Flow in pixels in y-sensor direction
|
||||
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
|
||||
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
|
||||
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_optical_flow_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, flow_comp_m_x);
|
||||
_mav_put_float(buf, 12, flow_comp_m_y);
|
||||
_mav_put_float(buf, 16, ground_distance);
|
||||
_mav_put_int16_t(buf, 20, flow_x);
|
||||
_mav_put_int16_t(buf, 22, flow_y);
|
||||
_mav_put_uint8_t(buf, 24, sensor_id);
|
||||
_mav_put_uint8_t(buf, 25, quality);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#else
|
||||
mavlink_hil_optical_flow_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.flow_comp_m_x = flow_comp_m_x;
|
||||
packet.flow_comp_m_y = flow_comp_m_y;
|
||||
packet.ground_distance = ground_distance;
|
||||
packet.flow_x = flow_x;
|
||||
packet.flow_y = flow_y;
|
||||
packet.sensor_id = sensor_id;
|
||||
packet.quality = quality;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_OPTICAL_FLOW;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_optical_flow message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (UNIX)
|
||||
* @param sensor_id Sensor ID
|
||||
* @param flow_x Flow in pixels in x-sensor direction
|
||||
* @param flow_y Flow in pixels in y-sensor direction
|
||||
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
|
||||
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
|
||||
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_optical_flow_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t time_usec,uint8_t sensor_id,int16_t flow_x,int16_t flow_y,float flow_comp_m_x,float flow_comp_m_y,uint8_t quality,float ground_distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, flow_comp_m_x);
|
||||
_mav_put_float(buf, 12, flow_comp_m_y);
|
||||
_mav_put_float(buf, 16, ground_distance);
|
||||
_mav_put_int16_t(buf, 20, flow_x);
|
||||
_mav_put_int16_t(buf, 22, flow_y);
|
||||
_mav_put_uint8_t(buf, 24, sensor_id);
|
||||
_mav_put_uint8_t(buf, 25, quality);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#else
|
||||
mavlink_hil_optical_flow_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.flow_comp_m_x = flow_comp_m_x;
|
||||
packet.flow_comp_m_y = flow_comp_m_y;
|
||||
packet.ground_distance = ground_distance;
|
||||
packet.flow_x = flow_x;
|
||||
packet.flow_y = flow_y;
|
||||
packet.sensor_id = sensor_id;
|
||||
packet.quality = quality;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_OPTICAL_FLOW;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_optical_flow struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_optical_flow C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_optical_flow_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_optical_flow_t* hil_optical_flow)
|
||||
{
|
||||
return mavlink_msg_hil_optical_flow_pack(system_id, component_id, msg, hil_optical_flow->time_usec, hil_optical_flow->sensor_id, hil_optical_flow->flow_x, hil_optical_flow->flow_y, hil_optical_flow->flow_comp_m_x, hil_optical_flow->flow_comp_m_y, hil_optical_flow->quality, hil_optical_flow->ground_distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_optical_flow struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_optical_flow C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_optical_flow_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_optical_flow_t* hil_optical_flow)
|
||||
{
|
||||
return mavlink_msg_hil_optical_flow_pack_chan(system_id, component_id, chan, msg, hil_optical_flow->time_usec, hil_optical_flow->sensor_id, hil_optical_flow->flow_x, hil_optical_flow->flow_y, hil_optical_flow->flow_comp_m_x, hil_optical_flow->flow_comp_m_y, hil_optical_flow->quality, hil_optical_flow->ground_distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_optical_flow message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time_usec Timestamp (UNIX)
|
||||
* @param sensor_id Sensor ID
|
||||
* @param flow_x Flow in pixels in x-sensor direction
|
||||
* @param flow_y Flow in pixels in y-sensor direction
|
||||
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
|
||||
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
|
||||
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
* @param ground_distance Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_hil_optical_flow_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t sensor_id, int16_t flow_x, int16_t flow_y, float flow_comp_m_x, float flow_comp_m_y, uint8_t quality, float ground_distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, flow_comp_m_x);
|
||||
_mav_put_float(buf, 12, flow_comp_m_y);
|
||||
_mav_put_float(buf, 16, ground_distance);
|
||||
_mav_put_int16_t(buf, 20, flow_x);
|
||||
_mav_put_int16_t(buf, 22, flow_y);
|
||||
_mav_put_uint8_t(buf, 24, sensor_id);
|
||||
_mav_put_uint8_t(buf, 25, quality);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, buf, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_hil_optical_flow_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.flow_comp_m_x = flow_comp_m_x;
|
||||
packet.flow_comp_m_y = flow_comp_m_y;
|
||||
packet.ground_distance = ground_distance;
|
||||
packet.flow_x = flow_x;
|
||||
packet.flow_y = flow_y;
|
||||
packet.sensor_id = sensor_id;
|
||||
packet.quality = quality;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW, (const char *)&packet, MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE HIL_OPTICAL_FLOW UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field time_usec from hil_optical_flow message
|
||||
*
|
||||
* @return Timestamp (UNIX)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_hil_optical_flow_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field sensor_id from hil_optical_flow message
|
||||
*
|
||||
* @return Sensor ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_hil_optical_flow_get_sensor_id(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field flow_x from hil_optical_flow message
|
||||
*
|
||||
* @return Flow in pixels in x-sensor direction
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_optical_flow_get_flow_x(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field flow_y from hil_optical_flow message
|
||||
*
|
||||
* @return Flow in pixels in y-sensor direction
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_optical_flow_get_flow_y(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 22);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field flow_comp_m_x from hil_optical_flow message
|
||||
*
|
||||
* @return Flow in meters in x-sensor direction, angular-speed compensated
|
||||
*/
|
||||
static inline float mavlink_msg_hil_optical_flow_get_flow_comp_m_x(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field flow_comp_m_y from hil_optical_flow message
|
||||
*
|
||||
* @return Flow in meters in y-sensor direction, angular-speed compensated
|
||||
*/
|
||||
static inline float mavlink_msg_hil_optical_flow_get_flow_comp_m_y(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field quality from hil_optical_flow message
|
||||
*
|
||||
* @return Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_hil_optical_flow_get_quality(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ground_distance from hil_optical_flow message
|
||||
*
|
||||
* @return Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
|
||||
*/
|
||||
static inline float mavlink_msg_hil_optical_flow_get_ground_distance(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a hil_optical_flow message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param hil_optical_flow C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_hil_optical_flow_decode(const mavlink_message_t* msg, mavlink_hil_optical_flow_t* hil_optical_flow)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
hil_optical_flow->time_usec = mavlink_msg_hil_optical_flow_get_time_usec(msg);
|
||||
hil_optical_flow->flow_comp_m_x = mavlink_msg_hil_optical_flow_get_flow_comp_m_x(msg);
|
||||
hil_optical_flow->flow_comp_m_y = mavlink_msg_hil_optical_flow_get_flow_comp_m_y(msg);
|
||||
hil_optical_flow->ground_distance = mavlink_msg_hil_optical_flow_get_ground_distance(msg);
|
||||
hil_optical_flow->flow_x = mavlink_msg_hil_optical_flow_get_flow_x(msg);
|
||||
hil_optical_flow->flow_y = mavlink_msg_hil_optical_flow_get_flow_y(msg);
|
||||
hil_optical_flow->sensor_id = mavlink_msg_hil_optical_flow_get_sensor_id(msg);
|
||||
hil_optical_flow->quality = mavlink_msg_hil_optical_flow_get_quality(msg);
|
||||
#else
|
||||
memcpy(hil_optical_flow, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_OPTICAL_FLOW_LEN);
|
||||
#endif
|
||||
}
|
||||
@@ -124,7 +124,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack(uint8_t system_id, uin
|
||||
* @brief Pack a hil_rc_inputs_raw message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param chan1_raw RC channel 1 value, in microseconds
|
||||
@@ -193,7 +193,7 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_rc_inputs_raw struct into a message
|
||||
* @brief Encode a hil_rc_inputs_raw struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -205,6 +205,20 @@ static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode(uint8_t system_id, u
|
||||
return mavlink_msg_hil_rc_inputs_raw_pack(system_id, component_id, msg, hil_rc_inputs_raw->time_usec, hil_rc_inputs_raw->chan1_raw, hil_rc_inputs_raw->chan2_raw, hil_rc_inputs_raw->chan3_raw, hil_rc_inputs_raw->chan4_raw, hil_rc_inputs_raw->chan5_raw, hil_rc_inputs_raw->chan6_raw, hil_rc_inputs_raw->chan7_raw, hil_rc_inputs_raw->chan8_raw, hil_rc_inputs_raw->chan9_raw, hil_rc_inputs_raw->chan10_raw, hil_rc_inputs_raw->chan11_raw, hil_rc_inputs_raw->chan12_raw, hil_rc_inputs_raw->rssi);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_rc_inputs_raw struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_rc_inputs_raw C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_rc_inputs_raw_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_rc_inputs_raw_t* hil_rc_inputs_raw)
|
||||
{
|
||||
return mavlink_msg_hil_rc_inputs_raw_pack_chan(system_id, component_id, chan, msg, hil_rc_inputs_raw->time_usec, hil_rc_inputs_raw->chan1_raw, hil_rc_inputs_raw->chan2_raw, hil_rc_inputs_raw->chan3_raw, hil_rc_inputs_raw->chan4_raw, hil_rc_inputs_raw->chan5_raw, hil_rc_inputs_raw->chan6_raw, hil_rc_inputs_raw->chan7_raw, hil_rc_inputs_raw->chan8_raw, hil_rc_inputs_raw->chan9_raw, hil_rc_inputs_raw->chan10_raw, hil_rc_inputs_raw->chan11_raw, hil_rc_inputs_raw->chan12_raw, hil_rc_inputs_raw->rssi);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_rc_inputs_raw message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -0,0 +1,485 @@
|
||||
// MESSAGE HIL_SENSOR PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_SENSOR 107
|
||||
|
||||
typedef struct __mavlink_hil_sensor_t
|
||||
{
|
||||
uint64_t time_usec; ///< Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
float xacc; ///< X acceleration (m/s^2)
|
||||
float yacc; ///< Y acceleration (m/s^2)
|
||||
float zacc; ///< Z acceleration (m/s^2)
|
||||
float xgyro; ///< Angular speed around X axis in body frame (rad / sec)
|
||||
float ygyro; ///< Angular speed around Y axis in body frame (rad / sec)
|
||||
float zgyro; ///< Angular speed around Z axis in body frame (rad / sec)
|
||||
float xmag; ///< X Magnetic field (Gauss)
|
||||
float ymag; ///< Y Magnetic field (Gauss)
|
||||
float zmag; ///< Z Magnetic field (Gauss)
|
||||
float abs_pressure; ///< Absolute pressure in millibar
|
||||
float diff_pressure; ///< Differential pressure (airspeed) in millibar
|
||||
float pressure_alt; ///< Altitude calculated from pressure
|
||||
float temperature; ///< Temperature in degrees celsius
|
||||
uint32_t fields_updated; ///< Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
|
||||
} mavlink_hil_sensor_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_SENSOR_LEN 64
|
||||
#define MAVLINK_MSG_ID_107_LEN 64
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_SENSOR_CRC 108
|
||||
#define MAVLINK_MSG_ID_107_CRC 108
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_HIL_SENSOR { \
|
||||
"HIL_SENSOR", \
|
||||
15, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_sensor_t, time_usec) }, \
|
||||
{ "xacc", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_hil_sensor_t, xacc) }, \
|
||||
{ "yacc", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_hil_sensor_t, yacc) }, \
|
||||
{ "zacc", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_hil_sensor_t, zacc) }, \
|
||||
{ "xgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_hil_sensor_t, xgyro) }, \
|
||||
{ "ygyro", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_sensor_t, ygyro) }, \
|
||||
{ "zgyro", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_sensor_t, zgyro) }, \
|
||||
{ "xmag", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_sensor_t, xmag) }, \
|
||||
{ "ymag", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_hil_sensor_t, ymag) }, \
|
||||
{ "zmag", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_hil_sensor_t, zmag) }, \
|
||||
{ "abs_pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_hil_sensor_t, abs_pressure) }, \
|
||||
{ "diff_pressure", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_hil_sensor_t, diff_pressure) }, \
|
||||
{ "pressure_alt", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_hil_sensor_t, pressure_alt) }, \
|
||||
{ "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_hil_sensor_t, temperature) }, \
|
||||
{ "fields_updated", NULL, MAVLINK_TYPE_UINT32_T, 0, 60, offsetof(mavlink_hil_sensor_t, fields_updated) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_sensor message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
* @param xacc X acceleration (m/s^2)
|
||||
* @param yacc Y acceleration (m/s^2)
|
||||
* @param zacc Z acceleration (m/s^2)
|
||||
* @param xgyro Angular speed around X axis in body frame (rad / sec)
|
||||
* @param ygyro Angular speed around Y axis in body frame (rad / sec)
|
||||
* @param zgyro Angular speed around Z axis in body frame (rad / sec)
|
||||
* @param xmag X Magnetic field (Gauss)
|
||||
* @param ymag Y Magnetic field (Gauss)
|
||||
* @param zmag Z Magnetic field (Gauss)
|
||||
* @param abs_pressure Absolute pressure in millibar
|
||||
* @param diff_pressure Differential pressure (airspeed) in millibar
|
||||
* @param pressure_alt Altitude calculated from pressure
|
||||
* @param temperature Temperature in degrees celsius
|
||||
* @param fields_updated Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_sensor_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint32_t fields_updated)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_SENSOR_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, xacc);
|
||||
_mav_put_float(buf, 12, yacc);
|
||||
_mav_put_float(buf, 16, zacc);
|
||||
_mav_put_float(buf, 20, xgyro);
|
||||
_mav_put_float(buf, 24, ygyro);
|
||||
_mav_put_float(buf, 28, zgyro);
|
||||
_mav_put_float(buf, 32, xmag);
|
||||
_mav_put_float(buf, 36, ymag);
|
||||
_mav_put_float(buf, 40, zmag);
|
||||
_mav_put_float(buf, 44, abs_pressure);
|
||||
_mav_put_float(buf, 48, diff_pressure);
|
||||
_mav_put_float(buf, 52, pressure_alt);
|
||||
_mav_put_float(buf, 56, temperature);
|
||||
_mav_put_uint32_t(buf, 60, fields_updated);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#else
|
||||
mavlink_hil_sensor_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
packet.xgyro = xgyro;
|
||||
packet.ygyro = ygyro;
|
||||
packet.zgyro = zgyro;
|
||||
packet.xmag = xmag;
|
||||
packet.ymag = ymag;
|
||||
packet.zmag = zmag;
|
||||
packet.abs_pressure = abs_pressure;
|
||||
packet.diff_pressure = diff_pressure;
|
||||
packet.pressure_alt = pressure_alt;
|
||||
packet.temperature = temperature;
|
||||
packet.fields_updated = fields_updated;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_SENSOR;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_sensor message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
* @param xacc X acceleration (m/s^2)
|
||||
* @param yacc Y acceleration (m/s^2)
|
||||
* @param zacc Z acceleration (m/s^2)
|
||||
* @param xgyro Angular speed around X axis in body frame (rad / sec)
|
||||
* @param ygyro Angular speed around Y axis in body frame (rad / sec)
|
||||
* @param zgyro Angular speed around Z axis in body frame (rad / sec)
|
||||
* @param xmag X Magnetic field (Gauss)
|
||||
* @param ymag Y Magnetic field (Gauss)
|
||||
* @param zmag Z Magnetic field (Gauss)
|
||||
* @param abs_pressure Absolute pressure in millibar
|
||||
* @param diff_pressure Differential pressure (airspeed) in millibar
|
||||
* @param pressure_alt Altitude calculated from pressure
|
||||
* @param temperature Temperature in degrees celsius
|
||||
* @param fields_updated Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_sensor_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t time_usec,float xacc,float yacc,float zacc,float xgyro,float ygyro,float zgyro,float xmag,float ymag,float zmag,float abs_pressure,float diff_pressure,float pressure_alt,float temperature,uint32_t fields_updated)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_SENSOR_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, xacc);
|
||||
_mav_put_float(buf, 12, yacc);
|
||||
_mav_put_float(buf, 16, zacc);
|
||||
_mav_put_float(buf, 20, xgyro);
|
||||
_mav_put_float(buf, 24, ygyro);
|
||||
_mav_put_float(buf, 28, zgyro);
|
||||
_mav_put_float(buf, 32, xmag);
|
||||
_mav_put_float(buf, 36, ymag);
|
||||
_mav_put_float(buf, 40, zmag);
|
||||
_mav_put_float(buf, 44, abs_pressure);
|
||||
_mav_put_float(buf, 48, diff_pressure);
|
||||
_mav_put_float(buf, 52, pressure_alt);
|
||||
_mav_put_float(buf, 56, temperature);
|
||||
_mav_put_uint32_t(buf, 60, fields_updated);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#else
|
||||
mavlink_hil_sensor_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
packet.xgyro = xgyro;
|
||||
packet.ygyro = ygyro;
|
||||
packet.zgyro = zgyro;
|
||||
packet.xmag = xmag;
|
||||
packet.ymag = ymag;
|
||||
packet.zmag = zmag;
|
||||
packet.abs_pressure = abs_pressure;
|
||||
packet.diff_pressure = diff_pressure;
|
||||
packet.pressure_alt = pressure_alt;
|
||||
packet.temperature = temperature;
|
||||
packet.fields_updated = fields_updated;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_SENSOR;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_sensor struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_sensor C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_sensor_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_sensor_t* hil_sensor)
|
||||
{
|
||||
return mavlink_msg_hil_sensor_pack(system_id, component_id, msg, hil_sensor->time_usec, hil_sensor->xacc, hil_sensor->yacc, hil_sensor->zacc, hil_sensor->xgyro, hil_sensor->ygyro, hil_sensor->zgyro, hil_sensor->xmag, hil_sensor->ymag, hil_sensor->zmag, hil_sensor->abs_pressure, hil_sensor->diff_pressure, hil_sensor->pressure_alt, hil_sensor->temperature, hil_sensor->fields_updated);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_sensor struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_sensor C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_sensor_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_sensor_t* hil_sensor)
|
||||
{
|
||||
return mavlink_msg_hil_sensor_pack_chan(system_id, component_id, chan, msg, hil_sensor->time_usec, hil_sensor->xacc, hil_sensor->yacc, hil_sensor->zacc, hil_sensor->xgyro, hil_sensor->ygyro, hil_sensor->zgyro, hil_sensor->xmag, hil_sensor->ymag, hil_sensor->zmag, hil_sensor->abs_pressure, hil_sensor->diff_pressure, hil_sensor->pressure_alt, hil_sensor->temperature, hil_sensor->fields_updated);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_sensor message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
* @param xacc X acceleration (m/s^2)
|
||||
* @param yacc Y acceleration (m/s^2)
|
||||
* @param zacc Z acceleration (m/s^2)
|
||||
* @param xgyro Angular speed around X axis in body frame (rad / sec)
|
||||
* @param ygyro Angular speed around Y axis in body frame (rad / sec)
|
||||
* @param zgyro Angular speed around Z axis in body frame (rad / sec)
|
||||
* @param xmag X Magnetic field (Gauss)
|
||||
* @param ymag Y Magnetic field (Gauss)
|
||||
* @param zmag Z Magnetic field (Gauss)
|
||||
* @param abs_pressure Absolute pressure in millibar
|
||||
* @param diff_pressure Differential pressure (airspeed) in millibar
|
||||
* @param pressure_alt Altitude calculated from pressure
|
||||
* @param temperature Temperature in degrees celsius
|
||||
* @param fields_updated Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_hil_sensor_send(mavlink_channel_t chan, uint64_t time_usec, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, float xmag, float ymag, float zmag, float abs_pressure, float diff_pressure, float pressure_alt, float temperature, uint32_t fields_updated)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_SENSOR_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, xacc);
|
||||
_mav_put_float(buf, 12, yacc);
|
||||
_mav_put_float(buf, 16, zacc);
|
||||
_mav_put_float(buf, 20, xgyro);
|
||||
_mav_put_float(buf, 24, ygyro);
|
||||
_mav_put_float(buf, 28, zgyro);
|
||||
_mav_put_float(buf, 32, xmag);
|
||||
_mav_put_float(buf, 36, ymag);
|
||||
_mav_put_float(buf, 40, zmag);
|
||||
_mav_put_float(buf, 44, abs_pressure);
|
||||
_mav_put_float(buf, 48, diff_pressure);
|
||||
_mav_put_float(buf, 52, pressure_alt);
|
||||
_mav_put_float(buf, 56, temperature);
|
||||
_mav_put_uint32_t(buf, 60, fields_updated);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, buf, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_hil_sensor_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
packet.xgyro = xgyro;
|
||||
packet.ygyro = ygyro;
|
||||
packet.zgyro = zgyro;
|
||||
packet.xmag = xmag;
|
||||
packet.ymag = ymag;
|
||||
packet.zmag = zmag;
|
||||
packet.abs_pressure = abs_pressure;
|
||||
packet.diff_pressure = diff_pressure;
|
||||
packet.pressure_alt = pressure_alt;
|
||||
packet.temperature = temperature;
|
||||
packet.fields_updated = fields_updated;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, (const char *)&packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN, MAVLINK_MSG_ID_HIL_SENSOR_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_SENSOR, (const char *)&packet, MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE HIL_SENSOR UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field time_usec from hil_sensor message
|
||||
*
|
||||
* @return Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_hil_sensor_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field xacc from hil_sensor message
|
||||
*
|
||||
* @return X acceleration (m/s^2)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_xacc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field yacc from hil_sensor message
|
||||
*
|
||||
* @return Y acceleration (m/s^2)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_yacc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field zacc from hil_sensor message
|
||||
*
|
||||
* @return Z acceleration (m/s^2)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_zacc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field xgyro from hil_sensor message
|
||||
*
|
||||
* @return Angular speed around X axis in body frame (rad / sec)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_xgyro(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ygyro from hil_sensor message
|
||||
*
|
||||
* @return Angular speed around Y axis in body frame (rad / sec)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_ygyro(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field zgyro from hil_sensor message
|
||||
*
|
||||
* @return Angular speed around Z axis in body frame (rad / sec)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_zgyro(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field xmag from hil_sensor message
|
||||
*
|
||||
* @return X Magnetic field (Gauss)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_xmag(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ymag from hil_sensor message
|
||||
*
|
||||
* @return Y Magnetic field (Gauss)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_ymag(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field zmag from hil_sensor message
|
||||
*
|
||||
* @return Z Magnetic field (Gauss)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_zmag(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 40);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field abs_pressure from hil_sensor message
|
||||
*
|
||||
* @return Absolute pressure in millibar
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_abs_pressure(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 44);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field diff_pressure from hil_sensor message
|
||||
*
|
||||
* @return Differential pressure (airspeed) in millibar
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_diff_pressure(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 48);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field pressure_alt from hil_sensor message
|
||||
*
|
||||
* @return Altitude calculated from pressure
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_pressure_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 52);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field temperature from hil_sensor message
|
||||
*
|
||||
* @return Temperature in degrees celsius
|
||||
*/
|
||||
static inline float mavlink_msg_hil_sensor_get_temperature(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 56);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field fields_updated from hil_sensor message
|
||||
*
|
||||
* @return Bitmask for fields that have updated since last message, bit 0 = xacc, bit 12: temperature
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_hil_sensor_get_fields_updated(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a hil_sensor message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param hil_sensor C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_hil_sensor_decode(const mavlink_message_t* msg, mavlink_hil_sensor_t* hil_sensor)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
hil_sensor->time_usec = mavlink_msg_hil_sensor_get_time_usec(msg);
|
||||
hil_sensor->xacc = mavlink_msg_hil_sensor_get_xacc(msg);
|
||||
hil_sensor->yacc = mavlink_msg_hil_sensor_get_yacc(msg);
|
||||
hil_sensor->zacc = mavlink_msg_hil_sensor_get_zacc(msg);
|
||||
hil_sensor->xgyro = mavlink_msg_hil_sensor_get_xgyro(msg);
|
||||
hil_sensor->ygyro = mavlink_msg_hil_sensor_get_ygyro(msg);
|
||||
hil_sensor->zgyro = mavlink_msg_hil_sensor_get_zgyro(msg);
|
||||
hil_sensor->xmag = mavlink_msg_hil_sensor_get_xmag(msg);
|
||||
hil_sensor->ymag = mavlink_msg_hil_sensor_get_ymag(msg);
|
||||
hil_sensor->zmag = mavlink_msg_hil_sensor_get_zmag(msg);
|
||||
hil_sensor->abs_pressure = mavlink_msg_hil_sensor_get_abs_pressure(msg);
|
||||
hil_sensor->diff_pressure = mavlink_msg_hil_sensor_get_diff_pressure(msg);
|
||||
hil_sensor->pressure_alt = mavlink_msg_hil_sensor_get_pressure_alt(msg);
|
||||
hil_sensor->temperature = mavlink_msg_hil_sensor_get_temperature(msg);
|
||||
hil_sensor->fields_updated = mavlink_msg_hil_sensor_get_fields_updated(msg);
|
||||
#else
|
||||
memcpy(hil_sensor, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_SENSOR_LEN);
|
||||
#endif
|
||||
}
|
||||
@@ -8,9 +8,9 @@ typedef struct __mavlink_hil_state_t
|
||||
float roll; ///< Roll angle (rad)
|
||||
float pitch; ///< Pitch angle (rad)
|
||||
float yaw; ///< Yaw angle (rad)
|
||||
float rollspeed; ///< Roll angular speed (rad/s)
|
||||
float pitchspeed; ///< Pitch angular speed (rad/s)
|
||||
float yawspeed; ///< Yaw angular speed (rad/s)
|
||||
float rollspeed; ///< Body frame roll / phi angular speed (rad/s)
|
||||
float pitchspeed; ///< Body frame pitch / theta angular speed (rad/s)
|
||||
float yawspeed; ///< Body frame yaw / psi angular speed (rad/s)
|
||||
int32_t lat; ///< Latitude, expressed as * 1E7
|
||||
int32_t lon; ///< Longitude, expressed as * 1E7
|
||||
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
|
||||
@@ -63,9 +63,9 @@ typedef struct __mavlink_hil_state_t
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
* @param yaw Yaw angle (rad)
|
||||
* @param rollspeed Roll angular speed (rad/s)
|
||||
* @param pitchspeed Pitch angular speed (rad/s)
|
||||
* @param yawspeed Yaw angular speed (rad/s)
|
||||
* @param rollspeed Body frame roll / phi angular speed (rad/s)
|
||||
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
|
||||
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
|
||||
@@ -134,15 +134,15 @@ static inline uint16_t mavlink_msg_hil_state_pack(uint8_t system_id, uint8_t com
|
||||
* @brief Pack a hil_state message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
* @param yaw Yaw angle (rad)
|
||||
* @param rollspeed Roll angular speed (rad/s)
|
||||
* @param pitchspeed Pitch angular speed (rad/s)
|
||||
* @param yawspeed Yaw angular speed (rad/s)
|
||||
* @param rollspeed Body frame roll / phi angular speed (rad/s)
|
||||
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
|
||||
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
|
||||
@@ -209,7 +209,7 @@ static inline uint16_t mavlink_msg_hil_state_pack_chan(uint8_t system_id, uint8_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_state struct into a message
|
||||
* @brief Encode a hil_state struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -221,6 +221,20 @@ static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t c
|
||||
return mavlink_msg_hil_state_pack(system_id, component_id, msg, hil_state->time_usec, hil_state->roll, hil_state->pitch, hil_state->yaw, hil_state->rollspeed, hil_state->pitchspeed, hil_state->yawspeed, hil_state->lat, hil_state->lon, hil_state->alt, hil_state->vx, hil_state->vy, hil_state->vz, hil_state->xacc, hil_state->yacc, hil_state->zacc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_state struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_state C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_state_t* hil_state)
|
||||
{
|
||||
return mavlink_msg_hil_state_pack_chan(system_id, component_id, chan, msg, hil_state->time_usec, hil_state->roll, hil_state->pitch, hil_state->yaw, hil_state->rollspeed, hil_state->pitchspeed, hil_state->yawspeed, hil_state->lat, hil_state->lon, hil_state->alt, hil_state->vx, hil_state->vy, hil_state->vz, hil_state->xacc, hil_state->yacc, hil_state->zacc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_state message
|
||||
* @param chan MAVLink channel to send the message
|
||||
@@ -229,9 +243,9 @@ static inline uint16_t mavlink_msg_hil_state_encode(uint8_t system_id, uint8_t c
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
* @param yaw Yaw angle (rad)
|
||||
* @param rollspeed Roll angular speed (rad/s)
|
||||
* @param pitchspeed Pitch angular speed (rad/s)
|
||||
* @param yawspeed Yaw angular speed (rad/s)
|
||||
* @param rollspeed Body frame roll / phi angular speed (rad/s)
|
||||
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
|
||||
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
|
||||
@@ -345,7 +359,7 @@ static inline float mavlink_msg_hil_state_get_yaw(const mavlink_message_t* msg)
|
||||
/**
|
||||
* @brief Get field rollspeed from hil_state message
|
||||
*
|
||||
* @return Roll angular speed (rad/s)
|
||||
* @return Body frame roll / phi angular speed (rad/s)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
@@ -355,7 +369,7 @@ static inline float mavlink_msg_hil_state_get_rollspeed(const mavlink_message_t*
|
||||
/**
|
||||
* @brief Get field pitchspeed from hil_state message
|
||||
*
|
||||
* @return Pitch angular speed (rad/s)
|
||||
* @return Body frame pitch / theta angular speed (rad/s)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
@@ -365,7 +379,7 @@ static inline float mavlink_msg_hil_state_get_pitchspeed(const mavlink_message_t
|
||||
/**
|
||||
* @brief Get field yawspeed from hil_state message
|
||||
*
|
||||
* @return Yaw angular speed (rad/s)
|
||||
* @return Body frame yaw / psi angular speed (rad/s)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_state_get_yawspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,501 @@
|
||||
// MESSAGE HIL_STATE_QUATERNION PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION 115
|
||||
|
||||
typedef struct __mavlink_hil_state_quaternion_t
|
||||
{
|
||||
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
float attitude_quaternion[4]; ///< Vehicle attitude expressed as normalized quaternion
|
||||
float rollspeed; ///< Body frame roll / phi angular speed (rad/s)
|
||||
float pitchspeed; ///< Body frame pitch / theta angular speed (rad/s)
|
||||
float yawspeed; ///< Body frame yaw / psi angular speed (rad/s)
|
||||
int32_t lat; ///< Latitude, expressed as * 1E7
|
||||
int32_t lon; ///< Longitude, expressed as * 1E7
|
||||
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters)
|
||||
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
|
||||
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
int16_t vz; ///< Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
uint16_t ind_airspeed; ///< Indicated airspeed, expressed as m/s * 100
|
||||
uint16_t true_airspeed; ///< True airspeed, expressed as m/s * 100
|
||||
int16_t xacc; ///< X acceleration (mg)
|
||||
int16_t yacc; ///< Y acceleration (mg)
|
||||
int16_t zacc; ///< Z acceleration (mg)
|
||||
} mavlink_hil_state_quaternion_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN 64
|
||||
#define MAVLINK_MSG_ID_115_LEN 64
|
||||
|
||||
#define MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC 4
|
||||
#define MAVLINK_MSG_ID_115_CRC 4
|
||||
|
||||
#define MAVLINK_MSG_HIL_STATE_QUATERNION_FIELD_ATTITUDE_QUATERNION_LEN 4
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_HIL_STATE_QUATERNION { \
|
||||
"HIL_STATE_QUATERNION", \
|
||||
16, \
|
||||
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_hil_state_quaternion_t, time_usec) }, \
|
||||
{ "attitude_quaternion", NULL, MAVLINK_TYPE_FLOAT, 4, 8, offsetof(mavlink_hil_state_quaternion_t, attitude_quaternion) }, \
|
||||
{ "rollspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_hil_state_quaternion_t, rollspeed) }, \
|
||||
{ "pitchspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_hil_state_quaternion_t, pitchspeed) }, \
|
||||
{ "yawspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_hil_state_quaternion_t, yawspeed) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 36, offsetof(mavlink_hil_state_quaternion_t, lat) }, \
|
||||
{ "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 40, offsetof(mavlink_hil_state_quaternion_t, lon) }, \
|
||||
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 44, offsetof(mavlink_hil_state_quaternion_t, alt) }, \
|
||||
{ "vx", NULL, MAVLINK_TYPE_INT16_T, 0, 48, offsetof(mavlink_hil_state_quaternion_t, vx) }, \
|
||||
{ "vy", NULL, MAVLINK_TYPE_INT16_T, 0, 50, offsetof(mavlink_hil_state_quaternion_t, vy) }, \
|
||||
{ "vz", NULL, MAVLINK_TYPE_INT16_T, 0, 52, offsetof(mavlink_hil_state_quaternion_t, vz) }, \
|
||||
{ "ind_airspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 54, offsetof(mavlink_hil_state_quaternion_t, ind_airspeed) }, \
|
||||
{ "true_airspeed", NULL, MAVLINK_TYPE_UINT16_T, 0, 56, offsetof(mavlink_hil_state_quaternion_t, true_airspeed) }, \
|
||||
{ "xacc", NULL, MAVLINK_TYPE_INT16_T, 0, 58, offsetof(mavlink_hil_state_quaternion_t, xacc) }, \
|
||||
{ "yacc", NULL, MAVLINK_TYPE_INT16_T, 0, 60, offsetof(mavlink_hil_state_quaternion_t, yacc) }, \
|
||||
{ "zacc", NULL, MAVLINK_TYPE_INT16_T, 0, 62, offsetof(mavlink_hil_state_quaternion_t, zacc) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_state_quaternion message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param attitude_quaternion Vehicle attitude expressed as normalized quaternion
|
||||
* @param rollspeed Body frame roll / phi angular speed (rad/s)
|
||||
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
|
||||
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
* @param ind_airspeed Indicated airspeed, expressed as m/s * 100
|
||||
* @param true_airspeed True airspeed, expressed as m/s * 100
|
||||
* @param xacc X acceleration (mg)
|
||||
* @param yacc Y acceleration (mg)
|
||||
* @param zacc Z acceleration (mg)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t time_usec, const float *attitude_quaternion, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 24, rollspeed);
|
||||
_mav_put_float(buf, 28, pitchspeed);
|
||||
_mav_put_float(buf, 32, yawspeed);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lon);
|
||||
_mav_put_int32_t(buf, 44, alt);
|
||||
_mav_put_int16_t(buf, 48, vx);
|
||||
_mav_put_int16_t(buf, 50, vy);
|
||||
_mav_put_int16_t(buf, 52, vz);
|
||||
_mav_put_uint16_t(buf, 54, ind_airspeed);
|
||||
_mav_put_uint16_t(buf, 56, true_airspeed);
|
||||
_mav_put_int16_t(buf, 58, xacc);
|
||||
_mav_put_int16_t(buf, 60, yacc);
|
||||
_mav_put_int16_t(buf, 62, zacc);
|
||||
_mav_put_float_array(buf, 8, attitude_quaternion, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#else
|
||||
mavlink_hil_state_quaternion_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.rollspeed = rollspeed;
|
||||
packet.pitchspeed = pitchspeed;
|
||||
packet.yawspeed = yawspeed;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
packet.ind_airspeed = ind_airspeed;
|
||||
packet.true_airspeed = true_airspeed;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
mav_array_memcpy(packet.attitude_quaternion, attitude_quaternion, sizeof(float)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_STATE_QUATERNION;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a hil_state_quaternion message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param attitude_quaternion Vehicle attitude expressed as normalized quaternion
|
||||
* @param rollspeed Body frame roll / phi angular speed (rad/s)
|
||||
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
|
||||
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
* @param ind_airspeed Indicated airspeed, expressed as m/s * 100
|
||||
* @param true_airspeed True airspeed, expressed as m/s * 100
|
||||
* @param xacc X acceleration (mg)
|
||||
* @param yacc Y acceleration (mg)
|
||||
* @param zacc Z acceleration (mg)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t time_usec,const float *attitude_quaternion,float rollspeed,float pitchspeed,float yawspeed,int32_t lat,int32_t lon,int32_t alt,int16_t vx,int16_t vy,int16_t vz,uint16_t ind_airspeed,uint16_t true_airspeed,int16_t xacc,int16_t yacc,int16_t zacc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 24, rollspeed);
|
||||
_mav_put_float(buf, 28, pitchspeed);
|
||||
_mav_put_float(buf, 32, yawspeed);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lon);
|
||||
_mav_put_int32_t(buf, 44, alt);
|
||||
_mav_put_int16_t(buf, 48, vx);
|
||||
_mav_put_int16_t(buf, 50, vy);
|
||||
_mav_put_int16_t(buf, 52, vz);
|
||||
_mav_put_uint16_t(buf, 54, ind_airspeed);
|
||||
_mav_put_uint16_t(buf, 56, true_airspeed);
|
||||
_mav_put_int16_t(buf, 58, xacc);
|
||||
_mav_put_int16_t(buf, 60, yacc);
|
||||
_mav_put_int16_t(buf, 62, zacc);
|
||||
_mav_put_float_array(buf, 8, attitude_quaternion, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#else
|
||||
mavlink_hil_state_quaternion_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.rollspeed = rollspeed;
|
||||
packet.pitchspeed = pitchspeed;
|
||||
packet.yawspeed = yawspeed;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
packet.ind_airspeed = ind_airspeed;
|
||||
packet.true_airspeed = true_airspeed;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
mav_array_memcpy(packet.attitude_quaternion, attitude_quaternion, sizeof(float)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HIL_STATE_QUATERNION;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_state_quaternion struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_state_quaternion C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_hil_state_quaternion_t* hil_state_quaternion)
|
||||
{
|
||||
return mavlink_msg_hil_state_quaternion_pack(system_id, component_id, msg, hil_state_quaternion->time_usec, hil_state_quaternion->attitude_quaternion, hil_state_quaternion->rollspeed, hil_state_quaternion->pitchspeed, hil_state_quaternion->yawspeed, hil_state_quaternion->lat, hil_state_quaternion->lon, hil_state_quaternion->alt, hil_state_quaternion->vx, hil_state_quaternion->vy, hil_state_quaternion->vz, hil_state_quaternion->ind_airspeed, hil_state_quaternion->true_airspeed, hil_state_quaternion->xacc, hil_state_quaternion->yacc, hil_state_quaternion->zacc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hil_state_quaternion struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hil_state_quaternion C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_hil_state_quaternion_t* hil_state_quaternion)
|
||||
{
|
||||
return mavlink_msg_hil_state_quaternion_pack_chan(system_id, component_id, chan, msg, hil_state_quaternion->time_usec, hil_state_quaternion->attitude_quaternion, hil_state_quaternion->rollspeed, hil_state_quaternion->pitchspeed, hil_state_quaternion->yawspeed, hil_state_quaternion->lat, hil_state_quaternion->lon, hil_state_quaternion->alt, hil_state_quaternion->vx, hil_state_quaternion->vy, hil_state_quaternion->vz, hil_state_quaternion->ind_airspeed, hil_state_quaternion->true_airspeed, hil_state_quaternion->xacc, hil_state_quaternion->yacc, hil_state_quaternion->zacc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hil_state_quaternion message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time_usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param attitude_quaternion Vehicle attitude expressed as normalized quaternion
|
||||
* @param rollspeed Body frame roll / phi angular speed (rad/s)
|
||||
* @param pitchspeed Body frame pitch / theta angular speed (rad/s)
|
||||
* @param yawspeed Body frame yaw / psi angular speed (rad/s)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters)
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
* @param vz Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
* @param ind_airspeed Indicated airspeed, expressed as m/s * 100
|
||||
* @param true_airspeed True airspeed, expressed as m/s * 100
|
||||
* @param xacc X acceleration (mg)
|
||||
* @param yacc Y acceleration (mg)
|
||||
* @param zacc Z acceleration (mg)
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_hil_state_quaternion_send(mavlink_channel_t chan, uint64_t time_usec, const float *attitude_quaternion, float rollspeed, float pitchspeed, float yawspeed, int32_t lat, int32_t lon, int32_t alt, int16_t vx, int16_t vy, int16_t vz, uint16_t ind_airspeed, uint16_t true_airspeed, int16_t xacc, int16_t yacc, int16_t zacc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 24, rollspeed);
|
||||
_mav_put_float(buf, 28, pitchspeed);
|
||||
_mav_put_float(buf, 32, yawspeed);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lon);
|
||||
_mav_put_int32_t(buf, 44, alt);
|
||||
_mav_put_int16_t(buf, 48, vx);
|
||||
_mav_put_int16_t(buf, 50, vy);
|
||||
_mav_put_int16_t(buf, 52, vz);
|
||||
_mav_put_uint16_t(buf, 54, ind_airspeed);
|
||||
_mav_put_uint16_t(buf, 56, true_airspeed);
|
||||
_mav_put_int16_t(buf, 58, xacc);
|
||||
_mav_put_int16_t(buf, 60, yacc);
|
||||
_mav_put_int16_t(buf, 62, zacc);
|
||||
_mav_put_float_array(buf, 8, attitude_quaternion, 4);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, buf, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_hil_state_quaternion_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.rollspeed = rollspeed;
|
||||
packet.pitchspeed = pitchspeed;
|
||||
packet.yawspeed = yawspeed;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
packet.ind_airspeed = ind_airspeed;
|
||||
packet.true_airspeed = true_airspeed;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
mav_array_memcpy(packet.attitude_quaternion, attitude_quaternion, sizeof(float)*4);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, (const char *)&packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_STATE_QUATERNION, (const char *)&packet, MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE HIL_STATE_QUATERNION UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field time_usec from hil_state_quaternion message
|
||||
*
|
||||
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_hil_state_quaternion_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field attitude_quaternion from hil_state_quaternion message
|
||||
*
|
||||
* @return Vehicle attitude expressed as normalized quaternion
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_get_attitude_quaternion(const mavlink_message_t* msg, float *attitude_quaternion)
|
||||
{
|
||||
return _MAV_RETURN_float_array(msg, attitude_quaternion, 4, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field rollspeed from hil_state_quaternion message
|
||||
*
|
||||
* @return Body frame roll / phi angular speed (rad/s)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_state_quaternion_get_rollspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field pitchspeed from hil_state_quaternion message
|
||||
*
|
||||
* @return Body frame pitch / theta angular speed (rad/s)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_state_quaternion_get_pitchspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field yawspeed from hil_state_quaternion message
|
||||
*
|
||||
* @return Body frame yaw / psi angular speed (rad/s)
|
||||
*/
|
||||
static inline float mavlink_msg_hil_state_quaternion_get_yawspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lat from hil_state_quaternion message
|
||||
*
|
||||
* @return Latitude, expressed as * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_state_quaternion_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lon from hil_state_quaternion message
|
||||
*
|
||||
* @return Longitude, expressed as * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_state_quaternion_get_lon(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 40);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field alt from hil_state_quaternion message
|
||||
*
|
||||
* @return Altitude in meters, expressed as * 1000 (millimeters)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_state_quaternion_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 44);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vx from hil_state_quaternion message
|
||||
*
|
||||
* @return Ground X Speed (Latitude), expressed as m/s * 100
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_state_quaternion_get_vx(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 48);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vy from hil_state_quaternion message
|
||||
*
|
||||
* @return Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_state_quaternion_get_vy(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 50);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vz from hil_state_quaternion message
|
||||
*
|
||||
* @return Ground Z Speed (Altitude), expressed as m/s * 100
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_state_quaternion_get_vz(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 52);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field ind_airspeed from hil_state_quaternion message
|
||||
*
|
||||
* @return Indicated airspeed, expressed as m/s * 100
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_get_ind_airspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 54);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field true_airspeed from hil_state_quaternion message
|
||||
*
|
||||
* @return True airspeed, expressed as m/s * 100
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hil_state_quaternion_get_true_airspeed(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 56);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field xacc from hil_state_quaternion message
|
||||
*
|
||||
* @return X acceleration (mg)
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_state_quaternion_get_xacc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 58);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field yacc from hil_state_quaternion message
|
||||
*
|
||||
* @return Y acceleration (mg)
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_state_quaternion_get_yacc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field zacc from hil_state_quaternion message
|
||||
*
|
||||
* @return Z acceleration (mg)
|
||||
*/
|
||||
static inline int16_t mavlink_msg_hil_state_quaternion_get_zacc(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 62);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a hil_state_quaternion message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param hil_state_quaternion C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_hil_state_quaternion_decode(const mavlink_message_t* msg, mavlink_hil_state_quaternion_t* hil_state_quaternion)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
hil_state_quaternion->time_usec = mavlink_msg_hil_state_quaternion_get_time_usec(msg);
|
||||
mavlink_msg_hil_state_quaternion_get_attitude_quaternion(msg, hil_state_quaternion->attitude_quaternion);
|
||||
hil_state_quaternion->rollspeed = mavlink_msg_hil_state_quaternion_get_rollspeed(msg);
|
||||
hil_state_quaternion->pitchspeed = mavlink_msg_hil_state_quaternion_get_pitchspeed(msg);
|
||||
hil_state_quaternion->yawspeed = mavlink_msg_hil_state_quaternion_get_yawspeed(msg);
|
||||
hil_state_quaternion->lat = mavlink_msg_hil_state_quaternion_get_lat(msg);
|
||||
hil_state_quaternion->lon = mavlink_msg_hil_state_quaternion_get_lon(msg);
|
||||
hil_state_quaternion->alt = mavlink_msg_hil_state_quaternion_get_alt(msg);
|
||||
hil_state_quaternion->vx = mavlink_msg_hil_state_quaternion_get_vx(msg);
|
||||
hil_state_quaternion->vy = mavlink_msg_hil_state_quaternion_get_vy(msg);
|
||||
hil_state_quaternion->vz = mavlink_msg_hil_state_quaternion_get_vz(msg);
|
||||
hil_state_quaternion->ind_airspeed = mavlink_msg_hil_state_quaternion_get_ind_airspeed(msg);
|
||||
hil_state_quaternion->true_airspeed = mavlink_msg_hil_state_quaternion_get_true_airspeed(msg);
|
||||
hil_state_quaternion->xacc = mavlink_msg_hil_state_quaternion_get_xacc(msg);
|
||||
hil_state_quaternion->yacc = mavlink_msg_hil_state_quaternion_get_yacc(msg);
|
||||
hil_state_quaternion->zacc = mavlink_msg_hil_state_quaternion_get_zacc(msg);
|
||||
#else
|
||||
memcpy(hil_state_quaternion, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_HIL_STATE_QUATERNION_LEN);
|
||||
#endif
|
||||
}
|
||||
@@ -1,276 +0,0 @@
|
||||
// MESSAGE LOCAL_POSITION PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOCAL_POSITION 31
|
||||
|
||||
typedef struct __mavlink_local_position_t
|
||||
{
|
||||
uint64_t usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
float x; ///< X Position
|
||||
float y; ///< Y Position
|
||||
float z; ///< Z Position
|
||||
float vx; ///< X Speed
|
||||
float vy; ///< Y Speed
|
||||
float vz; ///< Z Speed
|
||||
} mavlink_local_position_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_LOCAL_POSITION_LEN 32
|
||||
#define MAVLINK_MSG_ID_31_LEN 32
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION { \
|
||||
"LOCAL_POSITION", \
|
||||
7, \
|
||||
{ { "usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_local_position_t, usec) }, \
|
||||
{ "x", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_t, x) }, \
|
||||
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_t, y) }, \
|
||||
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_local_position_t, z) }, \
|
||||
{ "vx", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_local_position_t, vx) }, \
|
||||
{ "vy", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_local_position_t, vy) }, \
|
||||
{ "vz", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_local_position_t, vz) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a local_position message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param x X Position
|
||||
* @param y Y Position
|
||||
* @param z Z Position
|
||||
* @param vx X Speed
|
||||
* @param vy Y Speed
|
||||
* @param vz Z Speed
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t usec, float x, float y, float z, float vx, float vy, float vz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[32];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, x);
|
||||
_mav_put_float(buf, 12, y);
|
||||
_mav_put_float(buf, 16, z);
|
||||
_mav_put_float(buf, 20, vx);
|
||||
_mav_put_float(buf, 24, vy);
|
||||
_mav_put_float(buf, 28, vz);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 32);
|
||||
#else
|
||||
mavlink_local_position_t packet;
|
||||
packet.usec = usec;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 32);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 32, 126);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a local_position message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param x X Position
|
||||
* @param y Y Position
|
||||
* @param z Z Position
|
||||
* @param vx X Speed
|
||||
* @param vy Y Speed
|
||||
* @param vz Z Speed
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t usec,float x,float y,float z,float vx,float vy,float vz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[32];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, x);
|
||||
_mav_put_float(buf, 12, y);
|
||||
_mav_put_float(buf, 16, z);
|
||||
_mav_put_float(buf, 20, vx);
|
||||
_mav_put_float(buf, 24, vy);
|
||||
_mav_put_float(buf, 28, vz);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 32);
|
||||
#else
|
||||
mavlink_local_position_t packet;
|
||||
packet.usec = usec;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 32);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 32, 126);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param local_position C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_position_t* local_position)
|
||||
{
|
||||
return mavlink_msg_local_position_pack(system_id, component_id, msg, local_position->usec, local_position->x, local_position->y, local_position->z, local_position->vx, local_position->vy, local_position->vz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a local_position message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param usec Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
* @param x X Position
|
||||
* @param y Y Position
|
||||
* @param z Z Position
|
||||
* @param vx X Speed
|
||||
* @param vy Y Speed
|
||||
* @param vz Z Speed
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_local_position_send(mavlink_channel_t chan, uint64_t usec, float x, float y, float z, float vx, float vy, float vz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[32];
|
||||
_mav_put_uint64_t(buf, 0, usec);
|
||||
_mav_put_float(buf, 8, x);
|
||||
_mav_put_float(buf, 12, y);
|
||||
_mav_put_float(buf, 16, z);
|
||||
_mav_put_float(buf, 20, vx);
|
||||
_mav_put_float(buf, 24, vy);
|
||||
_mav_put_float(buf, 28, vz);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION, buf, 32, 126);
|
||||
#else
|
||||
mavlink_local_position_t packet;
|
||||
packet.usec = usec;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION, (const char *)&packet, 32, 126);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE LOCAL_POSITION UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field usec from local_position message
|
||||
*
|
||||
* @return Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_local_position_get_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field x from local_position message
|
||||
*
|
||||
* @return X Position
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_get_x(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field y from local_position message
|
||||
*
|
||||
* @return Y Position
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_get_y(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field z from local_position message
|
||||
*
|
||||
* @return Z Position
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_get_z(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vx from local_position message
|
||||
*
|
||||
* @return X Speed
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_get_vx(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vy from local_position message
|
||||
*
|
||||
* @return Y Speed
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_get_vy(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vz from local_position message
|
||||
*
|
||||
* @return Z Speed
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_get_vz(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a local_position message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param local_position C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_local_position_decode(const mavlink_message_t* msg, mavlink_local_position_t* local_position)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
local_position->usec = mavlink_msg_local_position_get_usec(msg);
|
||||
local_position->x = mavlink_msg_local_position_get_x(msg);
|
||||
local_position->y = mavlink_msg_local_position_get_y(msg);
|
||||
local_position->z = mavlink_msg_local_position_get_z(msg);
|
||||
local_position->vx = mavlink_msg_local_position_get_vx(msg);
|
||||
local_position->vy = mavlink_msg_local_position_get_vy(msg);
|
||||
local_position->vz = mavlink_msg_local_position_get_vz(msg);
|
||||
#else
|
||||
memcpy(local_position, _MAV_PAYLOAD(msg), 32);
|
||||
#endif
|
||||
}
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_local_position_ned_pack(uint8_t system_id, ui
|
||||
* @brief Pack a local_position_ned message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param x X Position
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_local_position_ned_pack_chan(uint8_t system_i
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_ned struct into a message
|
||||
* @brief Encode a local_position_ned struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_local_position_ned_encode(uint8_t system_id,
|
||||
return mavlink_msg_local_position_ned_pack(system_id, component_id, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_ned struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param local_position_ned C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_ned_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_local_position_ned_t* local_position_ned)
|
||||
{
|
||||
return mavlink_msg_local_position_ned_pack_chan(system_id, component_id, chan, msg, local_position_ned->time_boot_ms, local_position_ned->x, local_position_ned->y, local_position_ned->z, local_position_ned->vx, local_position_ned->vy, local_position_ned->vz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a local_position_ned message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
+16
-2
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack(
|
||||
* @brief Pack a local_position_ned_system_global_offset message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param x X Position
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_pack_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_ned_system_global_offset struct into a message
|
||||
* @brief Encode a local_position_ned_system_global_offset struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_encod
|
||||
return mavlink_msg_local_position_ned_system_global_offset_pack(system_id, component_id, msg, local_position_ned_system_global_offset->time_boot_ms, local_position_ned_system_global_offset->x, local_position_ned_system_global_offset->y, local_position_ned_system_global_offset->z, local_position_ned_system_global_offset->roll, local_position_ned_system_global_offset->pitch, local_position_ned_system_global_offset->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_ned_system_global_offset struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param local_position_ned_system_global_offset C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_ned_system_global_offset_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_local_position_ned_system_global_offset_t* local_position_ned_system_global_offset)
|
||||
{
|
||||
return mavlink_msg_local_position_ned_system_global_offset_pack_chan(system_id, component_id, chan, msg, local_position_ned_system_global_offset->time_boot_ms, local_position_ned_system_global_offset->x, local_position_ned_system_global_offset->y, local_position_ned_system_global_offset->z, local_position_ned_system_global_offset->roll, local_position_ned_system_global_offset->pitch, local_position_ned_system_global_offset->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a local_position_ned_system_global_offset message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -79,7 +79,7 @@ static inline uint16_t mavlink_msg_local_position_setpoint_pack(uint8_t system_i
|
||||
* @brief Pack a local_position_setpoint message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param coordinate_frame Coordinate frame - valid values are only MAV_FRAME_LOCAL_NED or MAV_FRAME_LOCAL_ENU
|
||||
* @param x x position
|
||||
@@ -121,7 +121,7 @@ static inline uint16_t mavlink_msg_local_position_setpoint_pack_chan(uint8_t sys
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_setpoint struct into a message
|
||||
* @brief Encode a local_position_setpoint struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -133,6 +133,20 @@ static inline uint16_t mavlink_msg_local_position_setpoint_encode(uint8_t system
|
||||
return mavlink_msg_local_position_setpoint_pack(system_id, component_id, msg, local_position_setpoint->coordinate_frame, local_position_setpoint->x, local_position_setpoint->y, local_position_setpoint->z, local_position_setpoint->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_setpoint struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param local_position_setpoint C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_setpoint_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_local_position_setpoint_t* local_position_setpoint)
|
||||
{
|
||||
return mavlink_msg_local_position_setpoint_pack_chan(system_id, component_id, chan, msg, local_position_setpoint->coordinate_frame, local_position_setpoint->x, local_position_setpoint->y, local_position_setpoint->z, local_position_setpoint->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a local_position_setpoint message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,254 +0,0 @@
|
||||
// MESSAGE LOCAL_POSITION_SETPOINT_SET PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_SET 50
|
||||
|
||||
typedef struct __mavlink_local_position_setpoint_set_t
|
||||
{
|
||||
float x; ///< x position
|
||||
float y; ///< y position
|
||||
float z; ///< z position
|
||||
float yaw; ///< Desired yaw angle
|
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_local_position_setpoint_set_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_SET_LEN 18
|
||||
#define MAVLINK_MSG_ID_50_LEN 18
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOCAL_POSITION_SETPOINT_SET { \
|
||||
"LOCAL_POSITION_SETPOINT_SET", \
|
||||
6, \
|
||||
{ { "x", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_local_position_setpoint_set_t, x) }, \
|
||||
{ "y", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_local_position_setpoint_set_t, y) }, \
|
||||
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_local_position_setpoint_set_t, z) }, \
|
||||
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_local_position_setpoint_set_t, yaw) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 16, offsetof(mavlink_local_position_setpoint_set_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 17, offsetof(mavlink_local_position_setpoint_set_t, target_component) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a local_position_setpoint_set message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param x x position
|
||||
* @param y y position
|
||||
* @param z z position
|
||||
* @param yaw Desired yaw angle
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_setpoint_set_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, float x, float y, float z, float yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[18];
|
||||
_mav_put_float(buf, 0, x);
|
||||
_mav_put_float(buf, 4, y);
|
||||
_mav_put_float(buf, 8, z);
|
||||
_mav_put_float(buf, 12, yaw);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 18);
|
||||
#else
|
||||
mavlink_local_position_setpoint_set_t packet;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.yaw = yaw;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 18);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_SET;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 18, 73);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a local_position_setpoint_set message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param x x position
|
||||
* @param y y position
|
||||
* @param z z position
|
||||
* @param yaw Desired yaw angle
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_setpoint_set_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component,float x,float y,float z,float yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[18];
|
||||
_mav_put_float(buf, 0, x);
|
||||
_mav_put_float(buf, 4, y);
|
||||
_mav_put_float(buf, 8, z);
|
||||
_mav_put_float(buf, 12, yaw);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 18);
|
||||
#else
|
||||
mavlink_local_position_setpoint_set_t packet;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.yaw = yaw;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 18);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_SET;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 18, 73);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a local_position_setpoint_set struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param local_position_setpoint_set C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_local_position_setpoint_set_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_local_position_setpoint_set_t* local_position_setpoint_set)
|
||||
{
|
||||
return mavlink_msg_local_position_setpoint_set_pack(system_id, component_id, msg, local_position_setpoint_set->target_system, local_position_setpoint_set->target_component, local_position_setpoint_set->x, local_position_setpoint_set->y, local_position_setpoint_set->z, local_position_setpoint_set->yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a local_position_setpoint_set message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param x x position
|
||||
* @param y y position
|
||||
* @param z z position
|
||||
* @param yaw Desired yaw angle
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_local_position_setpoint_set_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, float x, float y, float z, float yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[18];
|
||||
_mav_put_float(buf, 0, x);
|
||||
_mav_put_float(buf, 4, y);
|
||||
_mav_put_float(buf, 8, z);
|
||||
_mav_put_float(buf, 12, yaw);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_SET, buf, 18, 73);
|
||||
#else
|
||||
mavlink_local_position_setpoint_set_t packet;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.yaw = yaw;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOCAL_POSITION_SETPOINT_SET, (const char *)&packet, 18, 73);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE LOCAL_POSITION_SETPOINT_SET UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from local_position_setpoint_set message
|
||||
*
|
||||
* @return System ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_local_position_setpoint_set_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from local_position_setpoint_set message
|
||||
*
|
||||
* @return Component ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_local_position_setpoint_set_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 17);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field x from local_position_setpoint_set message
|
||||
*
|
||||
* @return x position
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_setpoint_set_get_x(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field y from local_position_setpoint_set message
|
||||
*
|
||||
* @return y position
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_setpoint_set_get_y(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field z from local_position_setpoint_set message
|
||||
*
|
||||
* @return z position
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_setpoint_set_get_z(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field yaw from local_position_setpoint_set message
|
||||
*
|
||||
* @return Desired yaw angle
|
||||
*/
|
||||
static inline float mavlink_msg_local_position_setpoint_set_get_yaw(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a local_position_setpoint_set message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param local_position_setpoint_set C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_local_position_setpoint_set_decode(const mavlink_message_t* msg, mavlink_local_position_setpoint_set_t* local_position_setpoint_set)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
local_position_setpoint_set->x = mavlink_msg_local_position_setpoint_set_get_x(msg);
|
||||
local_position_setpoint_set->y = mavlink_msg_local_position_setpoint_set_get_y(msg);
|
||||
local_position_setpoint_set->z = mavlink_msg_local_position_setpoint_set_get_z(msg);
|
||||
local_position_setpoint_set->yaw = mavlink_msg_local_position_setpoint_set_get_yaw(msg);
|
||||
local_position_setpoint_set->target_system = mavlink_msg_local_position_setpoint_set_get_target_system(msg);
|
||||
local_position_setpoint_set->target_component = mavlink_msg_local_position_setpoint_set_get_target_component(msg);
|
||||
#else
|
||||
memcpy(local_position_setpoint_set, _MAV_PAYLOAD(msg), 18);
|
||||
#endif
|
||||
}
|
||||
@@ -84,7 +84,7 @@ static inline uint16_t mavlink_msg_manual_control_pack(uint8_t system_id, uint8_
|
||||
* @brief Pack a manual_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target The system to be controlled.
|
||||
* @param x X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle.
|
||||
@@ -129,7 +129,7 @@ static inline uint16_t mavlink_msg_manual_control_pack_chan(uint8_t system_id, u
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a manual_control struct into a message
|
||||
* @brief Encode a manual_control struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -141,6 +141,20 @@ static inline uint16_t mavlink_msg_manual_control_encode(uint8_t system_id, uint
|
||||
return mavlink_msg_manual_control_pack(system_id, component_id, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a manual_control struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param manual_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_manual_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_manual_control_t* manual_control)
|
||||
{
|
||||
return mavlink_msg_manual_control_pack_chan(system_id, component_id, chan, msg, manual_control->target, manual_control->x, manual_control->y, manual_control->z, manual_control->r, manual_control->buttons);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a manual_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a manual_setpoint message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp in milliseconds since system boot
|
||||
* @param roll Desired roll rate in radians per second
|
||||
@@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_manual_setpoint_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a manual_setpoint struct into a message
|
||||
* @brief Encode a manual_setpoint struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -149,6 +149,20 @@ static inline uint16_t mavlink_msg_manual_setpoint_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_manual_setpoint_pack(system_id, component_id, msg, manual_setpoint->time_boot_ms, manual_setpoint->roll, manual_setpoint->pitch, manual_setpoint->yaw, manual_setpoint->thrust, manual_setpoint->mode_switch, manual_setpoint->manual_override_switch);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a manual_setpoint struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param manual_setpoint C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_manual_setpoint_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_manual_setpoint_t* manual_setpoint)
|
||||
{
|
||||
return mavlink_msg_manual_setpoint_pack_chan(system_id, component_id, chan, msg, manual_setpoint->time_boot_ms, manual_setpoint->roll, manual_setpoint->pitch, manual_setpoint->yaw, manual_setpoint->thrust, manual_setpoint->mode_switch, manual_setpoint->manual_override_switch);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a manual_setpoint message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -72,7 +72,7 @@ static inline uint16_t mavlink_msg_memory_vect_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a memory_vect message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param address Starting address of the debug variables
|
||||
* @param ver Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_memory_vect_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a memory_vect struct into a message
|
||||
* @brief Encode a memory_vect struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -121,6 +121,20 @@ static inline uint16_t mavlink_msg_memory_vect_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_memory_vect_pack(system_id, component_id, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a memory_vect struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param memory_vect C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_memory_vect_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_memory_vect_t* memory_vect)
|
||||
{
|
||||
return mavlink_msg_memory_vect_pack_chan(system_id, component_id, chan, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a memory_vect message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t c
|
||||
* @brief Pack a mission_ack message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_ack struct into a message
|
||||
* @brief Encode a mission_ack struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_mission_ack_pack(system_id, component_id, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_ack struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_ack C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_ack_t* mission_ack)
|
||||
{
|
||||
return mavlink_msg_mission_ack_pack_chan(system_id, component_id, chan, msg, mission_ack->target_system, mission_ack->target_component, mission_ack->type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_ack message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_mission_clear_all_pack(uint8_t system_id, uin
|
||||
* @brief Pack a mission_clear_all message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_mission_clear_all_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_clear_all struct into a message
|
||||
* @brief Encode a mission_clear_all struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_mission_clear_all_encode(uint8_t system_id, u
|
||||
return mavlink_msg_mission_clear_all_pack(system_id, component_id, msg, mission_clear_all->target_system, mission_clear_all->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_clear_all struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_clear_all C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_clear_all_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_clear_all_t* mission_clear_all)
|
||||
{
|
||||
return mavlink_msg_mission_clear_all_pack_chan(system_id, component_id, chan, msg, mission_clear_all->target_system, mission_clear_all->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_clear_all message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_mission_count_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a mission_count message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_mission_count_pack_chan(uint8_t system_id, ui
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_count struct into a message
|
||||
* @brief Encode a mission_count struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_mission_count_encode(uint8_t system_id, uint8
|
||||
return mavlink_msg_mission_count_pack(system_id, component_id, msg, mission_count->target_system, mission_count->target_component, mission_count->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_count struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_count C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_count_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_count_t* mission_count)
|
||||
{
|
||||
return mavlink_msg_mission_count_pack_chan(system_id, component_id, chan, msg, mission_count->target_system, mission_count->target_component, mission_count->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_count message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -59,7 +59,7 @@ static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a mission_current message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param seq Sequence
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_current struct into a message
|
||||
* @brief Encode a mission_current struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -101,6 +101,20 @@ static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_mission_current_pack(system_id, component_id, msg, mission_current->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_current struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_current C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_current_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current)
|
||||
{
|
||||
return mavlink_msg_mission_current_pack_chan(system_id, component_id, chan, msg, mission_current->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_current message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -124,7 +124,7 @@ static inline uint16_t mavlink_msg_mission_item_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a mission_item message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -193,7 +193,7 @@ static inline uint16_t mavlink_msg_mission_item_pack_chan(uint8_t system_id, uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_item struct into a message
|
||||
* @brief Encode a mission_item struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -205,6 +205,20 @@ static inline uint16_t mavlink_msg_mission_item_encode(uint8_t system_id, uint8_
|
||||
return mavlink_msg_mission_item_pack(system_id, component_id, msg, mission_item->target_system, mission_item->target_component, mission_item->seq, mission_item->frame, mission_item->command, mission_item->current, mission_item->autocontinue, mission_item->param1, mission_item->param2, mission_item->param3, mission_item->param4, mission_item->x, mission_item->y, mission_item->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_item struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_item C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_item_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_item_t* mission_item)
|
||||
{
|
||||
return mavlink_msg_mission_item_pack_chan(system_id, component_id, chan, msg, mission_item->target_system, mission_item->target_component, mission_item->seq, mission_item->frame, mission_item->command, mission_item->current, mission_item->autocontinue, mission_item->param1, mission_item->param2, mission_item->param3, mission_item->param4, mission_item->x, mission_item->y, mission_item->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_item message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -59,7 +59,7 @@ static inline uint16_t mavlink_msg_mission_item_reached_pack(uint8_t system_id,
|
||||
* @brief Pack a mission_item_reached message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param seq Sequence
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
@@ -89,7 +89,7 @@ static inline uint16_t mavlink_msg_mission_item_reached_pack_chan(uint8_t system
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_item_reached struct into a message
|
||||
* @brief Encode a mission_item_reached struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -101,6 +101,20 @@ static inline uint16_t mavlink_msg_mission_item_reached_encode(uint8_t system_id
|
||||
return mavlink_msg_mission_item_reached_pack(system_id, component_id, msg, mission_item_reached->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_item_reached struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_item_reached C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_item_reached_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_item_reached_t* mission_item_reached)
|
||||
{
|
||||
return mavlink_msg_mission_item_reached_pack_chan(system_id, component_id, chan, msg, mission_item_reached->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_item_reached message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_mission_request_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a mission_request message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_mission_request_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_request struct into a message
|
||||
* @brief Encode a mission_request struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_mission_request_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_mission_request_pack(system_id, component_id, msg, mission_request->target_system, mission_request->target_component, mission_request->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_request struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_request C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_request_t* mission_request)
|
||||
{
|
||||
return mavlink_msg_mission_request_pack_chan(system_id, component_id, chan, msg, mission_request->target_system, mission_request->target_component, mission_request->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_request message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_mission_request_list_pack(uint8_t system_id,
|
||||
* @brief Pack a mission_request_list message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_mission_request_list_pack_chan(uint8_t system
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_request_list struct into a message
|
||||
* @brief Encode a mission_request_list struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_mission_request_list_encode(uint8_t system_id
|
||||
return mavlink_msg_mission_request_list_pack(system_id, component_id, msg, mission_request_list->target_system, mission_request_list->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_request_list struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_request_list C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_request_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_request_list_t* mission_request_list)
|
||||
{
|
||||
return mavlink_msg_mission_request_list_pack_chan(system_id, component_id, chan, msg, mission_request_list->target_system, mission_request_list->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_request_list message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -74,7 +74,7 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_pack(uint8_t sys
|
||||
* @brief Pack a mission_request_partial_list message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -113,7 +113,7 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_pack_chan(uint8_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_request_partial_list struct into a message
|
||||
* @brief Encode a mission_request_partial_list struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -125,6 +125,20 @@ static inline uint16_t mavlink_msg_mission_request_partial_list_encode(uint8_t s
|
||||
return mavlink_msg_mission_request_partial_list_pack(system_id, component_id, msg, mission_request_partial_list->target_system, mission_request_partial_list->target_component, mission_request_partial_list->start_index, mission_request_partial_list->end_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_request_partial_list struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_request_partial_list C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_request_partial_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_request_partial_list_t* mission_request_partial_list)
|
||||
{
|
||||
return mavlink_msg_mission_request_partial_list_pack_chan(system_id, component_id, chan, msg, mission_request_partial_list->target_system, mission_request_partial_list->target_component, mission_request_partial_list->start_index, mission_request_partial_list->end_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_request_partial_list message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline uint16_t mavlink_msg_mission_set_current_pack(uint8_t system_id, u
|
||||
* @brief Pack a mission_set_current message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -105,7 +105,7 @@ static inline uint16_t mavlink_msg_mission_set_current_pack_chan(uint8_t system_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_set_current struct into a message
|
||||
* @brief Encode a mission_set_current struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -117,6 +117,20 @@ static inline uint16_t mavlink_msg_mission_set_current_encode(uint8_t system_id,
|
||||
return mavlink_msg_mission_set_current_pack(system_id, component_id, msg, mission_set_current->target_system, mission_set_current->target_component, mission_set_current->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_set_current struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_set_current C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_set_current_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_set_current_t* mission_set_current)
|
||||
{
|
||||
return mavlink_msg_mission_set_current_pack_chan(system_id, component_id, chan, msg, mission_set_current->target_system, mission_set_current->target_component, mission_set_current->seq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_set_current message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -74,7 +74,7 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_pack(uint8_t syste
|
||||
* @brief Pack a mission_write_partial_list message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -113,7 +113,7 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_pack_chan(uint8_t
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_write_partial_list struct into a message
|
||||
* @brief Encode a mission_write_partial_list struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -125,6 +125,20 @@ static inline uint16_t mavlink_msg_mission_write_partial_list_encode(uint8_t sys
|
||||
return mavlink_msg_mission_write_partial_list_pack(system_id, component_id, msg, mission_write_partial_list->target_system, mission_write_partial_list->target_component, mission_write_partial_list->start_index, mission_write_partial_list->end_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mission_write_partial_list struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mission_write_partial_list C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mission_write_partial_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_write_partial_list_t* mission_write_partial_list)
|
||||
{
|
||||
return mavlink_msg_mission_write_partial_list_pack_chan(system_id, component_id, chan, msg, mission_write_partial_list->target_system, mission_write_partial_list->target_component, mission_write_partial_list->start_index, mission_write_partial_list->end_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mission_write_partial_list message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_named_value_float_pack(uint8_t system_id, uin
|
||||
* @brief Pack a named_value_float message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param name Name of the debug variable
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_named_value_float_pack_chan(uint8_t system_id
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a named_value_float struct into a message
|
||||
* @brief Encode a named_value_float struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_named_value_float_encode(uint8_t system_id, u
|
||||
return mavlink_msg_named_value_float_pack(system_id, component_id, msg, named_value_float->time_boot_ms, named_value_float->name, named_value_float->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a named_value_float struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param named_value_float C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_named_value_float_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_named_value_float_t* named_value_float)
|
||||
{
|
||||
return mavlink_msg_named_value_float_pack_chan(system_id, component_id, chan, msg, named_value_float->time_boot_ms, named_value_float->name, named_value_float->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a named_value_float message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -67,7 +67,7 @@ static inline uint16_t mavlink_msg_named_value_int_pack(uint8_t system_id, uint8
|
||||
* @brief Pack a named_value_int message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param name Name of the debug variable
|
||||
@@ -101,7 +101,7 @@ static inline uint16_t mavlink_msg_named_value_int_pack_chan(uint8_t system_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a named_value_int struct into a message
|
||||
* @brief Encode a named_value_int struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -113,6 +113,20 @@ static inline uint16_t mavlink_msg_named_value_int_encode(uint8_t system_id, uin
|
||||
return mavlink_msg_named_value_int_pack(system_id, component_id, msg, named_value_int->time_boot_ms, named_value_int->name, named_value_int->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a named_value_int struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param named_value_int C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_named_value_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_named_value_int_t* named_value_int)
|
||||
{
|
||||
return mavlink_msg_named_value_int_pack_chan(system_id, component_id, chan, msg, named_value_int->time_boot_ms, named_value_int->name, named_value_int->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a named_value_int message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -94,7 +94,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack(uint8_t system_id,
|
||||
* @brief Pack a nav_controller_output message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param nav_roll Current desired roll in degrees
|
||||
* @param nav_pitch Current desired pitch in degrees
|
||||
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_nav_controller_output_pack_chan(uint8_t syste
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a nav_controller_output struct into a message
|
||||
* @brief Encode a nav_controller_output struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -157,6 +157,20 @@ static inline uint16_t mavlink_msg_nav_controller_output_encode(uint8_t system_i
|
||||
return mavlink_msg_nav_controller_output_pack(system_id, component_id, msg, nav_controller_output->nav_roll, nav_controller_output->nav_pitch, nav_controller_output->nav_bearing, nav_controller_output->target_bearing, nav_controller_output->wp_dist, nav_controller_output->alt_error, nav_controller_output->aspd_error, nav_controller_output->xtrack_error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a nav_controller_output struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param nav_controller_output C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_nav_controller_output_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_nav_controller_output_t* nav_controller_output)
|
||||
{
|
||||
return mavlink_msg_nav_controller_output_pack_chan(system_id, component_id, chan, msg, nav_controller_output->nav_roll, nav_controller_output->nav_pitch, nav_controller_output->nav_bearing, nav_controller_output->target_bearing, nav_controller_output->wp_dist, nav_controller_output->alt_error, nav_controller_output->aspd_error, nav_controller_output->xtrack_error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a nav_controller_output message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
// MESSAGE OBJECT_DETECTION_EVENT PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT 140
|
||||
|
||||
typedef struct __mavlink_object_detection_event_t
|
||||
{
|
||||
uint32_t time; ///< Timestamp in milliseconds since system boot
|
||||
float bearing; ///< Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
|
||||
float distance; ///< Ground distance in meters
|
||||
uint16_t object_id; ///< Object ID
|
||||
uint8_t type; ///< Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
|
||||
char name[20]; ///< Name of the object as defined by the detector
|
||||
uint8_t quality; ///< Detection quality / confidence. 0: bad, 255: maximum confidence
|
||||
} mavlink_object_detection_event_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT_LEN 36
|
||||
#define MAVLINK_MSG_ID_140_LEN 36
|
||||
|
||||
#define MAVLINK_MSG_OBJECT_DETECTION_EVENT_FIELD_NAME_LEN 20
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_OBJECT_DETECTION_EVENT { \
|
||||
"OBJECT_DETECTION_EVENT", \
|
||||
7, \
|
||||
{ { "time", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_object_detection_event_t, time) }, \
|
||||
{ "bearing", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_object_detection_event_t, bearing) }, \
|
||||
{ "distance", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_object_detection_event_t, distance) }, \
|
||||
{ "object_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_object_detection_event_t, object_id) }, \
|
||||
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_object_detection_event_t, type) }, \
|
||||
{ "name", NULL, MAVLINK_TYPE_CHAR, 20, 15, offsetof(mavlink_object_detection_event_t, name) }, \
|
||||
{ "quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_object_detection_event_t, quality) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a object_detection_event message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time Timestamp in milliseconds since system boot
|
||||
* @param object_id Object ID
|
||||
* @param type Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
|
||||
* @param name Name of the object as defined by the detector
|
||||
* @param quality Detection quality / confidence. 0: bad, 255: maximum confidence
|
||||
* @param bearing Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
|
||||
* @param distance Ground distance in meters
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_object_detection_event_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint32_t time, uint16_t object_id, uint8_t type, const char *name, uint8_t quality, float bearing, float distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[36];
|
||||
_mav_put_uint32_t(buf, 0, time);
|
||||
_mav_put_float(buf, 4, bearing);
|
||||
_mav_put_float(buf, 8, distance);
|
||||
_mav_put_uint16_t(buf, 12, object_id);
|
||||
_mav_put_uint8_t(buf, 14, type);
|
||||
_mav_put_uint8_t(buf, 35, quality);
|
||||
_mav_put_char_array(buf, 15, name, 20);
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 36);
|
||||
#else
|
||||
mavlink_object_detection_event_t packet;
|
||||
packet.time = time;
|
||||
packet.bearing = bearing;
|
||||
packet.distance = distance;
|
||||
packet.object_id = object_id;
|
||||
packet.type = type;
|
||||
packet.quality = quality;
|
||||
mav_array_memcpy(packet.name, name, sizeof(char)*20);
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 36);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT;
|
||||
return mavlink_finalize_message(msg, system_id, component_id, 36, 179);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a object_detection_event message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time Timestamp in milliseconds since system boot
|
||||
* @param object_id Object ID
|
||||
* @param type Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
|
||||
* @param name Name of the object as defined by the detector
|
||||
* @param quality Detection quality / confidence. 0: bad, 255: maximum confidence
|
||||
* @param bearing Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
|
||||
* @param distance Ground distance in meters
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_object_detection_event_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint32_t time,uint16_t object_id,uint8_t type,const char *name,uint8_t quality,float bearing,float distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[36];
|
||||
_mav_put_uint32_t(buf, 0, time);
|
||||
_mav_put_float(buf, 4, bearing);
|
||||
_mav_put_float(buf, 8, distance);
|
||||
_mav_put_uint16_t(buf, 12, object_id);
|
||||
_mav_put_uint8_t(buf, 14, type);
|
||||
_mav_put_uint8_t(buf, 35, quality);
|
||||
_mav_put_char_array(buf, 15, name, 20);
|
||||
memcpy(_MAV_PAYLOAD(msg), buf, 36);
|
||||
#else
|
||||
mavlink_object_detection_event_t packet;
|
||||
packet.time = time;
|
||||
packet.bearing = bearing;
|
||||
packet.distance = distance;
|
||||
packet.object_id = object_id;
|
||||
packet.type = type;
|
||||
packet.quality = quality;
|
||||
mav_array_memcpy(packet.name, name, sizeof(char)*20);
|
||||
memcpy(_MAV_PAYLOAD(msg), &packet, 36);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT;
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 36, 179);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a object_detection_event struct into a message
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param object_detection_event C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_object_detection_event_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_object_detection_event_t* object_detection_event)
|
||||
{
|
||||
return mavlink_msg_object_detection_event_pack(system_id, component_id, msg, object_detection_event->time, object_detection_event->object_id, object_detection_event->type, object_detection_event->name, object_detection_event->quality, object_detection_event->bearing, object_detection_event->distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a object_detection_event message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time Timestamp in milliseconds since system boot
|
||||
* @param object_id Object ID
|
||||
* @param type Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
|
||||
* @param name Name of the object as defined by the detector
|
||||
* @param quality Detection quality / confidence. 0: bad, 255: maximum confidence
|
||||
* @param bearing Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
|
||||
* @param distance Ground distance in meters
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_object_detection_event_send(mavlink_channel_t chan, uint32_t time, uint16_t object_id, uint8_t type, const char *name, uint8_t quality, float bearing, float distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[36];
|
||||
_mav_put_uint32_t(buf, 0, time);
|
||||
_mav_put_float(buf, 4, bearing);
|
||||
_mav_put_float(buf, 8, distance);
|
||||
_mav_put_uint16_t(buf, 12, object_id);
|
||||
_mav_put_uint8_t(buf, 14, type);
|
||||
_mav_put_uint8_t(buf, 35, quality);
|
||||
_mav_put_char_array(buf, 15, name, 20);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT, buf, 36, 179);
|
||||
#else
|
||||
mavlink_object_detection_event_t packet;
|
||||
packet.time = time;
|
||||
packet.bearing = bearing;
|
||||
packet.distance = distance;
|
||||
packet.object_id = object_id;
|
||||
packet.type = type;
|
||||
packet.quality = quality;
|
||||
mav_array_memcpy(packet.name, name, sizeof(char)*20);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OBJECT_DETECTION_EVENT, (const char *)&packet, 36, 179);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE OBJECT_DETECTION_EVENT UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field time from object_detection_event message
|
||||
*
|
||||
* @return Timestamp in milliseconds since system boot
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_object_detection_event_get_time(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field object_id from object_detection_event message
|
||||
*
|
||||
* @return Object ID
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_object_detection_event_get_object_id(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field type from object_detection_event message
|
||||
*
|
||||
* @return Object type: 0: image, 1: letter, 2: ground vehicle, 3: air vehicle, 4: surface vehicle, 5: sub-surface vehicle, 6: human, 7: animal
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_object_detection_event_get_type(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field name from object_detection_event message
|
||||
*
|
||||
* @return Name of the object as defined by the detector
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_object_detection_event_get_name(const mavlink_message_t* msg, char *name)
|
||||
{
|
||||
return _MAV_RETURN_char_array(msg, name, 20, 15);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field quality from object_detection_event message
|
||||
*
|
||||
* @return Detection quality / confidence. 0: bad, 255: maximum confidence
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_object_detection_event_get_quality(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 35);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field bearing from object_detection_event message
|
||||
*
|
||||
* @return Angle of the object with respect to the body frame in NED coordinates in radians. 0: front
|
||||
*/
|
||||
static inline float mavlink_msg_object_detection_event_get_bearing(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field distance from object_detection_event message
|
||||
*
|
||||
* @return Ground distance in meters
|
||||
*/
|
||||
static inline float mavlink_msg_object_detection_event_get_distance(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a object_detection_event message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param object_detection_event C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_object_detection_event_decode(const mavlink_message_t* msg, mavlink_object_detection_event_t* object_detection_event)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
object_detection_event->time = mavlink_msg_object_detection_event_get_time(msg);
|
||||
object_detection_event->bearing = mavlink_msg_object_detection_event_get_bearing(msg);
|
||||
object_detection_event->distance = mavlink_msg_object_detection_event_get_distance(msg);
|
||||
object_detection_event->object_id = mavlink_msg_object_detection_event_get_object_id(msg);
|
||||
object_detection_event->type = mavlink_msg_object_detection_event_get_type(msg);
|
||||
mavlink_msg_object_detection_event_get_name(msg, object_detection_event->name);
|
||||
object_detection_event->quality = mavlink_msg_object_detection_event_get_quality(msg);
|
||||
#else
|
||||
memcpy(object_detection_event, _MAV_PAYLOAD(msg), 36);
|
||||
#endif
|
||||
}
|
||||
@@ -83,7 +83,7 @@ static inline uint16_t mavlink_msg_omnidirectional_flow_pack(uint8_t system_id,
|
||||
* @brief Pack a omnidirectional_flow message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (microseconds, synced to UNIX time or since system boot)
|
||||
* @param sensor_id Sensor ID
|
||||
@@ -126,7 +126,7 @@ static inline uint16_t mavlink_msg_omnidirectional_flow_pack_chan(uint8_t system
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a omnidirectional_flow struct into a message
|
||||
* @brief Encode a omnidirectional_flow struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -138,6 +138,20 @@ static inline uint16_t mavlink_msg_omnidirectional_flow_encode(uint8_t system_id
|
||||
return mavlink_msg_omnidirectional_flow_pack(system_id, component_id, msg, omnidirectional_flow->time_usec, omnidirectional_flow->sensor_id, omnidirectional_flow->left, omnidirectional_flow->right, omnidirectional_flow->quality, omnidirectional_flow->front_distance_m);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a omnidirectional_flow struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param omnidirectional_flow C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_omnidirectional_flow_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_omnidirectional_flow_t* omnidirectional_flow)
|
||||
{
|
||||
return mavlink_msg_omnidirectional_flow_pack_chan(system_id, component_id, chan, msg, omnidirectional_flow->time_usec, omnidirectional_flow->sensor_id, omnidirectional_flow->left, omnidirectional_flow->right, omnidirectional_flow->quality, omnidirectional_flow->front_distance_m);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a omnidirectional_flow message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -8,8 +8,8 @@ typedef struct __mavlink_optical_flow_t
|
||||
float flow_comp_m_x; ///< Flow in meters in x-sensor direction, angular-speed compensated
|
||||
float flow_comp_m_y; ///< Flow in meters in y-sensor direction, angular-speed compensated
|
||||
float ground_distance; ///< Ground distance in meters. Positive value: distance known. Negative value: Unknown distance
|
||||
int16_t flow_x; ///< Flow in pixels in x-sensor direction
|
||||
int16_t flow_y; ///< Flow in pixels in y-sensor direction
|
||||
int16_t flow_x; ///< Flow in pixels * 10 in x-sensor direction (dezi-pixels)
|
||||
int16_t flow_y; ///< Flow in pixels * 10 in y-sensor direction (dezi-pixels)
|
||||
uint8_t sensor_id; ///< Sensor ID
|
||||
uint8_t quality; ///< Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
} mavlink_optical_flow_t;
|
||||
@@ -45,8 +45,8 @@ typedef struct __mavlink_optical_flow_t
|
||||
*
|
||||
* @param time_usec Timestamp (UNIX)
|
||||
* @param sensor_id Sensor ID
|
||||
* @param flow_x Flow in pixels in x-sensor direction
|
||||
* @param flow_y Flow in pixels in y-sensor direction
|
||||
* @param flow_x Flow in pixels * 10 in x-sensor direction (dezi-pixels)
|
||||
* @param flow_y Flow in pixels * 10 in y-sensor direction (dezi-pixels)
|
||||
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
|
||||
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
|
||||
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
@@ -94,12 +94,12 @@ static inline uint16_t mavlink_msg_optical_flow_pack(uint8_t system_id, uint8_t
|
||||
* @brief Pack a optical_flow message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param time_usec Timestamp (UNIX)
|
||||
* @param sensor_id Sensor ID
|
||||
* @param flow_x Flow in pixels in x-sensor direction
|
||||
* @param flow_y Flow in pixels in y-sensor direction
|
||||
* @param flow_x Flow in pixels * 10 in x-sensor direction (dezi-pixels)
|
||||
* @param flow_y Flow in pixels * 10 in y-sensor direction (dezi-pixels)
|
||||
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
|
||||
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
|
||||
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
@@ -145,7 +145,7 @@ static inline uint16_t mavlink_msg_optical_flow_pack_chan(uint8_t system_id, uin
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a optical_flow struct into a message
|
||||
* @brief Encode a optical_flow struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -157,14 +157,28 @@ static inline uint16_t mavlink_msg_optical_flow_encode(uint8_t system_id, uint8_
|
||||
return mavlink_msg_optical_flow_pack(system_id, component_id, msg, optical_flow->time_usec, optical_flow->sensor_id, optical_flow->flow_x, optical_flow->flow_y, optical_flow->flow_comp_m_x, optical_flow->flow_comp_m_y, optical_flow->quality, optical_flow->ground_distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a optical_flow struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param optical_flow C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_optical_flow_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_optical_flow_t* optical_flow)
|
||||
{
|
||||
return mavlink_msg_optical_flow_pack_chan(system_id, component_id, chan, msg, optical_flow->time_usec, optical_flow->sensor_id, optical_flow->flow_x, optical_flow->flow_y, optical_flow->flow_comp_m_x, optical_flow->flow_comp_m_y, optical_flow->quality, optical_flow->ground_distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a optical_flow message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param time_usec Timestamp (UNIX)
|
||||
* @param sensor_id Sensor ID
|
||||
* @param flow_x Flow in pixels in x-sensor direction
|
||||
* @param flow_y Flow in pixels in y-sensor direction
|
||||
* @param flow_x Flow in pixels * 10 in x-sensor direction (dezi-pixels)
|
||||
* @param flow_y Flow in pixels * 10 in y-sensor direction (dezi-pixels)
|
||||
* @param flow_comp_m_x Flow in meters in x-sensor direction, angular-speed compensated
|
||||
* @param flow_comp_m_y Flow in meters in y-sensor direction, angular-speed compensated
|
||||
* @param quality Optical flow quality / confidence. 0: bad, 255: maximum quality
|
||||
@@ -237,7 +251,7 @@ static inline uint8_t mavlink_msg_optical_flow_get_sensor_id(const mavlink_messa
|
||||
/**
|
||||
* @brief Get field flow_x from optical_flow message
|
||||
*
|
||||
* @return Flow in pixels in x-sensor direction
|
||||
* @return Flow in pixels * 10 in x-sensor direction (dezi-pixels)
|
||||
*/
|
||||
static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_t* msg)
|
||||
{
|
||||
@@ -247,7 +261,7 @@ static inline int16_t mavlink_msg_optical_flow_get_flow_x(const mavlink_message_
|
||||
/**
|
||||
* @brief Get field flow_y from optical_flow message
|
||||
*
|
||||
* @return Flow in pixels in y-sensor direction
|
||||
* @return Flow in pixels * 10 in y-sensor direction (dezi-pixels)
|
||||
*/
|
||||
static inline int16_t mavlink_msg_optical_flow_get_flow_y(const mavlink_message_t* msg)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ static inline uint16_t mavlink_msg_param_request_list_pack(uint8_t system_id, ui
|
||||
* @brief Pack a param_request_list message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -97,7 +97,7 @@ static inline uint16_t mavlink_msg_param_request_list_pack_chan(uint8_t system_i
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_request_list struct into a message
|
||||
* @brief Encode a param_request_list struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -109,6 +109,20 @@ static inline uint16_t mavlink_msg_param_request_list_encode(uint8_t system_id,
|
||||
return mavlink_msg_param_request_list_pack(system_id, component_id, msg, param_request_list->target_system, param_request_list->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_request_list struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param param_request_list C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_param_request_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_param_request_list_t* param_request_list)
|
||||
{
|
||||
return mavlink_msg_param_request_list_pack_chan(system_id, component_id, chan, msg, param_request_list->target_system, param_request_list->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a param_request_list message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -72,7 +72,7 @@ static inline uint16_t mavlink_msg_param_request_read_pack(uint8_t system_id, ui
|
||||
* @brief Pack a param_request_read message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -109,7 +109,7 @@ static inline uint16_t mavlink_msg_param_request_read_pack_chan(uint8_t system_i
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_request_read struct into a message
|
||||
* @brief Encode a param_request_read struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -121,6 +121,20 @@ static inline uint16_t mavlink_msg_param_request_read_encode(uint8_t system_id,
|
||||
return mavlink_msg_param_request_read_pack(system_id, component_id, msg, param_request_read->target_system, param_request_read->target_component, param_request_read->param_id, param_request_read->param_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_request_read struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param param_request_read C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_param_request_read_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_param_request_read_t* param_request_read)
|
||||
{
|
||||
return mavlink_msg_param_request_read_pack_chan(system_id, component_id, chan, msg, param_request_read->target_system, param_request_read->target_component, param_request_read->param_id, param_request_read->param_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a param_request_read message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -77,7 +77,7 @@ static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t com
|
||||
* @brief Pack a param_set message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message was sent over
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
@@ -117,7 +117,7 @@ static inline uint16_t mavlink_msg_param_set_pack_chan(uint8_t system_id, uint8_
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_set struct into a message
|
||||
* @brief Encode a param_set struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
@@ -129,6 +129,20 @@ static inline uint16_t mavlink_msg_param_set_encode(uint8_t system_id, uint8_t c
|
||||
return mavlink_msg_param_set_pack(system_id, component_id, msg, param_set->target_system, param_set->target_component, param_set->param_id, param_set->param_value, param_set->param_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_set struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param param_set C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_param_set_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_param_set_t* param_set)
|
||||
{
|
||||
return mavlink_msg_param_set_pack_chan(system_id, component_id, chan, msg, param_set->target_system, param_set->target_component, param_set->param_id, param_set->param_value, param_set->param_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a param_set message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user