Project GroundStation Mavlink (SDL)
-
6.gitignore
-
BINProjects/SDL_HAD/100195.jpg
-
BINProjects/SDL_HAD/139713-full_hexagon-wallpapers-top-free-hexagon-backgrounds-wallpaperaccess.jpg
-
BINProjects/SDL_HAD/1587894-hexagon-wallpaper.jpg
-
BINProjects/SDL_HAD/164373258-hexagon-wallpapers.jpg
-
BINProjects/SDL_HAD/18525.png
-
2Projects/SDL_HAD/1976427.svg
-
BINProjects/SDL_HAD/335175-full_wallpapers-minimalistas-1080p-hi-hexagon-wallpaper-blue.jpg
-
BINProjects/SDL_HAD/335566.jpg
-
BINProjects/SDL_HAD/5dcdc562710c2.png
-
BINProjects/SDL_HAD/654769.jpg
-
62Projects/SDL_HAD/Aerial_Photography_UAV_Icon.svg
-
BINProjects/SDL_HAD/AsteroidAnimation.png
-
BINProjects/SDL_HAD/Cursor_Industrialized.png
-
BINProjects/SDL_HAD/Cursor_ST416.png
-
BINProjects/SDL_HAD/Korawan_M_Drone03-512.png
-
30Projects/SDL_HAD/Resource.h
-
BINProjects/SDL_HAD/Roboto-Bold.ttf
-
BINProjects/SDL_HAD/Roboto-Regular.ttf
-
BINProjects/SDL_HAD/SDL2.dll
-
BINProjects/SDL_HAD/SDL2_image.dll
-
BINProjects/SDL_HAD/SDL2_ttf.dll
-
BINProjects/SDL_HAD/SDL_HAD.APS
-
41Projects/SDL_HAD/SDL_HAD.conf
-
173Projects/SDL_HAD/SDL_HAD.cpp
-
3Projects/SDL_HAD/SDL_HAD.h
-
BINProjects/SDL_HAD/SDL_HAD.ico
-
162Projects/SDL_HAD/SDL_HAD.rc
-
31Projects/SDL_HAD/SDL_HAD.sln
-
264Projects/SDL_HAD/SDL_HAD.vcxproj
-
280Projects/SDL_HAD/SDL_HAD.vcxproj.filters
-
4Projects/SDL_HAD/SDL_HAD.vcxproj.user
-
BINProjects/SDL_HAD/Untitled-1.png
-
BINProjects/SDL_HAD/arial.ttf
-
5Projects/SDL_HAD/black-gradient-glow-hexagon-white-cyan-1920x1080-c4-0f4148-ffffff-040a0b-000000-l2-2-29-a-40-f-6.svg
-
BINProjects/SDL_HAD/crosshair-1345868_640.png
-
BINProjects/SDL_HAD/decoration.png
-
BINProjects/SDL_HAD/dron.png
-
1Projects/SDL_HAD/drop-shadow-beehive-blue-black-hexagon-1920x1080-c2-1e90ff-000000-l4-8-136-15-9-a2-10-45-f-7.svg
-
BINProjects/SDL_HAD/entypo.ttf
-
BINProjects/SDL_HAD/exp2_alpha_1.png
-
BINProjects/SDL_HAD/fhctrl.png
-
BINProjects/SDL_HAD/fhctrl.psd
-
15Projects/SDL_HAD/framework.h
-
BINProjects/SDL_HAD/game-cursor-png-7.png
-
BINProjects/SDL_HAD/game-cursor.png
-
1Projects/SDL_HAD/hexagon-cyan-beehive-drop-shadow-1920x1080-c2-216870-0d1c1e-l4-10-128-16-6-a2-5-45-f-7.svg
-
BINProjects/SDL_HAD/honeycomb-wallpapers-25237-1745458.jpg
-
BINProjects/SDL_HAD/images (2).png
-
BINProjects/SDL_HAD/images (3).png
-
BINProjects/SDL_HAD/images (3).psd
-
BINProjects/SDL_HAD/images (4).png
-
BINProjects/SDL_HAD/images (5).png
-
BINProjects/SDL_HAD/istockphoto-826269000-170667a.jpg
-
BINProjects/SDL_HAD/joystick-hat.png
-
BINProjects/SDL_HAD/libconfig.dll
-
BINProjects/SDL_HAD/libconfig_d.dll
-
BINProjects/SDL_HAD/libfreetype-6.dll
-
BINProjects/SDL_HAD/libjpeg-9.dll
-
BINProjects/SDL_HAD/libpng16-16.dll
-
BINProjects/SDL_HAD/libtiff-5.dll
-
1Projects/SDL_HAD/list_devices.bat
-
BINProjects/SDL_HAD/maxresdefault (10).jpg
-
BINProjects/SDL_HAD/primary.jpg
-
BINProjects/SDL_HAD/pthreadVC2.dll
-
BINProjects/SDL_HAD/secondary.jpg
-
BINProjects/SDL_HAD/ship.png
-
BINProjects/SDL_HAD/small.ico
-
6Projects/SDL_HAD/targetver.h
-
BINProjects/SDL_HAD/thumb-1920-515590.jpg
-
BINProjects/SDL_HAD/visor.png
-
BINProjects/SDL_HAD/visor.psd
-
5Projects/SDL_HAD/white-hexagon-blue-gradient-glow-black-1920x1080-c4-000000-ffffff-00ced1-000000-l2-10-124-a-45-f-6.svg
-
47Windows_Workspace_2019 - Home.sln
-
22Windows_Workspace_2019.sln
-
2lib/alg/generic/md5.cpp
-
16lib/components/base/basicLIBAV.cpp
-
28lib/components/base/basicLIBAV.h
-
44lib/components/base/basicMediaDestination.h
-
11lib/components/base/basicMediaSource.cpp
-
62lib/components/base/basicMediaSource.h
-
1lib/components/base/basicObject.cpp
-
10lib/components/object/objectCameraPTZ.cpp
-
2lib/components/object/objectCameraPTZ.h
-
683lib/components/object/objectFlyHunter.cpp
-
120lib/components/object/objectFlyHunter.h
-
6lib/data/curl/curlRequest.h
-
266lib/data/mavlink/ASLUAV/ASLUAV.h
-
34lib/data/mavlink/ASLUAV/mavlink.h
-
388lib/data/mavlink/ASLUAV/mavlink_msg_asl_obctrl.h
-
813lib/data/mavlink/ASLUAV/mavlink_msg_aslctrl_data.h
-
463lib/data/mavlink/ASLUAV/mavlink_msg_aslctrl_debug.h
-
280lib/data/mavlink/ASLUAV/mavlink_msg_asluav_status.h
-
563lib/data/mavlink/ASLUAV/mavlink_msg_command_int_stamped.h
-
513lib/data/mavlink/ASLUAV/mavlink_msg_command_long_stamped.h
-
363lib/data/mavlink/ASLUAV/mavlink_msg_ekf_ext.h
-
813lib/data/mavlink/ASLUAV/mavlink_msg_fw_soaring_data.h
-
363lib/data/mavlink/ASLUAV/mavlink_msg_gsm_link_status.h
-
263lib/data/mavlink/ASLUAV/mavlink_msg_sens_atmos.h
-
563lib/data/mavlink/ASLUAV/mavlink_msg_sens_batmon.h
|
After Width: 1920 | Height: 1440 | Size: 404 KiB |
|
After Width: 1920 | Height: 1200 | Size: 122 KiB |
|
After Width: 2560 | Height: 1600 | Size: 756 KiB |
|
After Width: 2560 | Height: 1600 | Size: 756 KiB |
|
After Width: 128 | Height: 128 | Size: 2.1 KiB |
@ -0,0 +1,2 @@ |
|||||
|
<?xml version="1.0"?> |
||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="512" height="512"><g id="UAV"><path d="M50,38a11.735,11.735,0,0,0-5.153,1.191L42.606,36.95a7.009,7.009,0,0,1,0-9.9l2.237-2.236A11.822,11.822,0,0,0,50,26a12.075,12.075,0,1,0-10.81-6.847l-2.24,2.241a7.009,7.009,0,0,1-9.9,0l-2.235-2.236a12.054,12.054,0,1,0-5.657,5.657l2.236,2.235a7.009,7.009,0,0,1,0,9.9l-2.241,2.24A11.983,11.983,0,1,0,26,50a11.822,11.822,0,0,0-1.186-5.157l2.236-2.237a7.009,7.009,0,0,1,9.9,0l2.241,2.241A11.735,11.735,0,0,0,38,50,12,12,0,1,0,50,38ZM40,14A10,10,0,1,1,50,24a9.9,9.9,0,0,1-3.654-.689l3.332-3.332a4,4,0,0,0-5.657-5.657L40.7,17.648A10.015,10.015,0,0,1,40,14ZM14,24a10.005,10.005,0,1,1,9.308-6.349l-3.329-3.329a4,4,0,0,0-5.657,5.657l3.329,3.329A10.094,10.094,0,0,1,14,24ZM24,50a10.018,10.018,0,1,1-6.352-9.3l-3.326,3.326a4,4,0,0,0,5.657,5.657l3.332-3.332A9.9,9.9,0,0,1,24,50Zm1.636-8.808-7.071,7.072a2,2,0,1,1-2.829-2.829l7.072-7.071a9.01,9.01,0,0,0,0-12.728l-7.072-7.071a2,2,0,0,1,2.829-2.829l7.071,7.072a9.012,9.012,0,0,0,12.728,0l7.071-7.072a2,2,0,1,1,2.829,2.829l-7.072,7.071a9.01,9.01,0,0,0,0,12.728l7.072,7.071a2,2,0,1,1-2.829,2.829l-7.071-7.072A9.012,9.012,0,0,0,25.636,41.192ZM50,60A10.011,10.011,0,0,1,40,50a9.819,9.819,0,0,1,.692-3.651l3.329,3.329a4,4,0,0,0,5.657-5.657l-3.329-3.329A9.815,9.815,0,0,1,50,40a10,10,0,0,1,0,20Z"/><path d="M49,12a3,3,0,0,1,3,3,1,1,0,0,0,2,0,5.006,5.006,0,0,0-5-5,1,1,0,0,0,0,2Z"/><path d="M49,8a7.008,7.008,0,0,1,7,7,1,1,0,0,0,2,0,9.011,9.011,0,0,0-9-9,1,1,0,0,0,0,2Z"/><path d="M16,11a1,1,0,0,0-1-1,5.006,5.006,0,0,0-5,5,1,1,0,0,0,2,0,3,3,0,0,1,3-3A1,1,0,0,0,16,11Z"/><path d="M15,8a1,1,0,0,0,0-2,9.011,9.011,0,0,0-9,9,1,1,0,0,0,2,0A7.008,7.008,0,0,1,15,8Z"/><path d="M49,54a5.006,5.006,0,0,0,5-5,1,1,0,0,0-2,0,3,3,0,0,1-3,3,1,1,0,0,0,0,2Z"/><path d="M56,49a7.008,7.008,0,0,1-7,7,1,1,0,0,0,0,2,9.011,9.011,0,0,0,9-9,1,1,0,0,0-2,0Z"/><path d="M15,52a3,3,0,0,1-3-3,1,1,0,0,0-2,0,5.006,5.006,0,0,0,5,5,1,1,0,0,0,0-2Z"/><path d="M15,56a7.008,7.008,0,0,1-7-7,1,1,0,0,0-2,0,9.011,9.011,0,0,0,9,9,1,1,0,0,0,0-2Z"/><path d="M32,29a3,3,0,1,0,3,3A3,3,0,0,0,32,29Zm0,4a1,1,0,1,1,1-1A1,1,0,0,1,32,33Z"/></g></svg> |
||||
|
After Width: 1920 | Height: 1080 | Size: 158 KiB |
|
After Width: 1920 | Height: 1080 | Size: 158 KiB |
|
After Width: 1024 | Height: 1024 | Size: 931 KiB |
|
After Width: 1920 | Height: 1200 | Size: 169 KiB |
62
Projects/SDL_HAD/Aerial_Photography_UAV_Icon.svg
File diff suppressed because it is too large
View File
|
After Width: 1024 | Height: 1024 | Size: 862 KiB |
|
After Width: 256 | Height: 256 | Size: 49 KiB |
|
After Width: 256 | Height: 256 | Size: 34 KiB |
|
After Width: 512 | Height: 512 | Size: 38 KiB |
@ -0,0 +1,30 @@ |
|||||
|
//{{NO_DEPENDENCIES}} |
||||
|
// Microsoft Visual C++ generated include file. |
||||
|
// Used by SDL_HAD.rc |
||||
|
|
||||
|
#define IDS_APP_TITLE 103 |
||||
|
|
||||
|
#define IDR_MAINFRAME 128 |
||||
|
#define IDD_SDLHAD_DIALOG 102 |
||||
|
#define IDD_ABOUTBOX 103 |
||||
|
#define IDM_ABOUT 104 |
||||
|
#define IDM_EXIT 105 |
||||
|
#define IDI_SDLHAD 107 |
||||
|
#define IDI_SMALL 108 |
||||
|
#define IDC_SDLHAD 109 |
||||
|
#define IDC_MYICON 2 |
||||
|
#ifndef IDC_STATIC |
||||
|
#define IDC_STATIC -1 |
||||
|
#endif |
||||
|
// Next default values for new objects |
||||
|
// |
||||
|
#ifdef APSTUDIO_INVOKED |
||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS |
||||
|
|
||||
|
#define _APS_NO_MFC 130 |
||||
|
#define _APS_NEXT_RESOURCE_VALUE 129 |
||||
|
#define _APS_NEXT_COMMAND_VALUE 32771 |
||||
|
#define _APS_NEXT_CONTROL_VALUE 1000 |
||||
|
#define _APS_NEXT_SYMED_VALUE 110 |
||||
|
#endif |
||||
|
#endif |
||||
@ -0,0 +1,41 @@ |
|||||
|
GUI : |
||||
|
{ |
||||
|
FULL_SCREEN_MODE = 0; |
||||
|
BACKGROUND_MODE = 0; |
||||
|
BACKGROUND_SOLID_COLOR = 3441582; |
||||
|
BACKGROUND_GRADIENT_LT_COLOR = 3441582; |
||||
|
BACKGROUND_GRADIENT_RT_COLOR = 3441582; |
||||
|
BACKGROUND_GRADIENT_LB_COLOR = 0; |
||||
|
BACKGROUND_GRADIENT_RB_COLOR = 0; |
||||
|
BACKGROUND_PICTURE = "primary.jpg"; |
||||
|
BACKGROUND_ALT_SOLID_COLOR = 3441582; |
||||
|
BACKGROUND_ALT_GRADIENT_LT_COLOR = 3441582; |
||||
|
BACKGROUND_ALT_GRADIENT_RT_COLOR = 3441582; |
||||
|
BACKGROUND_ALT_GRADIENT_LB_COLOR = 0; |
||||
|
BACKGROUND_ALT_GRADIENT_RB_COLOR = 0; |
||||
|
BACKGROUND_ALT_PICTURE = "secondary.jpg"; |
||||
|
WIDTH = 1024; |
||||
|
HEIGHT = 768; |
||||
|
}; |
||||
|
APPLICATION : |
||||
|
{ |
||||
|
VIDEO_SOURCE = "video=USB2.0 PC CAMERA"; |
||||
|
VIDEO_SOURCE_O = "video=@device_pnp_\\\\?\\usb#vid_045e&pid_0779&mi_00#7&1b2c41ea&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global"; |
||||
|
VIDEO_SOURCE_ = "video=@device_pnp_\\\\?\\usb#vid_045e&pid_0779&mi_00#8&39ac1a6&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\\global"; |
||||
|
VIDEO_WIDE = false; |
||||
|
FLY_HUNTER : |
||||
|
{ |
||||
|
PROTOCOL : |
||||
|
{ |
||||
|
UART_PORT = "COM4"; |
||||
|
UART_SPEED = 57600; |
||||
|
}; |
||||
|
LAST_POSITION_LAT = 0.0; |
||||
|
LAST_POSITION_LON = 0.0; |
||||
|
LAST_POSITION_ALT = 0.0; |
||||
|
LAST_POSITION_ROLL = 0.0; |
||||
|
LAST_POSITION_PITCH = 0.0; |
||||
|
LAST_POSITION_YAW = 0.0; |
||||
|
LAST_POSITION_SPEED = 0.0; |
||||
|
}; |
||||
|
}; |
||||
@ -0,0 +1,173 @@ |
|||||
|
// SDL_HAD.cpp : Defines the entry point for the application.
|
||||
|
//
|
||||
|
|
||||
|
#include "framework.h"
|
||||
|
#include "SDL_HAD.h"
|
||||
|
#include "../../lib/sdl/gui_sdl.h"
|
||||
|
#include "../../lib/sdl/widgets/logWidget.h"
|
||||
|
#include "../../lib/sdl/widgets/OSDWidget.h"
|
||||
|
#include "../../lib/sdl/widgets/buttonWidget.h"
|
||||
|
#include "../../lib/components/base/basicLogCollection.h"
|
||||
|
#include "../../lib/components/object/objectFlyHunter.h"
|
||||
|
#include "../../lib/components/object/objectFileLoggingService.h"
|
||||
|
#include "../../lib/sdl/elements/animatedSprite.h"
|
||||
|
#include "../../lib/sdl/joystickWrapper.h"
|
||||
|
#include "../../lib/sdl/widgets/flyHunterWidget.h"
|
||||
|
|
||||
|
#define LOG( X ) mLGP->Log( "Main", NULL, X )
|
||||
|
#define LOG_ERROR( X ) mLGP->Log( "Main", NULL, _LOG_ERROR, X )
|
||||
|
|
||||
|
sdlOsdVideoWidget * mVID; |
||||
|
sdlFlyHunterWidget * mFHW; |
||||
|
objectFlyHunter * mHNT; |
||||
|
|
||||
|
void test(void) { |
||||
|
exit(1212); |
||||
|
}; |
||||
|
|
||||
|
void setVizor1(int16_t a) { |
||||
|
mVID->setJoystickRoll(a); |
||||
|
//mHNT->setJoystickRoll(a);
|
||||
|
}; |
||||
|
|
||||
|
void setVizor2(int16_t a) { |
||||
|
mVID->setJoystickPitch(a); |
||||
|
}; |
||||
|
|
||||
|
void setVizor3(int16_t a) { |
||||
|
mVID->setJoystickYaw(a); |
||||
|
}; |
||||
|
|
||||
|
void setVizor4(int16_t a) { |
||||
|
mVID->setJoistickThrottle(a); |
||||
|
}; |
||||
|
|
||||
|
void updateOrien(float a, float b, float c) { |
||||
|
mVID->setRoll(a * 57.295779513082320876798154814105f); |
||||
|
//void setPitch(float Angle);
|
||||
|
//void setYaw(float Angle);
|
||||
|
//void setAlt(float Angle);
|
||||
|
}; |
||||
|
|
||||
|
int APIENTRY wWinMain(_In_ HINSTANCE hInstance, |
||||
|
_In_opt_ HINSTANCE hPrevInstance, |
||||
|
_In_ LPWSTR lpCmdLine, |
||||
|
_In_ int nCmdShow) |
||||
|
{ |
||||
|
UNREFERENCED_PARAMETER(hPrevInstance); |
||||
|
UNREFERENCED_PARAMETER(lpCmdLine); |
||||
|
|
||||
|
classGUI_SDL * SDL; |
||||
|
sdlLog * mLOG; |
||||
|
|
||||
|
sdlButtonWidget * mBTN; |
||||
|
basicSettingsProvider * mMSP; |
||||
|
config_setting_t * mSET = NULL; |
||||
|
basicLogCollection * mLGP; |
||||
|
|
||||
|
objectFileLoggingService * mFLO; |
||||
|
sdlJoystickWrapper * mJOY; |
||||
|
bool mVIW = false; |
||||
|
char mVSRC[256]; |
||||
|
|
||||
|
|
||||
|
mLGP = basicLogCollection::getInstance(); |
||||
|
mFLO = new objectFileLoggingService("SDL_HAD.log"); |
||||
|
mLGP->addHandler(mFLO); |
||||
|
mMSP = basicSettingsProvider::getInstance((CSTR)"SDL_HAD.conf"); |
||||
|
SDL = classGUI_SDL::getInstance(); |
||||
|
SLEEP(1000); |
||||
|
mLOG = new sdlLog(10, 520, 400, 190); |
||||
|
mLGP->addHandler(mLOG); |
||||
|
LOG("Start Application"); |
||||
|
if (mMSP != NULL) { |
||||
|
mSET = mMSP->getSubNode(NULL, (CSTR)"APPLICATION"); |
||||
|
if (mSET == NULL) { |
||||
|
LOG_ERROR("Cannot get Settings!"); |
||||
|
} else { |
||||
|
config_setting_t * pSetting; |
||||
|
LOG("Reading Settings"); |
||||
|
pSetting = config_setting_get_member(mSET, "VIDEO_SOURCE"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(mSET, "VIDEO_SOURCE", CONFIG_TYPE_STRING); |
||||
|
sprintf(mVSRC, "video=USB2.0 PC CAMERA"); |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_string(pSetting, mVSRC ); |
||||
|
mMSP->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
sprintf(mVSRC, "%s", config_setting_get_string(pSetting)); |
||||
|
}; |
||||
|
pSetting = config_setting_get_member(mSET, "VIDEO_WIDE"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(mSET, "VIDEO_WIDE", CONFIG_TYPE_BOOL); |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_bool(pSetting, mVIW); |
||||
|
mMSP->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
mVIW = (bool)config_setting_get_bool(pSetting); |
||||
|
}; |
||||
|
}; |
||||
|
mMSP->validate(); |
||||
|
} else { |
||||
|
LOG_ERROR("Error create Settings File!"); |
||||
|
}; |
||||
|
mHNT = new objectFlyHunter(mSET); |
||||
|
if (mHNT == NULL) { |
||||
|
LOG_ERROR("Error create FlyHunter Object!"); |
||||
|
} else { |
||||
|
if( mHNT->cerate()){ |
||||
|
LOG("FlyHunter Created Sucessfully"); |
||||
|
} else { |
||||
|
LOG_ERROR("Error Init of FlyHunter!"); |
||||
|
}; |
||||
|
}; |
||||
|
if (mVIW) { |
||||
|
mFHW = new sdlFlyHunterWidget(550, 10, 405, 400); |
||||
|
if (mFHW) { |
||||
|
mFHW->attachFlyHunter(mHNT); |
||||
|
}; |
||||
|
mJOY = new sdlJoystickWrapper(10, 320); |
||||
|
if (mJOY) { |
||||
|
SDL->registerJoystickWraper(mJOY); |
||||
|
}; |
||||
|
mVID = new sdlOsdVideoWidget((CSTR)mVSRC, 10, 10, 528, 300); |
||||
|
mJOY->Roll = setVizor1; |
||||
|
mJOY->Pitch = setVizor2; |
||||
|
mJOY->Yaw = setVizor3; |
||||
|
mJOY->Throttle = setVizor4; |
||||
|
if (mFHW) { |
||||
|
mFHW->attachOSD(mVID); |
||||
|
}; |
||||
|
mHNT->updateOrientation = updateOrien; |
||||
|
|
||||
|
mBTN = new sdlButtonWidget((CSTR)"EXIT", 10, 720, 200, 40); |
||||
|
mBTN->Pushed = &test; |
||||
|
} else { |
||||
|
mFHW = new sdlFlyHunterWidget(420, 10, 594, 400); |
||||
|
if (mFHW) { |
||||
|
mFHW->attachFlyHunter(mHNT); |
||||
|
}; |
||||
|
mJOY = new sdlJoystickWrapper(10, 320); |
||||
|
if (mJOY) { |
||||
|
SDL->registerJoystickWraper(mJOY); |
||||
|
}; |
||||
|
mVID = new sdlOsdVideoWidget((CSTR)mVSRC, 10, 10, 400, 300); |
||||
|
mJOY->Roll = setVizor1; |
||||
|
mJOY->Pitch = setVizor2; |
||||
|
mJOY->Yaw = setVizor3; |
||||
|
mJOY->Throttle = setVizor4; |
||||
|
if (mFHW) { |
||||
|
mFHW->attachOSD(mVID); |
||||
|
}; |
||||
|
mBTN = new sdlButtonWidget((CSTR)"EXIT", 10, 720, 200, 40); |
||||
|
mBTN->Pushed = &test; |
||||
|
}; |
||||
|
SDL->waitThreadEnd(); |
||||
|
LOG("End Application"); |
||||
|
return (int) 1234; |
||||
|
} |
||||
|
|
||||
|
#undef LOG
|
||||
|
#undef LOG_ERROR
|
||||
@ -0,0 +1,3 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
#include "resource.h" |
||||
@ -0,0 +1,162 @@ |
|||||
|
// Microsoft Visual C++ generated resource script. |
||||
|
// |
||||
|
#pragma code_page(65001) |
||||
|
|
||||
|
#include "resource.h" |
||||
|
|
||||
|
#define APSTUDIO_READONLY_SYMBOLS |
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// Generated from the TEXTINCLUDE 2 resource. |
||||
|
// |
||||
|
#ifndef APSTUDIO_INVOKED |
||||
|
#include "targetver.h" |
||||
|
#endif |
||||
|
#define APSTUDIO_HIDDEN_SYMBOLS |
||||
|
#include "windows.h" |
||||
|
#undef APSTUDIO_HIDDEN_SYMBOLS |
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
#undef APSTUDIO_READONLY_SYMBOLS |
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// English (United States) resources |
||||
|
|
||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US |
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// Icon |
||||
|
// |
||||
|
|
||||
|
// Icon with lowest ID value placed first to ensure application icon |
||||
|
// remains consistent on all systems. |
||||
|
IDI_SDLHAD ICON "SDL_HAD.ico" |
||||
|
|
||||
|
IDI_SMALL ICON "small.ico" |
||||
|
|
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// Menu |
||||
|
// |
||||
|
|
||||
|
IDC_SDLHAD MENU |
||||
|
BEGIN |
||||
|
POPUP "&File" |
||||
|
BEGIN |
||||
|
MENUITEM "E&xit", IDM_EXIT |
||||
|
END |
||||
|
POPUP "&Help" |
||||
|
BEGIN |
||||
|
MENUITEM "&About ...", IDM_ABOUT |
||||
|
END |
||||
|
END |
||||
|
|
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// Accelerator |
||||
|
// |
||||
|
|
||||
|
IDC_SDLHAD ACCELERATORS |
||||
|
BEGIN |
||||
|
"?", IDM_ABOUT, ASCII, ALT |
||||
|
"/", IDM_ABOUT, ASCII, ALT |
||||
|
END |
||||
|
|
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// Dialog |
||||
|
// |
||||
|
|
||||
|
IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62 |
||||
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU |
||||
|
CAPTION "About SDL_HAD" |
||||
|
FONT 8, "MS Shell Dlg", 0, 0, 0x1 |
||||
|
BEGIN |
||||
|
ICON IDI_SDLHAD,IDC_STATIC,14,14,20,20 |
||||
|
LTEXT "SDL_HAD, Version 1.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX |
||||
|
LTEXT "Copyright (c) 2019",IDC_STATIC,42,26,114,8 |
||||
|
DEFPUSHBUTTON "OK",IDOK,113,41,50,14,WS_GROUP |
||||
|
END |
||||
|
|
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// DESIGNINFO |
||||
|
// |
||||
|
|
||||
|
#ifdef APSTUDIO_INVOKED |
||||
|
GUIDELINES DESIGNINFO |
||||
|
BEGIN |
||||
|
IDD_ABOUTBOX, DIALOG |
||||
|
BEGIN |
||||
|
LEFTMARGIN, 7 |
||||
|
RIGHTMARGIN, 163 |
||||
|
TOPMARGIN, 7 |
||||
|
BOTTOMMARGIN, 55 |
||||
|
END |
||||
|
END |
||||
|
#endif // APSTUDIO_INVOKED |
||||
|
|
||||
|
|
||||
|
#ifdef APSTUDIO_INVOKED |
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// TEXTINCLUDE |
||||
|
// |
||||
|
|
||||
|
1 TEXTINCLUDE |
||||
|
BEGIN |
||||
|
"resource.h\0" |
||||
|
END |
||||
|
|
||||
|
2 TEXTINCLUDE |
||||
|
BEGIN |
||||
|
"#ifndef APSTUDIO_INVOKED\r\n" |
||||
|
"#include ""targetver.h""\r\n" |
||||
|
"#endif\r\n" |
||||
|
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n" |
||||
|
"#include ""windows.h""\r\n" |
||||
|
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" |
||||
|
"\0" |
||||
|
END |
||||
|
|
||||
|
3 TEXTINCLUDE |
||||
|
BEGIN |
||||
|
"\r\n" |
||||
|
"\0" |
||||
|
END |
||||
|
|
||||
|
#endif // APSTUDIO_INVOKED |
||||
|
|
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// String Table |
||||
|
// |
||||
|
|
||||
|
STRINGTABLE |
||||
|
BEGIN |
||||
|
IDS_APP_TITLE "SDL_HAD" |
||||
|
IDC_SDLHAD "SDLHAD" |
||||
|
END |
||||
|
|
||||
|
#endif // English (United States) resources |
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
|
||||
|
|
||||
|
|
||||
|
#ifndef APSTUDIO_INVOKED |
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
// |
||||
|
// Generated from the TEXTINCLUDE 3 resource. |
||||
|
// |
||||
|
|
||||
|
|
||||
|
///////////////////////////////////////////////////////////////////////////// |
||||
|
#endif // not APSTUDIO_INVOKED |
||||
|
|
||||
@ -0,0 +1,31 @@ |
|||||
|
|
||||
|
Microsoft Visual Studio Solution File, Format Version 12.00 |
||||
|
# Visual Studio Version 16 |
||||
|
VisualStudioVersion = 16.0.29418.71 |
||||
|
MinimumVisualStudioVersion = 10.0.40219.1 |
||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_HAD", "SDL_HAD.vcxproj", "{FB5FF731-FE00-436C-AEF0-014ACE08D10C}" |
||||
|
EndProject |
||||
|
Global |
||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
|
Debug|x64 = Debug|x64 |
||||
|
Debug|x86 = Debug|x86 |
||||
|
Release|x64 = Release|x64 |
||||
|
Release|x86 = Release|x86 |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x64.ActiveCfg = Debug|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x64.Build.0 = Debug|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x86.ActiveCfg = Debug|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x86.Build.0 = Debug|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x64.ActiveCfg = Release|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x64.Build.0 = Release|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x86.ActiveCfg = Release|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x86.Build.0 = Release|Win32 |
||||
|
EndGlobalSection |
||||
|
GlobalSection(SolutionProperties) = preSolution |
||||
|
HideSolutionNode = FALSE |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ExtensibilityGlobals) = postSolution |
||||
|
SolutionGuid = {40AAAD55-1557-4C50-8430-01D67C03FE6A} |
||||
|
EndGlobalSection |
||||
|
EndGlobal |
||||
@ -0,0 +1,264 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<ItemGroup Label="ProjectConfigurations"> |
||||
|
<ProjectConfiguration Include="Debug|Win32"> |
||||
|
<Configuration>Debug</Configuration> |
||||
|
<Platform>Win32</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
<ProjectConfiguration Include="Release|Win32"> |
||||
|
<Configuration>Release</Configuration> |
||||
|
<Platform>Win32</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
<ProjectConfiguration Include="Debug|x64"> |
||||
|
<Configuration>Debug</Configuration> |
||||
|
<Platform>x64</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
<ProjectConfiguration Include="Release|x64"> |
||||
|
<Configuration>Release</Configuration> |
||||
|
<Platform>x64</Platform> |
||||
|
</ProjectConfiguration> |
||||
|
</ItemGroup> |
||||
|
<PropertyGroup Label="Globals"> |
||||
|
<VCProjectVersion>16.0</VCProjectVersion> |
||||
|
<ProjectGuid>{FB5FF731-FE00-436C-AEF0-014ACE08D10C}</ProjectGuid> |
||||
|
<Keyword>Win32Proj</Keyword> |
||||
|
<RootNamespace>SDLHAD</RootNamespace> |
||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> |
||||
|
</PropertyGroup> |
||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||
|
<PlatformToolset>v142</PlatformToolset> |
||||
|
<CharacterSet>Unicode</CharacterSet> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||
|
<PlatformToolset>v142</PlatformToolset> |
||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
|
<CharacterSet>Unicode</CharacterSet> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||
|
<PlatformToolset>v142</PlatformToolset> |
||||
|
<CharacterSet> |
||||
|
</CharacterSet> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
||||
|
<ConfigurationType>Application</ConfigurationType> |
||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||
|
<PlatformToolset>v142</PlatformToolset> |
||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
|
<CharacterSet> |
||||
|
</CharacterSet> |
||||
|
</PropertyGroup> |
||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
|
<ImportGroup Label="ExtensionSettings"> |
||||
|
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.1.props" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="Shared"> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
</ImportGroup> |
||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
|
</ImportGroup> |
||||
|
<PropertyGroup Label="UserMacros" /> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
<LinkIncremental>true</LinkIncremental> |
||||
|
<IncludePath>C:\LIBS\SDL\SDL2\include;C:\LIBS\pthreads\include;$(IncludePath)</IncludePath> |
||||
|
<LibraryPath>C:\LIBS\SDL\SDL2\lib\x86;C:\LIBS\pthreads\lib\x86;$(LibraryPath)</LibraryPath> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
|
<LinkIncremental>true</LinkIncremental> |
||||
|
<IncludePath>C:\LIBS\CURL\include;C:\LIBS\ffmpeg\include;C:\LIBS\libconfig-1.5\include;C:\LIBS\SDL\SDL2\include;C:\LIBS\pthreads\include;$(IncludePath)</IncludePath> |
||||
|
<LibraryPath>C:\LIBS\CURL\lib\x64;C:\LIBS\openssl\x64;C:\LIBS\ffmpeg\static_lib\debug\x64;C:\LIBS\libconfig-1.5\lib\x64;C:\LIBS\SDL\SDL2\lib\x64;C:\LIBS\pthreads\lib\x64;$(LibraryPath)</LibraryPath> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
<LinkIncremental>false</LinkIncremental> |
||||
|
<IncludePath>C:\LIBS\SDL\SDL2\include;C:\LIBS\pthreads\include;$(IncludePath)</IncludePath> |
||||
|
<LibraryPath>C:\LIBS\SDL\SDL2\lib\x86;C:\LIBS\pthreads\lib\x86;$(LibraryPath)</LibraryPath> |
||||
|
</PropertyGroup> |
||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
|
<LinkIncremental>false</LinkIncremental> |
||||
|
<LibraryPath>C:\LIBS\CURL\lib\x64;C:\LIBS\openssl\x64;C:\LIBS\ffmpeg\static_lib\release\x64;C:\LIBS\libconfig-1.5\lib\x64;C:\LIBS\SDL\SDL2\lib\x64;C:\LIBS\pthreads\lib\x64;$(LibraryPath)</LibraryPath> |
||||
|
<IncludePath>C:\LIBS\CURL\include;C:\LIBS\ffmpeg\include;C:\LIBS\libconfig-1.5\include;C:\LIBS\SDL\SDL2\include;C:\LIBS\pthreads\include;C:\LIBS\pthreads\include;$(IncludePath)</IncludePath> |
||||
|
</PropertyGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader> |
||||
|
</PrecompiledHeader> |
||||
|
<WarningLevel>Level3</WarningLevel> |
||||
|
<Optimization>Disabled</Optimization> |
||||
|
<SDLCheck>true</SDLCheck> |
||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;HAVE_STRUCT_TIMESPEC;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<ConformanceMode>true</ConformanceMode> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader> |
||||
|
</PrecompiledHeader> |
||||
|
<WarningLevel>Level3</WarningLevel> |
||||
|
<Optimization>Disabled</Optimization> |
||||
|
<SDLCheck>true</SDLCheck> |
||||
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_SDL_;HAVE_STRUCT_TIMESPEC;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;____VC_EXTRALEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<ConformanceMode>true</ConformanceMode> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
<AdditionalDependencies>SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_image.lib;SDL2_mixer.lib;SDL2_net.lib;SDL2_ttf.lib;libcurl_a_debug.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
|
<OptimizeReferences>false</OptimizeReferences> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader> |
||||
|
</PrecompiledHeader> |
||||
|
<WarningLevel>Level3</WarningLevel> |
||||
|
<Optimization>MaxSpeed</Optimization> |
||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
|
<SDLCheck>true</SDLCheck> |
||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;HAVE_STRUCT_TIMESPEC;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<ConformanceMode>true</ConformanceMode> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
|
<ClCompile> |
||||
|
<PrecompiledHeader> |
||||
|
</PrecompiledHeader> |
||||
|
<WarningLevel>Level3</WarningLevel> |
||||
|
<Optimization>MaxSpeed</Optimization> |
||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
|
<SDLCheck>false</SDLCheck> |
||||
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_SDL_;HAVE_STRUCT_TIMESPEC;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;____VC_EXTRALEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
|
<ConformanceMode>true</ConformanceMode> |
||||
|
</ClCompile> |
||||
|
<Link> |
||||
|
<SubSystem>Windows</SubSystem> |
||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||
|
<AdditionalDependencies>SDL2.lib;SDL2main.lib;SDL2test.lib;SDL2_image.lib;SDL2_mixer.lib;SDL2_net.lib;SDL2_ttf.lib;libcurl_a.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||
|
</Link> |
||||
|
</ItemDefinitionGroup> |
||||
|
<ItemGroup> |
||||
|
<ClInclude Include="..\..\lib\alg\generic\md5.h" /> |
||||
|
<ClInclude Include="..\..\lib\components\base\basicLIBAV.h" /> |
||||
|
<ClInclude Include="..\..\lib\components\base\basicMediaDestination.h" /> |
||||
|
<ClInclude Include="..\..\lib\components\base\basicMediaSource.h" /> |
||||
|
<ClInclude Include="..\..\lib\components\object\objectFlyHunter.h" /> |
||||
|
<ClInclude Include="..\..\lib\data\curl\curlRequest.h" /> |
||||
|
<ClInclude Include="..\..\lib\data\curl\curlRequestsManager.h" /> |
||||
|
<ClInclude Include="..\..\lib\data\media\video\videoAVLIBSource.h" /> |
||||
|
<ClInclude Include="..\..\lib\data\protocol\protocolMAVLINK.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreDecoration.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreElement.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreLabel.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreLayout.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreOpenGLWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreSprite.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreStyleTemplate.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreYUV420P_Widget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\elements\animatedSprite.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\gui_sdl.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\joystickWrapper.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\buttonWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\comboWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\flyHunterWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\logWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\OSDWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\progressBar.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\scrollListWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\simpleButtonWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\simplePanelWidget.h" /> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\videoWidget.h" /> |
||||
|
<ClInclude Include="framework.h" /> |
||||
|
<ClInclude Include="Resource.h" /> |
||||
|
<ClInclude Include="SDL_HAD.h" /> |
||||
|
<ClInclude Include="targetver.h" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ClCompile Include="..\..\lib\alg\generic\md5.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\alg\generic\Transform.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\alg\generic\utm.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicDualThread.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicFunctionality.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicLIBAV.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicLogCollection.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicLoggingService.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicMediaDestination.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicMediaSource.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicObject.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicPosition.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicRing.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicSettings.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicSettingsProvider.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicThread.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicTransport.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicVideoSource.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\object\objectFileLoggingService.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\components\object\objectFlyHunter.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\data\curl\curlRequest.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\data\curl\curlRequestsManager.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\data\media\video\videoAVLIBSource.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\data\protocol\protocol.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\data\protocol\protocolMAVLINK.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\data\transport\transportSerial.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\hardware\uart\serialPort.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreDecoration.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreElement.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreLabel.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreOpenGLWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreSprite.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreYUV420P_Widget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\elements\animatedSprite.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\gui_sdl.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\joystickWrapper.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\buttonWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\comboWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\flyHunterWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\logWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\OSDWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\scrollListWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\simpleButtonWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\simplePanelWidget.cpp" /> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\videoWidget.cpp" /> |
||||
|
<ClCompile Include="SDL_HAD.cpp" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ResourceCompile Include="SDL_HAD.rc" /> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<Image Include="SDL_HAD.ico" /> |
||||
|
<Image Include="small.ico" /> |
||||
|
</ItemGroup> |
||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
|
<ImportGroup Label="ExtensionTargets"> |
||||
|
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 10.1.targets" /> |
||||
|
</ImportGroup> |
||||
|
</Project> |
||||
@ -0,0 +1,280 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<ItemGroup> |
||||
|
<Filter Include="Source Files"> |
||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> |
||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> |
||||
|
</Filter> |
||||
|
<Filter Include="Header Files"> |
||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> |
||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions> |
||||
|
</Filter> |
||||
|
<Filter Include="Resource Files"> |
||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> |
||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> |
||||
|
</Filter> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ClInclude Include="framework.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="targetver.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="Resource.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="SDL_HAD.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\buttonWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\logWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\progressBar.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreLabel.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreStyleTemplate.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\gui_sdl.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreSprite.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreElement.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\elements\animatedSprite.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\alg\generic\md5.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreDecoration.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\components\object\objectFlyHunter.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\videoWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\components\base\basicMediaDestination.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\data\media\video\videoAVLIBSource.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\components\base\basicLIBAV.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\components\base\basicMediaSource.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreYUV420P_Widget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\comboWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\joystickWrapper.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\scrollListWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\data\protocol\protocolMAVLINK.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreLayout.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\OSDWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\flyHunterWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\data\curl\curlRequestsManager.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\data\curl\curlRequest.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\core\coreOpenGLWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\simpleButtonWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
<ClInclude Include="..\..\lib\sdl\widgets\simplePanelWidget.h"> |
||||
|
<Filter>Header Files</Filter> |
||||
|
</ClInclude> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ClCompile Include="SDL_HAD.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicThread.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicLogCollection.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicFunctionality.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicRing.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\gui_sdl.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreLabel.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\buttonWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\logWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicLoggingService.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreSprite.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreElement.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\elements\animatedSprite.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\alg\generic\md5.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreDecoration.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\data\protocol\protocol.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\data\protocol\protocolMAVLINK.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\data\transport\transportSerial.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\hardware\uart\serialPort.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicSettings.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicSettingsProvider.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicTransport.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicDualThread.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\object\objectFlyHunter.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicObject.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\videoWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicLIBAV.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicVideoSource.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\data\media\video\videoAVLIBSource.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicMediaDestination.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicMediaSource.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreYUV420P_Widget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\comboWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\base\basicPosition.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\alg\generic\utm.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\alg\generic\Transform.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\components\object\objectFileLoggingService.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\joystickWrapper.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\scrollListWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\OSDWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\flyHunterWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\data\curl\curlRequest.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\data\curl\curlRequestsManager.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\core\coreOpenGLWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\simpleButtonWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
<ClCompile Include="..\..\lib\sdl\widgets\simplePanelWidget.cpp"> |
||||
|
<Filter>Source Files</Filter> |
||||
|
</ClCompile> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ResourceCompile Include="SDL_HAD.rc"> |
||||
|
<Filter>Resource Files</Filter> |
||||
|
</ResourceCompile> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<Image Include="small.ico"> |
||||
|
<Filter>Resource Files</Filter> |
||||
|
</Image> |
||||
|
<Image Include="SDL_HAD.ico"> |
||||
|
<Filter>Resource Files</Filter> |
||||
|
</Image> |
||||
|
</ItemGroup> |
||||
|
</Project> |
||||
@ -0,0 +1,4 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<PropertyGroup /> |
||||
|
</Project> |
||||
|
After Width: 1040 | Height: 807 | Size: 202 KiB |
5
Projects/SDL_HAD/black-gradient-glow-hexagon-white-cyan-1920x1080-c4-0f4148-ffffff-040a0b-000000-l2-2-29-a-40-f-6.svg
File diff suppressed because it is too large
View File
|
After Width: 640 | Height: 640 | Size: 27 KiB |
|
After Width: 203 | Height: 146 | Size: 4.3 KiB |
|
After Width: 256 | Height: 256 | Size: 44 KiB |
1
Projects/SDL_HAD/drop-shadow-beehive-blue-black-hexagon-1920x1080-c2-1e90ff-000000-l4-8-136-15-9-a2-10-45-f-7.svg
File diff suppressed because it is too large
View File
|
After Width: 256 | Height: 256 | Size: 60 KiB |
|
After Width: 293 | Height: 214 | Size: 16 KiB |
@ -0,0 +1,15 @@ |
|||||
|
// header.h : include file for standard system include files, |
||||
|
// or project specific include files |
||||
|
// |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include "targetver.h" |
||||
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers |
||||
|
// Windows Header Files |
||||
|
#include <windows.h> |
||||
|
// C RunTime Header Files |
||||
|
#include <stdlib.h> |
||||
|
#include <malloc.h> |
||||
|
#include <memory.h> |
||||
|
#include <tchar.h> |
||||
|
After Width: 256 | Height: 256 | Size: 50 KiB |
|
After Width: 32 | Height: 32 | Size: 3.9 KiB |
1
Projects/SDL_HAD/hexagon-cyan-beehive-drop-shadow-1920x1080-c2-216870-0d1c1e-l4-10-128-16-6-a2-5-45-f-7.svg
File diff suppressed because it is too large
View File
|
After Width: 1920 | Height: 1080 | Size: 242 KiB |
|
After Width: 225 | Height: 225 | Size: 5.9 KiB |
|
After Width: 225 | Height: 225 | Size: 5.0 KiB |
|
After Width: 225 | Height: 225 | Size: 6.3 KiB |
|
After Width: 225 | Height: 225 | Size: 14 KiB |
|
After Width: 509 | Height: 339 | Size: 65 KiB |
|
After Width: 480 | Height: 48 | Size: 6.3 KiB |
@ -0,0 +1 @@ |
|||||
|
ffmpeg -list_devices true -f dshow -i dummy |
||||
|
After Width: 1280 | Height: 720 | Size: 125 KiB |
|
After Width: 1920 | Height: 1080 | Size: 158 KiB |
|
After Width: 1920 | Height: 1080 | Size: 242 KiB |
|
After Width: 192 | Height: 46 | Size: 3.2 KiB |
@ -0,0 +1,6 @@ |
|||||
|
#pragma once |
||||
|
|
||||
|
// // Including SDKDDKVer.h defines the highest available Windows platform. |
||||
|
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and |
||||
|
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. |
||||
|
#include <SDKDDKVer.h> |
||||
|
After Width: 1920 | Height: 1200 | Size: 328 KiB |
|
After Width: 600 | Height: 300 | Size: 40 KiB |
5
Projects/SDL_HAD/white-hexagon-blue-gradient-glow-black-1920x1080-c4-000000-ffffff-00ced1-000000-l2-10-124-a-45-f-6.svg
File diff suppressed because it is too large
View File
@ -0,0 +1,47 @@ |
|||||
|
|
||||
|
Microsoft Visual Studio Solution File, Format Version 12.00 |
||||
|
# Visual Studio Version 16 |
||||
|
VisualStudioVersion = 16.0.29418.71 |
||||
|
MinimumVisualStudioVersion = 10.0.40219.1 |
||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cortex_test", "Projects\Cortex_test\cortex_test_2019.vcxproj", "{CB0601AE-A104-40CF-83D1-DA66736E8322}" |
||||
|
EndProject |
||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Win32-QT-gui-application_2019", "Projects\QT-Gui-App\Win32-QT-gui-application_2019.vcxproj", "{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}" |
||||
|
EndProject |
||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL_HAD", "Projects\SDL_HAD\SDL_HAD.vcxproj", "{FB5FF731-FE00-436C-AEF0-014ACE08D10C}" |
||||
|
EndProject |
||||
|
Global |
||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
|
Debug|x64 = Debug|x64 |
||||
|
Debug|x86 = Debug|x86 |
||||
|
Release|x64 = Release|x64 |
||||
|
Release|x86 = Release|x86 |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
|
{CB0601AE-A104-40CF-83D1-DA66736E8322}.Debug|x64.ActiveCfg = Debug|Win32 |
||||
|
{CB0601AE-A104-40CF-83D1-DA66736E8322}.Debug|x86.ActiveCfg = Debug|Win32 |
||||
|
{CB0601AE-A104-40CF-83D1-DA66736E8322}.Debug|x86.Build.0 = Debug|Win32 |
||||
|
{CB0601AE-A104-40CF-83D1-DA66736E8322}.Release|x64.ActiveCfg = Release|Win32 |
||||
|
{CB0601AE-A104-40CF-83D1-DA66736E8322}.Release|x86.ActiveCfg = Release|Win32 |
||||
|
{CB0601AE-A104-40CF-83D1-DA66736E8322}.Release|x86.Build.0 = Release|Win32 |
||||
|
{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}.Debug|x64.ActiveCfg = Debug|Win32 |
||||
|
{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}.Debug|x86.ActiveCfg = Debug|Win32 |
||||
|
{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}.Debug|x86.Build.0 = Debug|Win32 |
||||
|
{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}.Release|x64.ActiveCfg = Release|Win32 |
||||
|
{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}.Release|x86.ActiveCfg = Release|Win32 |
||||
|
{5F60E152-44A4-44FF-8B0E-5CECE9454C2F}.Release|x86.Build.0 = Release|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x64.ActiveCfg = Debug|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x64.Build.0 = Debug|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x86.ActiveCfg = Debug|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Debug|x86.Build.0 = Debug|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x64.ActiveCfg = Release|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x64.Build.0 = Release|x64 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x86.ActiveCfg = Release|Win32 |
||||
|
{FB5FF731-FE00-436C-AEF0-014ACE08D10C}.Release|x86.Build.0 = Release|Win32 |
||||
|
EndGlobalSection |
||||
|
GlobalSection(SolutionProperties) = preSolution |
||||
|
HideSolutionNode = FALSE |
||||
|
EndGlobalSection |
||||
|
GlobalSection(ExtensibilityGlobals) = postSolution |
||||
|
SolutionGuid = {9261EC15-9830-4F88-A73B-8FD5F7390495} |
||||
|
EndGlobalSection |
||||
|
EndGlobal |
||||
@ -1,12 +1 @@ |
|||||
#include "basicMediaSource.h"
|
#include "basicMediaSource.h"
|
||||
|
|
||||
/*
|
|
||||
bool basicMediaSource::attachBus( mediaBus *Bus ){ |
|
||||
if( Bus != NULL ){ |
|
||||
Bus->connectSource(); |
|
||||
m_vCorossBar.push_back( Bus ); |
|
||||
return true; |
|
||||
}; |
|
||||
return false; |
|
||||
}; |
|
||||
*/ |
|
||||
@ -1,58 +1,42 @@ |
|||||
#ifndef __BASICMEDIASOURCE_H_INCL__ |
#ifndef __BASICMEDIASOURCE_H_INCL__ |
||||
#define __BASICMEDIASOURCE_H_INCL__ |
#define __BASICMEDIASOURCE_H_INCL__ |
||||
|
|
||||
#include <opencv2/opencv.hpp> |
|
||||
#include "basicMediaDestination.h" |
#include "basicMediaDestination.h" |
||||
#include "basicThread.h" |
|
||||
|
|
||||
|
|
||||
/** |
/** |
||||
* TODO: Add class description |
* TODO: Add class description |
||||
* |
* |
||||
* @author Gagua |
* @author Gagua |
||||
*/ |
*/ |
||||
class basicMediaSource : public basicThread { |
|
||||
private: |
|
||||
protected: |
|
||||
//mediaPorts m_vCorossBar; |
|
||||
basicMediaDestination *m_pMediaDestination; |
|
||||
MediaStateStatus m_eMediaStatus; |
|
||||
bool m_bStreamingSource; |
|
||||
public: |
|
||||
// Constructor |
|
||||
basicMediaSource(); |
|
||||
|
|
||||
// Destructor |
|
||||
virtual ~basicMediaSource(); |
|
||||
|
|
||||
bool attachDestination(basicMediaDestination *Viewer){ |
|
||||
if (Viewer != NULL){ |
|
||||
m_pMediaDestination = Viewer; |
|
||||
return true; |
|
||||
|
class basicMediaSource { |
||||
|
private: |
||||
|
protected: |
||||
|
basicMediaDestination *m_pMediaDestination; |
||||
|
MediaStateStatus m_eMediaStatus; |
||||
|
bool m_bStreamingSource; |
||||
|
public: |
||||
|
basicMediaSource(); |
||||
|
virtual ~basicMediaSource(); |
||||
|
bool attachDestination(basicMediaDestination *Viewer){ |
||||
|
if (Viewer != NULL){ |
||||
|
m_pMediaDestination = Viewer; |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
}; |
}; |
||||
return false; |
|
||||
}; |
|
||||
void setStreaming(bool T){ m_bStreamingSource = T; }; |
|
||||
virtual bool _stop(void){ return true; }; |
|
||||
MediaStateStatus getStatus( void ){ return m_eMediaStatus;}; |
|
||||
// Copy constructor |
|
||||
// TODO: Uncomment the copy constructor when you need it. |
|
||||
//basicMediaSource(const basicMediaSource& src); |
|
||||
|
|
||||
// Assignment operator |
|
||||
// TODO: Uncomment the assignment operator when you need it. |
|
||||
//basicMediaSource& operator=(const basicMediaSource& src); |
|
||||
|
void setStreaming(bool T){ m_bStreamingSource = T; }; |
||||
|
virtual bool _stop(void){ return true; }; |
||||
|
MediaStateStatus getStatus( void ){ return m_eMediaStatus;}; |
||||
}; |
}; |
||||
|
|
||||
// Constructor implementation |
|
||||
inline basicMediaSource::basicMediaSource(): basicThread(){ |
|
||||
|
inline basicMediaSource::basicMediaSource(){ |
||||
|
m_bStreamingSource = true; |
||||
m_pMediaDestination = NULL; |
m_pMediaDestination = NULL; |
||||
m_eMediaStatus = MS_UNDEFINED; |
m_eMediaStatus = MS_UNDEFINED; |
||||
} |
|
||||
|
}; |
||||
|
|
||||
// Destructor implementation |
|
||||
inline basicMediaSource::~basicMediaSource(){ |
|
||||
} |
|
||||
|
inline basicMediaSource::~basicMediaSource() { |
||||
|
}; |
||||
|
|
||||
typedef vector<basicMediaSource *> mediaSourceCollection; |
typedef vector<basicMediaSource *> mediaSourceCollection; |
||||
|
|
||||
|
|||||
@ -0,0 +1,683 @@ |
|||||
|
#include "objectFlyHunter.h"
|
||||
|
|
||||
|
#define LOG( X ) m_pLog->Log( "FlyHunter", this, X )
|
||||
|
#define LOG_ERROR( X ) m_pLog->Log( "FlyHunter", this, _LOG_ERROR, X )
|
||||
|
|
||||
|
|
||||
|
objectFlyHunter::objectFlyHunter(config_setting_t* Settings):basicObject(){ |
||||
|
m_pLog = basicLogCollection::getInstance(); |
||||
|
updateOrientation = NULL; |
||||
|
m_bArmed = false; |
||||
|
m_eCurrentMode = FH_NO_CONNECTION; |
||||
|
m_bUAV_type = -1; |
||||
|
m_bUAV_ctrl = -1; |
||||
|
m_bUAV_bMODE = 0; |
||||
|
m_nUAV_cMODE = 0; |
||||
|
m_pSettings = basicSettingsProvider::getInstance()->getSubNode(Settings, (CSTR)"FLY_HUNTER"); |
||||
|
m_pProtocol = new protocolMAVLINK(m_pSettings); |
||||
|
if (m_pSettings != NULL) { |
||||
|
config_setting_t * pSetting; |
||||
|
double tVal1, tVal2, tVal3; |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_LAT"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_LAT", CONFIG_TYPE_FLOAT); |
||||
|
tVal1 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal1); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal1 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_LON"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_LON", CONFIG_TYPE_FLOAT); |
||||
|
tVal2 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal2); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal2 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_ALT"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_ALT", CONFIG_TYPE_FLOAT); |
||||
|
tVal3 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal3); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal3 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
m_oPosition.setPositionWGS84(tVal1, tVal2, tVal3); |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_ROLL"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_ROLL", CONFIG_TYPE_FLOAT); |
||||
|
tVal1 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal1); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal1 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_PITCH"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_PITCH", CONFIG_TYPE_FLOAT); |
||||
|
tVal2 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal2); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal2 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_YAW"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_YAW", CONFIG_TYPE_FLOAT); |
||||
|
tVal3 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal3); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal3 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
m_oPosition.setOrientationDeg(tVal1, tVal2, tVal3); |
||||
|
pSetting = config_setting_get_member(m_pSettings, "LAST_POSITION_SPEED"); |
||||
|
if (pSetting == NULL) { |
||||
|
pSetting = config_setting_add(m_pSettings, "LAST_POSITION_SPEED", CONFIG_TYPE_FLOAT); |
||||
|
tVal1 = 0.; |
||||
|
if (pSetting != NULL) { |
||||
|
config_setting_set_float(pSetting, tVal1); |
||||
|
basicSettingsProvider::getInstance()->compromise(); |
||||
|
}; |
||||
|
} else { |
||||
|
tVal1 = config_setting_get_float(pSetting); |
||||
|
}; |
||||
|
m_oPosition.setSpeed(tVal1); |
||||
|
basicSettingsProvider::getInstance()->validate(); |
||||
|
} else { |
||||
|
// Set Default settings
|
||||
|
m_oPosition.setPositionWGS84(0.f, 0.f); |
||||
|
m_oPosition.setOrientationDeg(0.f, 0.f, 0.f); |
||||
|
m_oPosition.setSpeed(0.f); |
||||
|
}; |
||||
|
}; |
||||
|
|
||||
|
objectFlyHunter::~objectFlyHunter() { |
||||
|
basicThread::waitThreadEnd(true); |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::cerate() { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if( m_pProtocol->create() ) rV = basicThread::init(); |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::flyToWGS84(float lat, float lon, float alt) { |
||||
|
return true; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::isVehicleAttached() { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
rV = m_pProtocol->m_bUAV_Online; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
bool objectFlyHunter::isPairingDone() { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
rV = m_pProtocol->m_bPairingFinished; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
bool objectFlyHunter::connectVia(CSTR a) { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol->setUartDevice(a)) { |
||||
|
delete(m_pProtocol); |
||||
|
m_pProtocol = new protocolMAVLINK(m_pSettings); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
rV = m_pProtocol->create(); |
||||
|
}; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::isRadiosConnected(void) { |
||||
|
return (m_eCurrentMode > FH_NO_CONNECTION); |
||||
|
}; |
||||
|
|
||||
|
/**
|
||||
|
* @param value battery voltage |
||||
|
*/ |
||||
|
double objectFlyHunter::filterVoltage(double value) const { |
||||
|
return m_dLpfVoltage * 0.6f + value * 0.4f; |
||||
|
}; |
||||
|
|
||||
|
void objectFlyHunter::m_fThreadProc(void) { |
||||
|
FH_COMMAND * pCMD = NULL; |
||||
|
|
||||
|
m_bThreadStatus = TH_WORKING; |
||||
|
while (m_bThreadStatus < TH_ENDED) { |
||||
|
if (m_qQueuedCommands.size()) { |
||||
|
pCMD = m_qQueuedCommands.front(); |
||||
|
} else pCMD = NULL; |
||||
|
if (m_pProtocol->getConnectionStatus() == CS_DISCONNECTED) { |
||||
|
m_eCurrentMode = FH_CONNECTION_ERROR; |
||||
|
}; |
||||
|
switch (m_eCurrentMode) { |
||||
|
case FH_CONNECTION_ERROR: break; |
||||
|
case FH_NO_CONNECTION: |
||||
|
if (m_pProtocol->getConnectionStatus() == CS_CONNECTED) m_eCurrentMode = FH_WAIT_FOR_UAV; |
||||
|
break; |
||||
|
case FH_WAIT_FOR_UAV: |
||||
|
if (m_pProtocol->m_bPairingFinished) m_eCurrentMode = FH_MODE_PREFLIGHT; |
||||
|
break; |
||||
|
case FH_MODE_PREFLIGHT: |
||||
|
if (pCMD != NULL) { |
||||
|
switch (pCMD->type) { |
||||
|
case FH_CMD_SET_BASE_MODE: |
||||
|
if (pCMD->data != NULL) { |
||||
|
uint8_t tMode; |
||||
|
tMode = m_bUAV_bMODE | *((uint8_t*)pCMD->data); |
||||
|
m_pProtocol->broadcastSetBaseMode(tMode); |
||||
|
}; |
||||
|
break; |
||||
|
case FH_CMD_SET_AP_MODE: |
||||
|
if (pCMD->data != NULL) { |
||||
|
uint32_t tMode; |
||||
|
tMode = m_bUAV_bMODE | *((uint32_t*)pCMD->data); |
||||
|
m_pProtocol->broadcastSetCustomMode(tMode); |
||||
|
}; |
||||
|
break; |
||||
|
case FH_CMD_FORCE_ARM: { |
||||
|
m_pProtocol->broadcastArm(true,true); |
||||
|
m_eCurrentMode = FH_MODE_ARMING; |
||||
|
break; |
||||
|
}; |
||||
|
case FH_CMD_ARM: { |
||||
|
m_pProtocol->broadcastArm(true); |
||||
|
m_eCurrentMode = FH_MODE_ARMING; |
||||
|
break; |
||||
|
}; |
||||
|
case FH_CMD_DISARM: { |
||||
|
//?? Why at preflight mode!!
|
||||
|
m_pProtocol->broadcastArm(false); |
||||
|
m_eCurrentMode = FH_MODE_DISARMING; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
case FH_MODE_ARMING: |
||||
|
if (m_pProtocol->getLastCmdStatus() > -1) { |
||||
|
if (m_pProtocol->getLastCmdStatus() == MAV_RESULT_ACCEPTED) { |
||||
|
m_eCurrentMode = FH_MODE_ARMED; |
||||
|
} else { |
||||
|
m_eCurrentMode = FH_MODE_PREFLIGHT; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
case FH_MODE_ARMED: |
||||
|
if (pCMD != NULL) { |
||||
|
switch (pCMD->type) { |
||||
|
case FH_CMD_SET_BASE_MODE: |
||||
|
if (pCMD->data != NULL) { |
||||
|
uint8_t tMode; |
||||
|
tMode = m_bUAV_bMODE | *((uint8_t*)pCMD->data); |
||||
|
m_pProtocol->setMode(tMode); |
||||
|
}; |
||||
|
break; |
||||
|
case FH_CMD_SET_AP_MODE: |
||||
|
if (pCMD->data != NULL) { |
||||
|
uint32_t tMode; |
||||
|
tMode = m_bUAV_bMODE | *((uint32_t*)pCMD->data); |
||||
|
m_pProtocol->broadcastSetCustomMode(tMode); |
||||
|
}; |
||||
|
break; |
||||
|
case FH_CMD_ARM: { |
||||
|
//?? Why at ARMED mode!!
|
||||
|
m_pProtocol->broadcastArm(true); |
||||
|
m_eCurrentMode = FH_MODE_ARMING; |
||||
|
break; |
||||
|
}; |
||||
|
case FH_CMD_DISARM: { |
||||
|
m_pProtocol->broadcastArm(false); |
||||
|
m_eCurrentMode = FH_MODE_DISARMING; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
case FH_MODE_DISARMING: |
||||
|
break; |
||||
|
}; |
||||
|
if (m_eCurrentMode > FH_WAIT_FOR_UAV) { |
||||
|
// Update statuses
|
||||
|
m_bUAV_type = m_pProtocol->m_sHeartBit.type; |
||||
|
m_bUAV_ctrl = m_pProtocol->m_sHeartBit.autopilot; |
||||
|
m_bUAV_bMODE = m_pProtocol->m_sHeartBit.base_mode; |
||||
|
|
||||
|
m_nUAV_cMODE = m_pProtocol->m_sHeartBit.custom_mode; |
||||
|
// if Position Accurate
|
||||
|
float roll = 0.f, pitch = 0.f, yaw = 0.f; |
||||
|
roll = m_pProtocol->m_sAttitude.roll; |
||||
|
pitch = m_pProtocol->m_sAttitude.pitch; |
||||
|
yaw = m_pProtocol->m_sAttitude.yaw; |
||||
|
m_oPosition.setOrientationRad(roll, pitch, yaw); |
||||
|
if (updateOrientation != NULL) updateOrientation(m_oPosition.getRotX_deg(), m_oPosition.getRotY_deg(), m_oPosition.getRotZ_deg()); |
||||
|
}; |
||||
|
if (pCMD != NULL) { |
||||
|
if (pCMD->data != NULL)free(pCMD->data); |
||||
|
m_qQueuedCommands.pop(); |
||||
|
}; |
||||
|
//Update Data FROM UAV
|
||||
|
if ( m_pProtocol->m_bSystemStatusDataActual ) { |
||||
|
m_pProtocol->m_bSystemStatusDataActual = false; |
||||
|
// Prepare for sending data to the realtime plotter, which is every field excluding onboard_control_sensors_present.
|
||||
|
//quint64 time = getUnixTime();
|
||||
|
//emit valueChanged(uasId, statusName().arg("Sensors Enabled"), "bits", state.onboard_control_sensors_enabled, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Sensors Health"), "bits", state.onboard_control_sensors_health, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Comms Errors"), "-", state.errors_comm, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Errors Count 1"), "-", state.errors_count1, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Errors Count 2"), "-", state.errors_count2, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Errors Count 3"), "-", state.errors_count3, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Errors Count 4"), "-", state.errors_count4, time);
|
||||
|
|
||||
|
// Process CPU load.
|
||||
|
//emit loadChanged(this, m_sSystemStatus.load / 10.0);
|
||||
|
//emit valueChanged(uasId, statusName().arg("CPU Load"), "%", m_sSystemStatus.load / 10.0, time);
|
||||
|
|
||||
|
// Battery charge/time remaining/voltage calculations
|
||||
|
double currentVoltage = m_pProtocol->m_sSystemStatus.voltage_battery / 1000.0; |
||||
|
double lpVoltage = filterVoltage(currentVoltage); |
||||
|
// tickLowpassVoltage = tickLowpassVoltage * 0.8 + 0.2 * currentVoltage;
|
||||
|
|
||||
|
// We don't want to tick above the threshold
|
||||
|
// if (tickLowpassVoltage > tickVoltage) {
|
||||
|
// lastTickVoltageValue = tickLowpassVoltage;
|
||||
|
// };
|
||||
|
|
||||
|
// if ((startVoltage > 0.0) && (tickLowpassVoltage < tickVoltage) && (fabs(lastTickVoltageValue - tickLowpassVoltage) > 0.1)
|
||||
|
/* warn if lower than treshold */ |
||||
|
// && (lpVoltage < tickVoltage)
|
||||
|
/* warn only if we have at least the voltage of an empty LiPo cell, else we're sampling something wrong */ |
||||
|
// && (currentVoltage > 3.3)
|
||||
|
/* warn only if current voltage is really still lower by a reasonable amount */ |
||||
|
// && ((currentVoltage - 0.2) < tickVoltage)
|
||||
|
/* warn only every 12 seconds */ |
||||
|
// && (QGC::groundTimeUsecs() - lastVoltageWarning) > 12000000)
|
||||
|
// {
|
||||
|
//GAudioOutput::instance()->say(QString("voltage warning: %1 volts").arg(lpVoltage, 0, 'f', 1, QChar(' ')));
|
||||
|
// lastVoltageWarning = QGC::groundTimeUsecs();
|
||||
|
// lastTickVoltageValue = tickLowpassVoltage;
|
||||
|
// }
|
||||
|
|
||||
|
// if (startVoltage == -1.0 && currentVoltage > 0.1) startVoltage = currentVoltage;
|
||||
|
// timeRemaining = calculateTimeRemaining();
|
||||
|
// if (!batteryRemainingEstimateEnabled && chargeLevel != -1)
|
||||
|
// {
|
||||
|
// chargeLevel = m_pProtocol->m_sSystemStatus.battery_remaining;
|
||||
|
// }
|
||||
|
|
||||
|
//emit batteryChanged(this, lpVoltage, currentCurrent, getChargeLevel(), timeRemaining);
|
||||
|
// emit voltageChanged(message.sysid, currentVoltage);
|
||||
|
|
||||
|
//emit valueChanged(uasId, statusName().arg("Battery"), "%", m_sSystemStatus.battery_remaining, time);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Voltage"), "V", m_sSystemStatus.voltage_battery / 1000.0, time);
|
||||
|
|
||||
|
// And if the battery current draw is measured, log that also.
|
||||
|
// if (m_sSystemStatus.current_battery != -1)
|
||||
|
// {
|
||||
|
// currentCurrent = ((double)m_sSystemStatus.current_battery) / 100.0;
|
||||
|
//emit valueChanged(uasId, statusName().arg("Current"), "A", currentCurrent, time);
|
||||
|
// }
|
||||
|
|
||||
|
// LOW BATTERY ALARM
|
||||
|
// if (lpVoltage < warnVoltage && (currentVoltage - 0.2) < warnVoltage && (currentVoltage > 3.3))
|
||||
|
// {
|
||||
|
// An audio alarm. Does not generate any signals.
|
||||
|
// startLowBattAlarm();
|
||||
|
// }
|
||||
|
// else
|
||||
|
// {
|
||||
|
// stopLowBattAlarm();
|
||||
|
// }
|
||||
|
|
||||
|
// control_sensors_enabled:
|
||||
|
// relevant bits: 11: attitude stabilization, 12: yaw position, 13: z/altitude control, 14: x/y position control
|
||||
|
//emit attitudeControlEnabled(m_sSystemStatus.onboard_control_sensors_enabled & (1 << 11));
|
||||
|
//emit positionYawControlEnabled(m_sSystemStatus.onboard_control_sensors_enabled & (1 << 12));
|
||||
|
//emit positionZControlEnabled(m_sSystemStatus.onboard_control_sensors_enabled & (1 << 13));
|
||||
|
//emit positionXYControlEnabled(m_sSystemStatus.onboard_control_sensors_enabled & (1 << 14));
|
||||
|
|
||||
|
// Trigger drop rate updates as needed. Here we convert the incoming
|
||||
|
// drop_rate_comm value from 1/100 of a percent in a uint16 to a true
|
||||
|
// percentage as a float. We also cap the incoming value at 100% as defined
|
||||
|
// by the MAVLink specifications.
|
||||
|
// if (m_sSystemStatus.drop_rate_comm > 10000) {
|
||||
|
// m_sSystemStatus.drop_rate_comm = 10000;
|
||||
|
// };
|
||||
|
//emit dropRateChanged(this->getUASID(), m_sSystemStatus.drop_rate_comm / 100.0);
|
||||
|
//emit valueChanged(uasId, statusName().arg("Comms Drop Rate"), "%", m_sSystemStatus.drop_rate_comm / 100.0, time);
|
||||
|
} |
||||
|
SLEEP(20); |
||||
|
}; |
||||
|
}; |
||||
|
|
||||
|
CSTR objectFlyHunter::getVehicleName() { |
||||
|
if ( m_eCurrentMode > FH_WAIT_FOR_UAV ) { |
||||
|
switch (m_bUAV_type) { |
||||
|
case MAV_TYPE_GENERIC: return (CSTR)"Generic micro air vehicle"; |
||||
|
case MAV_TYPE_FIXED_WING: return (CSTR)"Fixed wing aircraft."; |
||||
|
case MAV_TYPE_QUADROTOR: return (CSTR)"Quadrotor"; |
||||
|
case MAV_TYPE_COAXIAL: return (CSTR)"Coaxial helicopter"; |
||||
|
case MAV_TYPE_HELICOPTER: return (CSTR)"Normal helicopter with tail rotor."; |
||||
|
case MAV_TYPE_ANTENNA_TRACKER: return (CSTR)"Ground installation"; |
||||
|
case MAV_TYPE_GCS: return (CSTR)"Operator control unit / ground control station"; |
||||
|
case MAV_TYPE_AIRSHIP: return (CSTR)"Airship, controlled"; |
||||
|
case MAV_TYPE_FREE_BALLOON: return (CSTR)"Free balloon, uncontrolled"; |
||||
|
case MAV_TYPE_ROCKET: return (CSTR)"Rocket"; |
||||
|
case MAV_TYPE_GROUND_ROVER: return (CSTR)"Ground rover"; |
||||
|
case MAV_TYPE_SURFACE_BOAT: return (CSTR)"Surface vessel, boat, ship"; |
||||
|
case MAV_TYPE_SUBMARINE: return (CSTR)"Submarine"; |
||||
|
case MAV_TYPE_HEXAROTOR: return (CSTR)"Hexarotor"; |
||||
|
case MAV_TYPE_OCTOROTOR: return (CSTR)"Octorotor"; |
||||
|
case MAV_TYPE_TRICOPTER: return (CSTR)"Tricopter"; |
||||
|
case MAV_TYPE_FLAPPING_WING: return (CSTR)"Flapping wing"; |
||||
|
case MAV_TYPE_KITE: return (CSTR)"Kite"; |
||||
|
case MAV_TYPE_ONBOARD_CONTROLLER: return (CSTR)"Onboard companion controller"; |
||||
|
case MAV_TYPE_VTOL_DUOROTOR: return (CSTR)"Two-rotor VTOL using control surfaces in vertical operation in addition. Tailsitter."; |
||||
|
case MAV_TYPE_VTOL_QUADROTOR: return (CSTR)"Quad-rotor VTOL using a V-shaped quad config in vertical operation. Tailsitter."; |
||||
|
case MAV_TYPE_VTOL_TILTROTOR: return (CSTR)"Tiltrotor VTOL"; |
||||
|
case MAV_TYPE_VTOL_RESERVED2: return (CSTR)"VTOL reserved 2"; |
||||
|
case MAV_TYPE_VTOL_RESERVED3: return (CSTR)"VTOL reserved 3"; |
||||
|
case MAV_TYPE_VTOL_RESERVED4: return (CSTR)"VTOL reserved 4"; |
||||
|
case MAV_TYPE_VTOL_RESERVED5: return (CSTR)"VTOL reserved 5"; |
||||
|
case MAV_TYPE_GIMBAL: return (CSTR)"Gimbal"; |
||||
|
case MAV_TYPE_ADSB: return (CSTR)"ADSB system"; |
||||
|
case MAV_TYPE_PARAFOIL: return (CSTR)"Steerable, nonrigid airfoil"; |
||||
|
case MAV_TYPE_DODECAROTOR: return (CSTR)"Dodecarotor"; |
||||
|
case MAV_TYPE_CAMERA: return (CSTR)"Camera"; |
||||
|
case MAV_TYPE_CHARGING_STATION: return (CSTR)"Charging station"; |
||||
|
case MAV_TYPE_FLARM: return (CSTR)"FLARM collision avoidance system"; |
||||
|
case MAV_TYPE_SERVO: return (CSTR)"Servo"; |
||||
|
}; |
||||
|
return (CSTR)"Unknown Type"; |
||||
|
}; |
||||
|
return (CSTR)"Not Connected"; |
||||
|
}; |
||||
|
|
||||
|
CSTR objectFlyHunter::getCtrlName() { |
||||
|
if (m_eCurrentMode > FH_WAIT_FOR_UAV) { |
||||
|
switch (m_bUAV_ctrl) { |
||||
|
case MAV_AUTOPILOT_GENERIC: return (CSTR)"Generic autopilot, full support for everything"; |
||||
|
case MAV_AUTOPILOT_RESERVED: return (CSTR)"Reserved for future use."; |
||||
|
case MAV_AUTOPILOT_SLUGS: return (CSTR)"SLUGS autopilot"; |
||||
|
case MAV_AUTOPILOT_ARDUPILOTMEGA: return (CSTR)"ArduPilot - Plane/Copter/Rover/Sub/Tracker"; |
||||
|
case MAV_AUTOPILOT_OPENPILOT: return (CSTR)"OpenPilot"; |
||||
|
case MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY: return (CSTR)"Generic autopilot only supporting simple waypoints"; |
||||
|
case MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY: return (CSTR)"Generic autopilot supporting waypoints and other simple navigation commands"; |
||||
|
case MAV_AUTOPILOT_GENERIC_MISSION_FULL: return (CSTR)"Generic autopilot supporting the full mission command set"; |
||||
|
case MAV_AUTOPILOT_INVALID: return (CSTR)"No valid autopilot, e.g. a GCS or other MAVLink component"; |
||||
|
case MAV_AUTOPILOT_PPZ: return (CSTR)"PPZ UAV"; |
||||
|
case MAV_AUTOPILOT_UDB: return (CSTR)"UAV Dev Board"; |
||||
|
case MAV_AUTOPILOT_FP: return (CSTR)"FlexiPilot"; |
||||
|
case MAV_AUTOPILOT_PX4: return (CSTR)"PX4 Autopilot"; |
||||
|
case MAV_AUTOPILOT_SMACCMPILOT: return (CSTR)"SMACCMPilot"; |
||||
|
case MAV_AUTOPILOT_AUTOQUAD: return (CSTR)"AutoQuad"; |
||||
|
case MAV_AUTOPILOT_ARMAZILA: return (CSTR)"Armazila"; |
||||
|
case MAV_AUTOPILOT_AEROB: return (CSTR)"Aerob"; |
||||
|
case MAV_AUTOPILOT_ASLUAV: return (CSTR)"ASLUAV autopilot"; |
||||
|
case MAV_AUTOPILOT_SMARTAP: return (CSTR)"SmartAP Autopilot"; |
||||
|
case MAV_AUTOPILOT_AIRRAILS: return (CSTR)"AirRails"; |
||||
|
}; |
||||
|
return (CSTR)"Unknown Control Module"; |
||||
|
}; |
||||
|
return (CSTR)"Not Connected"; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::arm() { |
||||
|
FH_COMMAND * tPtr; |
||||
|
tPtr = (FH_COMMAND*)malloc(sizeof(FH_COMMAND)); |
||||
|
if (tPtr != NULL) { |
||||
|
tPtr->data = NULL; |
||||
|
tPtr->type = FH_CMD_ARM; |
||||
|
m_qQueuedCommands.push(tPtr); |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
|
}; |
||||
|
bool objectFlyHunter::forceArm() { |
||||
|
FH_COMMAND* tPtr; |
||||
|
tPtr = (FH_COMMAND*)malloc(sizeof(FH_COMMAND)); |
||||
|
if (tPtr != NULL) { |
||||
|
tPtr->data = NULL; |
||||
|
tPtr->type = FH_CMD_FORCE_ARM; |
||||
|
m_qQueuedCommands.push(tPtr); |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
|
}; |
||||
|
bool objectFlyHunter::disarm() { |
||||
|
FH_COMMAND* tPtr; |
||||
|
tPtr = (FH_COMMAND*)malloc(sizeof(FH_COMMAND)); |
||||
|
if (tPtr != NULL) { |
||||
|
tPtr->data = NULL; |
||||
|
tPtr->type = FH_CMD_DISARM; |
||||
|
m_qQueuedCommands.push(tPtr); |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::reset() { |
||||
|
FH_COMMAND* tPtr; |
||||
|
tPtr = (FH_COMMAND*)malloc(sizeof(FH_COMMAND)); |
||||
|
if (tPtr != NULL) { |
||||
|
tPtr->data = NULL; |
||||
|
tPtr->type = FH_CMD_RESET; |
||||
|
m_qQueuedCommands.push(tPtr); |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::takeOff() { |
||||
|
FH_COMMAND* tPtr; |
||||
|
tPtr = (FH_COMMAND*)malloc(sizeof(FH_COMMAND)); |
||||
|
if (tPtr != NULL) { |
||||
|
tPtr->data = NULL; |
||||
|
tPtr->type = FH_CMD_TAKEOFF; |
||||
|
m_qQueuedCommands.push(tPtr); |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::land() { |
||||
|
FH_COMMAND* tPtr; |
||||
|
tPtr = (FH_COMMAND*)malloc(sizeof(FH_COMMAND)); |
||||
|
if (tPtr != NULL) { |
||||
|
tPtr->data = NULL; |
||||
|
tPtr->type = FH_CMD_LAND; |
||||
|
m_qQueuedCommands.push(tPtr); |
||||
|
return true; |
||||
|
}; |
||||
|
return false; |
||||
|
}; |
||||
|
|
||||
|
uint8_t objectFlyHunter::getVehicleSystemMode() { |
||||
|
return m_bUAV_bMODE; |
||||
|
}; |
||||
|
|
||||
|
uint32_t objectFlyHunter::getVehicleAutoPilotMode() { |
||||
|
return m_nUAV_cMODE; |
||||
|
}; |
||||
|
|
||||
|
CSTR objectFlyHunter::getVehicleSystemModeName() { |
||||
|
if (m_eCurrentMode > FH_WAIT_FOR_UAV) { |
||||
|
char tBuffer[256]; |
||||
|
sprintf(tBuffer, "%s%s%s%s%s%s%s%s", |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_CUSTOM_MODE_ENABLED) ? "CUS_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_MANUAL_INPUT_ENABLED) ? "MAN_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_HIL_ENABLED) ? "HIL_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_STABILIZE_ENABLED) ? "STB_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_GUIDED_ENABLED) ? "GID_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_AUTO_ENABLED) ? "AUT_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_TEST_ENABLED) ? "TST_" : ""), |
||||
|
((m_bUAV_bMODE & MAV_MODE_FLAG_SAFETY_ARMED) ? "ARM" : "") |
||||
|
); |
||||
|
return _strdup(tBuffer); |
||||
|
}; |
||||
|
return NULL; |
||||
|
}; |
||||
|
|
||||
|
CSTR objectFlyHunter::getVehicleAutoPilotModeName( int32_t c_mode ) { |
||||
|
if (m_eCurrentMode > FH_WAIT_FOR_UAV) { |
||||
|
switch (m_nUAV_cMODE) { |
||||
|
case STABILIZE: return (CSTR)"STABILIZE: hold level position"; |
||||
|
case ACRO: return (CSTR)"ACRO: hold rate control"; |
||||
|
case ALT_HOLD: return (CSTR)"ALT_HOLD: hold altitude"; |
||||
|
case AUTO: return (CSTR)"AUTO: RC"; |
||||
|
case GUIDED: return (CSTR)"GUIDED: auto"; |
||||
|
case LOITER: return (CSTR)"LOITER: hold a single location"; |
||||
|
case RTL: return (CSTR)"RTL: auto"; |
||||
|
case CIRCLE: return (CSTR)"CIRCLE: auto"; |
||||
|
//case POSITION: return (CSTR)"POSITION: deprecated";
|
||||
|
case LAND: return (CSTR)"LAND: auto"; |
||||
|
//case OF_LOITER: return (CSTR)"OF_LOITER: deprecated";
|
||||
|
case DRIFT: return (CSTR)"DRIFT: drift 'Car Like' mode"; |
||||
|
//case RESERVED_12: return (CSTR)"RESERVED_12: FU";
|
||||
|
case SPORT: return (CSTR)"SPORT: auto"; |
||||
|
case FLIP: return (CSTR)"FLIP: auto"; |
||||
|
case AUTOTUNE: return (CSTR)"AUTOTUNE: auto"; |
||||
|
//case POS_HOLD: return (CSTR)"POS_HOLD: HYBRID LOITER";
|
||||
|
case BRAKE: return (CSTR)"BRAKE: auto"; |
||||
|
case THROW: return (CSTR)"THROW: auto"; |
||||
|
case AVOID_ADSB: return (CSTR)"AVOID_ADSB: auto"; |
||||
|
case GUIDED_NOGPS: return (CSTR)"GUIDED_NOGPS: auto"; |
||||
|
case SMART_RTL: return (CSTR)"SMART_RTL: returns to home by retracing its steps"; |
||||
|
case FLOWHOLD: return (CSTR)"FLOWHOLD: holds position with optical flow without rangefinder"; |
||||
|
case FOLLOW: return (CSTR)"FOLLOW: attempts to follow another vehicle or ground station"; |
||||
|
case ZIGZAG: return (CSTR)"ZIGZAG: auto"; |
||||
|
}; |
||||
|
}; |
||||
|
return NULL; |
||||
|
}; |
||||
|
|
||||
|
bool objectFlyHunter::isGpsPresent() { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
if(m_pProtocol->m_bUAV_Online) rV = m_pProtocol->m_bGpsStatusDataActual || m_pProtocol->m_bGpsRawIntDataActual; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
bool objectFlyHunter::isPositionAccurate() { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
if (m_pProtocol->m_bUAV_Online && m_pProtocol->m_bGpsRawIntDataActual) { |
||||
|
rV = m_pProtocol->m_sGpsRaw.fix_type > GPS_FIX_TYPE_NO_FIX; |
||||
|
}; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
bool objectFlyHunter::isPositionIs3D() { |
||||
|
bool rV = false; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
if (m_pProtocol->m_bUAV_Online && m_pProtocol->m_bGpsRawIntDataActual) { |
||||
|
rV = m_pProtocol->m_sGpsRaw.fix_type > GPS_FIX_TYPE_2D_FIX; |
||||
|
}; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
mavlink_vfr_hud_t *objectFlyHunter::getVFRData() { |
||||
|
mavlink_vfr_hud_t *rV = NULL; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
if (m_pProtocol->m_bUAV_Online && m_pProtocol->m_bGpsRawIntDataActual) { |
||||
|
rV = &m_pProtocol->m_sVFR_Hud; |
||||
|
}; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
mavlink_power_status_t* objectFlyHunter::getPowerStatusData() { |
||||
|
mavlink_power_status_t* rV = NULL; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
if (m_pProtocol->m_bUAV_Online && m_pProtocol->m_bGpsRawIntDataActual) { |
||||
|
rV = &m_pProtocol->m_sPowerStatus; |
||||
|
}; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
float objectFlyHunter::getBodyRoll() { |
||||
|
float rV = 0.f; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
//rV = m_pProtocol->m_sRawIMU.xgyro;
|
||||
|
rV = m_pProtocol->m_sScaledIMU.xgyro / 1000.f; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
|
||||
|
float objectFlyHunter::getBodyPitch() { |
||||
|
float rV = 0.f; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
//rV = m_pProtocol->m_sRawIMU.ygyro;
|
||||
|
rV = m_pProtocol->m_sScaledIMU.ygyro / 1000.f; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
|
||||
|
float objectFlyHunter::getBodyYaw() { |
||||
|
float rV = 0.f; |
||||
|
m_mAccessProtector.lock(); |
||||
|
if (m_pProtocol != NULL) { |
||||
|
//rV = m_pProtocol->m_sRawIMU.zgyro;
|
||||
|
rV = m_pProtocol->m_sScaledIMU.zgyro / 1000.f; |
||||
|
}; |
||||
|
m_mAccessProtector.unlock(); |
||||
|
return rV; |
||||
|
}; |
||||
|
|
||||
|
void objectFlyHunter::setJoystickRoll(int16_t value) { |
||||
|
}; |
||||
|
|
||||
|
void objectFlyHunter::setJoystickPitch(int16_t value) { |
||||
|
}; |
||||
|
|
||||
|
void objectFlyHunter::setJoystickYaw(int16_t value) { |
||||
|
}; |
||||
|
|
||||
|
void objectFlyHunter::setJoistickThrottle(int16_t value) { |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
#undef LOG
|
||||
|
#undef LOG_ERROR
|
||||
|
|
||||
|
|
||||
@ -0,0 +1,120 @@ |
|||||
|
#ifndef __OBJECT_FLY_HUNTER_HEADER__ |
||||
|
#define __OBJECT_FLY_HUNTER_HEADER__ |
||||
|
|
||||
|
#include "../base/basicObject.h" |
||||
|
#include "../base/basicPosition.h" |
||||
|
#include "../base/basicMutex.h" |
||||
|
#include "../../data/protocol/protocolMAVLINK.h" |
||||
|
|
||||
|
#include <queue> |
||||
|
|
||||
|
typedef enum E_FH_MODE { |
||||
|
FH_CONNECTION_ERROR = 0, |
||||
|
FH_NO_CONNECTION = 1, |
||||
|
FH_WAIT_FOR_UAV = 2, |
||||
|
FH_MODE_PREFLIGHT = 3, |
||||
|
FH_MODE_ARMING, |
||||
|
FH_MODE_ARMED, |
||||
|
FH_MODE_DISARMING, |
||||
|
FH_MODE_TAKEOFF, |
||||
|
FH_MODE_FREE_CONTROLL, |
||||
|
FH_MODE_TARGETED_FLIGHT, |
||||
|
FH_MODE_LANDING |
||||
|
}FH_MODE; |
||||
|
|
||||
|
typedef enum E_FH_COMMAND_TYPE { |
||||
|
FH_CMD_NO_COMMAND = 0, |
||||
|
FH_CMD_RESET = 1, |
||||
|
FH_CMD_SET_BASE_MODE, |
||||
|
FH_CMD_SET_AP_MODE, |
||||
|
FH_CMD_ARM, |
||||
|
FH_CMD_FORCE_ARM, |
||||
|
FH_CMD_DISARM, |
||||
|
FH_CMD_TAKEOFF, |
||||
|
FH_CMD_LAND, |
||||
|
FH_CMD_FLY_TO, |
||||
|
FH_CMD_SET_HOME, |
||||
|
FH_CMD_FLY_HOME |
||||
|
}FH_COMMAND_TYPE; |
||||
|
|
||||
|
typedef struct S_FH_COMMAND { |
||||
|
FH_COMMAND_TYPE type; |
||||
|
void * data; |
||||
|
}FH_COMMAND; |
||||
|
|
||||
|
|
||||
|
typedef std::queue<FH_COMMAND*> FH_COMMAND_QUEUE; |
||||
|
|
||||
|
class objectFlyHunter : public basicThread, basicObject { |
||||
|
private: |
||||
|
basicLogCollection * m_pLog; |
||||
|
protocolMAVLINK * m_pProtocol; |
||||
|
config_setting_t * m_pSettings; |
||||
|
FH_COMMAND_QUEUE m_qQueuedCommands; |
||||
|
position3D m_oPosition; |
||||
|
position3D m_oTargetPosition; |
||||
|
bool m_bArmed; |
||||
|
basicMutex m_mAccessProtector; |
||||
|
FH_MODE m_eCurrentMode; |
||||
|
float m_fThrottleFactor; |
||||
|
|
||||
|
float m_fTargetSpeed_x; |
||||
|
float m_fTargetSpeed_y; |
||||
|
float m_fTargetSpeed_z; |
||||
|
|
||||
|
|
||||
|
int8_t m_bUAV_type; |
||||
|
int8_t m_bUAV_ctrl; |
||||
|
uint8_t m_bUAV_bMODE; |
||||
|
uint32_t m_nUAV_cMODE; |
||||
|
double m_dLpfVoltage; |
||||
|
double filterVoltage(double value) const; |
||||
|
bool checkPreFlight(); |
||||
|
protected: |
||||
|
virtual void m_fThreadProc(void); |
||||
|
public: |
||||
|
explicit objectFlyHunter(config_setting_t* Settings = NULL); |
||||
|
virtual ~objectFlyHunter(); |
||||
|
bool cerate(); |
||||
|
bool arm(); |
||||
|
bool forceArm(); |
||||
|
bool disarm(); |
||||
|
bool takeOff(); |
||||
|
bool land(); |
||||
|
bool reset(); |
||||
|
bool flyToWGS84( float lat, float lon, float alt ); |
||||
|
bool connectVia(CSTR a); |
||||
|
|
||||
|
bool isRadiosConnected(); |
||||
|
bool isVehicleAttached(); |
||||
|
bool isPairingDone(); |
||||
|
bool isGpsPresent(); |
||||
|
bool isPositionAccurate(); |
||||
|
bool isPositionIs3D(); |
||||
|
bool isReadyToFly(); |
||||
|
|
||||
|
CSTR getVehicleName(); |
||||
|
CSTR getCtrlName(); |
||||
|
uint8_t getVehicleSystemMode(); |
||||
|
uint32_t getVehicleAutoPilotMode(); |
||||
|
CSTR getVehicleSystemModeName(); |
||||
|
CSTR getVehicleAutoPilotModeName(int32_t c_mode = -1); |
||||
|
|
||||
|
float getBodyRoll(); |
||||
|
float getBodyPitch(); |
||||
|
float getBodyYaw(); |
||||
|
|
||||
|
mavlink_vfr_hud_t * getVFRData(); |
||||
|
mavlink_power_status_t * getPowerStatusData(); |
||||
|
|
||||
|
void setJoystickRoll(int16_t value); |
||||
|
void setJoystickPitch(int16_t value); |
||||
|
void setJoystickYaw(int16_t value); |
||||
|
void setJoistickThrottle(int16_t value); |
||||
|
/*emitters*/ |
||||
|
void (*updateOrientation)(float,float,float) = NULL; |
||||
|
//void (*Pitch)(int16_t) = NULL; |
||||
|
//void (*Yaw)(int16_t) = NULL; |
||||
|
//void (*Throttle)(int16_t) = NULL; |
||||
|
}; |
||||
|
#endif |
||||
266
lib/data/mavlink/ASLUAV/ASLUAV.h
File diff suppressed because it is too large
View File
@ -0,0 +1,34 @@ |
|||||
|
/** @file |
||||
|
* @brief MAVLink comm protocol built from ASLUAV.xml |
||||
|
* @see http://mavlink.org |
||||
|
*/ |
||||
|
#pragma once |
||||
|
#ifndef MAVLINK_H |
||||
|
#define MAVLINK_H |
||||
|
|
||||
|
#define MAVLINK_PRIMARY_XML_IDX 0 |
||||
|
|
||||
|
#ifndef MAVLINK_STX |
||||
|
#define MAVLINK_STX 253 |
||||
|
#endif |
||||
|
|
||||
|
#ifndef MAVLINK_ENDIAN |
||||
|
#define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN |
||||
|
#endif |
||||
|
|
||||
|
#ifndef MAVLINK_ALIGNED_FIELDS |
||||
|
#define MAVLINK_ALIGNED_FIELDS 1 |
||||
|
#endif |
||||
|
|
||||
|
#ifndef MAVLINK_CRC_EXTRA |
||||
|
#define MAVLINK_CRC_EXTRA 1 |
||||
|
#endif |
||||
|
|
||||
|
#ifndef MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_COMMAND_24BIT 1 |
||||
|
#endif |
||||
|
|
||||
|
#include "version.h" |
||||
|
#include "ASLUAV.h" |
||||
|
|
||||
|
#endif // MAVLINK_H |
||||
@ -0,0 +1,388 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE ASL_OBCTRL PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASL_OBCTRL 207 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_asl_obctrl_t { |
||||
|
uint64_t timestamp; /*< [us] Time since system start*/ |
||||
|
float uElev; /*< Elevator command [~]*/ |
||||
|
float uThrot; /*< Throttle command [~]*/ |
||||
|
float uThrot2; /*< Throttle 2 command [~]*/ |
||||
|
float uAilL; /*< Left aileron command [~]*/ |
||||
|
float uAilR; /*< Right aileron command [~]*/ |
||||
|
float uRud; /*< Rudder command [~]*/ |
||||
|
uint8_t obctrl_status; /*< Off-board computer status*/ |
||||
|
}) mavlink_asl_obctrl_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASL_OBCTRL_LEN 33 |
||||
|
#define MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN 33 |
||||
|
#define MAVLINK_MSG_ID_207_LEN 33 |
||||
|
#define MAVLINK_MSG_ID_207_MIN_LEN 33 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASL_OBCTRL_CRC 234 |
||||
|
#define MAVLINK_MSG_ID_207_CRC 234 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_ASL_OBCTRL { \ |
||||
|
207, \ |
||||
|
"ASL_OBCTRL", \ |
||||
|
8, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_asl_obctrl_t, timestamp) }, \ |
||||
|
{ "uElev", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_asl_obctrl_t, uElev) }, \ |
||||
|
{ "uThrot", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_asl_obctrl_t, uThrot) }, \ |
||||
|
{ "uThrot2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_asl_obctrl_t, uThrot2) }, \ |
||||
|
{ "uAilL", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_asl_obctrl_t, uAilL) }, \ |
||||
|
{ "uAilR", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_asl_obctrl_t, uAilR) }, \ |
||||
|
{ "uRud", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_asl_obctrl_t, uRud) }, \ |
||||
|
{ "obctrl_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_asl_obctrl_t, obctrl_status) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_ASL_OBCTRL { \ |
||||
|
"ASL_OBCTRL", \ |
||||
|
8, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_asl_obctrl_t, timestamp) }, \ |
||||
|
{ "uElev", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_asl_obctrl_t, uElev) }, \ |
||||
|
{ "uThrot", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_asl_obctrl_t, uThrot) }, \ |
||||
|
{ "uThrot2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_asl_obctrl_t, uThrot2) }, \ |
||||
|
{ "uAilL", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_asl_obctrl_t, uAilL) }, \ |
||||
|
{ "uAilR", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_asl_obctrl_t, uAilR) }, \ |
||||
|
{ "uRud", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_asl_obctrl_t, uRud) }, \ |
||||
|
{ "obctrl_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_asl_obctrl_t, obctrl_status) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a asl_obctrl 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 timestamp [us] Time since system start |
||||
|
* @param uElev Elevator command [~] |
||||
|
* @param uThrot Throttle command [~] |
||||
|
* @param uThrot2 Throttle 2 command [~] |
||||
|
* @param uAilL Left aileron command [~] |
||||
|
* @param uAilR Right aileron command [~] |
||||
|
* @param uRud Rudder command [~] |
||||
|
* @param obctrl_status Off-board computer status |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asl_obctrl_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t timestamp, float uElev, float uThrot, float uThrot2, float uAilL, float uAilR, float uRud, uint8_t obctrl_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASL_OBCTRL_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, uElev); |
||||
|
_mav_put_float(buf, 12, uThrot); |
||||
|
_mav_put_float(buf, 16, uThrot2); |
||||
|
_mav_put_float(buf, 20, uAilL); |
||||
|
_mav_put_float(buf, 24, uAilR); |
||||
|
_mav_put_float(buf, 28, uRud); |
||||
|
_mav_put_uint8_t(buf, 32, obctrl_status); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASL_OBCTRL_LEN); |
||||
|
#else |
||||
|
mavlink_asl_obctrl_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.uElev = uElev; |
||||
|
packet.uThrot = uThrot; |
||||
|
packet.uThrot2 = uThrot2; |
||||
|
packet.uAilL = uAilL; |
||||
|
packet.uAilR = uAilR; |
||||
|
packet.uRud = uRud; |
||||
|
packet.obctrl_status = obctrl_status; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASL_OBCTRL_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASL_OBCTRL; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a asl_obctrl 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 timestamp [us] Time since system start |
||||
|
* @param uElev Elevator command [~] |
||||
|
* @param uThrot Throttle command [~] |
||||
|
* @param uThrot2 Throttle 2 command [~] |
||||
|
* @param uAilL Left aileron command [~] |
||||
|
* @param uAilR Right aileron command [~] |
||||
|
* @param uRud Rudder command [~] |
||||
|
* @param obctrl_status Off-board computer status |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asl_obctrl_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t timestamp,float uElev,float uThrot,float uThrot2,float uAilL,float uAilR,float uRud,uint8_t obctrl_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASL_OBCTRL_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, uElev); |
||||
|
_mav_put_float(buf, 12, uThrot); |
||||
|
_mav_put_float(buf, 16, uThrot2); |
||||
|
_mav_put_float(buf, 20, uAilL); |
||||
|
_mav_put_float(buf, 24, uAilR); |
||||
|
_mav_put_float(buf, 28, uRud); |
||||
|
_mav_put_uint8_t(buf, 32, obctrl_status); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASL_OBCTRL_LEN); |
||||
|
#else |
||||
|
mavlink_asl_obctrl_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.uElev = uElev; |
||||
|
packet.uThrot = uThrot; |
||||
|
packet.uThrot2 = uThrot2; |
||||
|
packet.uAilL = uAilL; |
||||
|
packet.uAilR = uAilR; |
||||
|
packet.uRud = uRud; |
||||
|
packet.obctrl_status = obctrl_status; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASL_OBCTRL_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASL_OBCTRL; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a asl_obctrl 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 asl_obctrl C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asl_obctrl_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_asl_obctrl_t* asl_obctrl) |
||||
|
{ |
||||
|
return mavlink_msg_asl_obctrl_pack(system_id, component_id, msg, asl_obctrl->timestamp, asl_obctrl->uElev, asl_obctrl->uThrot, asl_obctrl->uThrot2, asl_obctrl->uAilL, asl_obctrl->uAilR, asl_obctrl->uRud, asl_obctrl->obctrl_status); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a asl_obctrl 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 asl_obctrl C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asl_obctrl_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_asl_obctrl_t* asl_obctrl) |
||||
|
{ |
||||
|
return mavlink_msg_asl_obctrl_pack_chan(system_id, component_id, chan, msg, asl_obctrl->timestamp, asl_obctrl->uElev, asl_obctrl->uThrot, asl_obctrl->uThrot2, asl_obctrl->uAilL, asl_obctrl->uAilR, asl_obctrl->uRud, asl_obctrl->obctrl_status); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a asl_obctrl message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param timestamp [us] Time since system start |
||||
|
* @param uElev Elevator command [~] |
||||
|
* @param uThrot Throttle command [~] |
||||
|
* @param uThrot2 Throttle 2 command [~] |
||||
|
* @param uAilL Left aileron command [~] |
||||
|
* @param uAilR Right aileron command [~] |
||||
|
* @param uRud Rudder command [~] |
||||
|
* @param obctrl_status Off-board computer status |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_asl_obctrl_send(mavlink_channel_t chan, uint64_t timestamp, float uElev, float uThrot, float uThrot2, float uAilL, float uAilR, float uRud, uint8_t obctrl_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASL_OBCTRL_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, uElev); |
||||
|
_mav_put_float(buf, 12, uThrot); |
||||
|
_mav_put_float(buf, 16, uThrot2); |
||||
|
_mav_put_float(buf, 20, uAilL); |
||||
|
_mav_put_float(buf, 24, uAilR); |
||||
|
_mav_put_float(buf, 28, uRud); |
||||
|
_mav_put_uint8_t(buf, 32, obctrl_status); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASL_OBCTRL, buf, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
#else |
||||
|
mavlink_asl_obctrl_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.uElev = uElev; |
||||
|
packet.uThrot = uThrot; |
||||
|
packet.uThrot2 = uThrot2; |
||||
|
packet.uAilL = uAilL; |
||||
|
packet.uAilR = uAilR; |
||||
|
packet.uRud = uRud; |
||||
|
packet.obctrl_status = obctrl_status; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASL_OBCTRL, (const char *)&packet, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a asl_obctrl message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_asl_obctrl_send_struct(mavlink_channel_t chan, const mavlink_asl_obctrl_t* asl_obctrl) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_asl_obctrl_send(chan, asl_obctrl->timestamp, asl_obctrl->uElev, asl_obctrl->uThrot, asl_obctrl->uThrot2, asl_obctrl->uAilL, asl_obctrl->uAilR, asl_obctrl->uRud, asl_obctrl->obctrl_status); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASL_OBCTRL, (const char *)asl_obctrl, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_ASL_OBCTRL_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_asl_obctrl_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, float uElev, float uThrot, float uThrot2, float uAilL, float uAilR, float uRud, uint8_t obctrl_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, uElev); |
||||
|
_mav_put_float(buf, 12, uThrot); |
||||
|
_mav_put_float(buf, 16, uThrot2); |
||||
|
_mav_put_float(buf, 20, uAilL); |
||||
|
_mav_put_float(buf, 24, uAilR); |
||||
|
_mav_put_float(buf, 28, uRud); |
||||
|
_mav_put_uint8_t(buf, 32, obctrl_status); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASL_OBCTRL, buf, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
#else |
||||
|
mavlink_asl_obctrl_t *packet = (mavlink_asl_obctrl_t *)msgbuf; |
||||
|
packet->timestamp = timestamp; |
||||
|
packet->uElev = uElev; |
||||
|
packet->uThrot = uThrot; |
||||
|
packet->uThrot2 = uThrot2; |
||||
|
packet->uAilL = uAilL; |
||||
|
packet->uAilR = uAilR; |
||||
|
packet->uRud = uRud; |
||||
|
packet->obctrl_status = obctrl_status; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASL_OBCTRL, (const char *)packet, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE ASL_OBCTRL UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestamp from asl_obctrl message |
||||
|
* |
||||
|
* @return [us] Time since system start |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_asl_obctrl_get_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uElev from asl_obctrl message |
||||
|
* |
||||
|
* @return Elevator command [~] |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asl_obctrl_get_uElev(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uThrot from asl_obctrl message |
||||
|
* |
||||
|
* @return Throttle command [~] |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asl_obctrl_get_uThrot(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uThrot2 from asl_obctrl message |
||||
|
* |
||||
|
* @return Throttle 2 command [~] |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asl_obctrl_get_uThrot2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uAilL from asl_obctrl message |
||||
|
* |
||||
|
* @return Left aileron command [~] |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asl_obctrl_get_uAilL(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uAilR from asl_obctrl message |
||||
|
* |
||||
|
* @return Right aileron command [~] |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asl_obctrl_get_uAilR(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uRud from asl_obctrl message |
||||
|
* |
||||
|
* @return Rudder command [~] |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asl_obctrl_get_uRud(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field obctrl_status from asl_obctrl message |
||||
|
* |
||||
|
* @return Off-board computer status |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_asl_obctrl_get_obctrl_status(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a asl_obctrl message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param asl_obctrl C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_asl_obctrl_decode(const mavlink_message_t* msg, mavlink_asl_obctrl_t* asl_obctrl) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
asl_obctrl->timestamp = mavlink_msg_asl_obctrl_get_timestamp(msg); |
||||
|
asl_obctrl->uElev = mavlink_msg_asl_obctrl_get_uElev(msg); |
||||
|
asl_obctrl->uThrot = mavlink_msg_asl_obctrl_get_uThrot(msg); |
||||
|
asl_obctrl->uThrot2 = mavlink_msg_asl_obctrl_get_uThrot2(msg); |
||||
|
asl_obctrl->uAilL = mavlink_msg_asl_obctrl_get_uAilL(msg); |
||||
|
asl_obctrl->uAilR = mavlink_msg_asl_obctrl_get_uAilR(msg); |
||||
|
asl_obctrl->uRud = mavlink_msg_asl_obctrl_get_uRud(msg); |
||||
|
asl_obctrl->obctrl_status = mavlink_msg_asl_obctrl_get_obctrl_status(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_ASL_OBCTRL_LEN? msg->len : MAVLINK_MSG_ID_ASL_OBCTRL_LEN; |
||||
|
memset(asl_obctrl, 0, MAVLINK_MSG_ID_ASL_OBCTRL_LEN); |
||||
|
memcpy(asl_obctrl, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,813 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE ASLCTRL_DATA PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DATA 203 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_aslctrl_data_t { |
||||
|
uint64_t timestamp; /*< [us] Timestamp*/ |
||||
|
float h; /*< See sourcecode for a description of these values... */ |
||||
|
float hRef; /*< */ |
||||
|
float hRef_t; /*< */ |
||||
|
float PitchAngle; /*< [deg] Pitch angle*/ |
||||
|
float PitchAngleRef; /*< [deg] Pitch angle reference*/ |
||||
|
float q; /*< */ |
||||
|
float qRef; /*< */ |
||||
|
float uElev; /*< */ |
||||
|
float uThrot; /*< */ |
||||
|
float uThrot2; /*< */ |
||||
|
float nZ; /*< */ |
||||
|
float AirspeedRef; /*< [m/s] Airspeed reference*/ |
||||
|
float YawAngle; /*< [deg] Yaw angle*/ |
||||
|
float YawAngleRef; /*< [deg] Yaw angle reference*/ |
||||
|
float RollAngle; /*< [deg] Roll angle*/ |
||||
|
float RollAngleRef; /*< [deg] Roll angle reference*/ |
||||
|
float p; /*< */ |
||||
|
float pRef; /*< */ |
||||
|
float r; /*< */ |
||||
|
float rRef; /*< */ |
||||
|
float uAil; /*< */ |
||||
|
float uRud; /*< */ |
||||
|
uint8_t aslctrl_mode; /*< ASLCTRL control-mode (manual, stabilized, auto, etc...)*/ |
||||
|
uint8_t SpoilersEngaged; /*< */ |
||||
|
}) mavlink_aslctrl_data_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DATA_LEN 98 |
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN 98 |
||||
|
#define MAVLINK_MSG_ID_203_LEN 98 |
||||
|
#define MAVLINK_MSG_ID_203_MIN_LEN 98 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DATA_CRC 172 |
||||
|
#define MAVLINK_MSG_ID_203_CRC 172 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_ASLCTRL_DATA { \ |
||||
|
203, \ |
||||
|
"ASLCTRL_DATA", \ |
||||
|
25, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_aslctrl_data_t, timestamp) }, \ |
||||
|
{ "aslctrl_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 96, offsetof(mavlink_aslctrl_data_t, aslctrl_mode) }, \ |
||||
|
{ "h", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_aslctrl_data_t, h) }, \ |
||||
|
{ "hRef", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_aslctrl_data_t, hRef) }, \ |
||||
|
{ "hRef_t", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_aslctrl_data_t, hRef_t) }, \ |
||||
|
{ "PitchAngle", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_aslctrl_data_t, PitchAngle) }, \ |
||||
|
{ "PitchAngleRef", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_aslctrl_data_t, PitchAngleRef) }, \ |
||||
|
{ "q", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_aslctrl_data_t, q) }, \ |
||||
|
{ "qRef", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_aslctrl_data_t, qRef) }, \ |
||||
|
{ "uElev", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_aslctrl_data_t, uElev) }, \ |
||||
|
{ "uThrot", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_aslctrl_data_t, uThrot) }, \ |
||||
|
{ "uThrot2", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_aslctrl_data_t, uThrot2) }, \ |
||||
|
{ "nZ", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_aslctrl_data_t, nZ) }, \ |
||||
|
{ "AirspeedRef", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_aslctrl_data_t, AirspeedRef) }, \ |
||||
|
{ "SpoilersEngaged", NULL, MAVLINK_TYPE_UINT8_T, 0, 97, offsetof(mavlink_aslctrl_data_t, SpoilersEngaged) }, \ |
||||
|
{ "YawAngle", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_aslctrl_data_t, YawAngle) }, \ |
||||
|
{ "YawAngleRef", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_aslctrl_data_t, YawAngleRef) }, \ |
||||
|
{ "RollAngle", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_aslctrl_data_t, RollAngle) }, \ |
||||
|
{ "RollAngleRef", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_aslctrl_data_t, RollAngleRef) }, \ |
||||
|
{ "p", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_aslctrl_data_t, p) }, \ |
||||
|
{ "pRef", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_aslctrl_data_t, pRef) }, \ |
||||
|
{ "r", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_aslctrl_data_t, r) }, \ |
||||
|
{ "rRef", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_aslctrl_data_t, rRef) }, \ |
||||
|
{ "uAil", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_aslctrl_data_t, uAil) }, \ |
||||
|
{ "uRud", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_aslctrl_data_t, uRud) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_ASLCTRL_DATA { \ |
||||
|
"ASLCTRL_DATA", \ |
||||
|
25, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_aslctrl_data_t, timestamp) }, \ |
||||
|
{ "aslctrl_mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 96, offsetof(mavlink_aslctrl_data_t, aslctrl_mode) }, \ |
||||
|
{ "h", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_aslctrl_data_t, h) }, \ |
||||
|
{ "hRef", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_aslctrl_data_t, hRef) }, \ |
||||
|
{ "hRef_t", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_aslctrl_data_t, hRef_t) }, \ |
||||
|
{ "PitchAngle", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_aslctrl_data_t, PitchAngle) }, \ |
||||
|
{ "PitchAngleRef", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_aslctrl_data_t, PitchAngleRef) }, \ |
||||
|
{ "q", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_aslctrl_data_t, q) }, \ |
||||
|
{ "qRef", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_aslctrl_data_t, qRef) }, \ |
||||
|
{ "uElev", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_aslctrl_data_t, uElev) }, \ |
||||
|
{ "uThrot", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_aslctrl_data_t, uThrot) }, \ |
||||
|
{ "uThrot2", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_aslctrl_data_t, uThrot2) }, \ |
||||
|
{ "nZ", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_aslctrl_data_t, nZ) }, \ |
||||
|
{ "AirspeedRef", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_aslctrl_data_t, AirspeedRef) }, \ |
||||
|
{ "SpoilersEngaged", NULL, MAVLINK_TYPE_UINT8_T, 0, 97, offsetof(mavlink_aslctrl_data_t, SpoilersEngaged) }, \ |
||||
|
{ "YawAngle", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_aslctrl_data_t, YawAngle) }, \ |
||||
|
{ "YawAngleRef", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_aslctrl_data_t, YawAngleRef) }, \ |
||||
|
{ "RollAngle", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_aslctrl_data_t, RollAngle) }, \ |
||||
|
{ "RollAngleRef", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_aslctrl_data_t, RollAngleRef) }, \ |
||||
|
{ "p", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_aslctrl_data_t, p) }, \ |
||||
|
{ "pRef", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_aslctrl_data_t, pRef) }, \ |
||||
|
{ "r", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_aslctrl_data_t, r) }, \ |
||||
|
{ "rRef", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_aslctrl_data_t, rRef) }, \ |
||||
|
{ "uAil", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_aslctrl_data_t, uAil) }, \ |
||||
|
{ "uRud", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_aslctrl_data_t, uRud) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a aslctrl_data 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 timestamp [us] Timestamp |
||||
|
* @param aslctrl_mode ASLCTRL control-mode (manual, stabilized, auto, etc...) |
||||
|
* @param h See sourcecode for a description of these values... |
||||
|
* @param hRef |
||||
|
* @param hRef_t |
||||
|
* @param PitchAngle [deg] Pitch angle |
||||
|
* @param PitchAngleRef [deg] Pitch angle reference |
||||
|
* @param q |
||||
|
* @param qRef |
||||
|
* @param uElev |
||||
|
* @param uThrot |
||||
|
* @param uThrot2 |
||||
|
* @param nZ |
||||
|
* @param AirspeedRef [m/s] Airspeed reference |
||||
|
* @param SpoilersEngaged |
||||
|
* @param YawAngle [deg] Yaw angle |
||||
|
* @param YawAngleRef [deg] Yaw angle reference |
||||
|
* @param RollAngle [deg] Roll angle |
||||
|
* @param RollAngleRef [deg] Roll angle reference |
||||
|
* @param p |
||||
|
* @param pRef |
||||
|
* @param r |
||||
|
* @param rRef |
||||
|
* @param uAil |
||||
|
* @param uRud |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t timestamp, uint8_t aslctrl_mode, float h, float hRef, float hRef_t, float PitchAngle, float PitchAngleRef, float q, float qRef, float uElev, float uThrot, float uThrot2, float nZ, float AirspeedRef, uint8_t SpoilersEngaged, float YawAngle, float YawAngleRef, float RollAngle, float RollAngleRef, float p, float pRef, float r, float rRef, float uAil, float uRud) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLCTRL_DATA_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, h); |
||||
|
_mav_put_float(buf, 12, hRef); |
||||
|
_mav_put_float(buf, 16, hRef_t); |
||||
|
_mav_put_float(buf, 20, PitchAngle); |
||||
|
_mav_put_float(buf, 24, PitchAngleRef); |
||||
|
_mav_put_float(buf, 28, q); |
||||
|
_mav_put_float(buf, 32, qRef); |
||||
|
_mav_put_float(buf, 36, uElev); |
||||
|
_mav_put_float(buf, 40, uThrot); |
||||
|
_mav_put_float(buf, 44, uThrot2); |
||||
|
_mav_put_float(buf, 48, nZ); |
||||
|
_mav_put_float(buf, 52, AirspeedRef); |
||||
|
_mav_put_float(buf, 56, YawAngle); |
||||
|
_mav_put_float(buf, 60, YawAngleRef); |
||||
|
_mav_put_float(buf, 64, RollAngle); |
||||
|
_mav_put_float(buf, 68, RollAngleRef); |
||||
|
_mav_put_float(buf, 72, p); |
||||
|
_mav_put_float(buf, 76, pRef); |
||||
|
_mav_put_float(buf, 80, r); |
||||
|
_mav_put_float(buf, 84, rRef); |
||||
|
_mav_put_float(buf, 88, uAil); |
||||
|
_mav_put_float(buf, 92, uRud); |
||||
|
_mav_put_uint8_t(buf, 96, aslctrl_mode); |
||||
|
_mav_put_uint8_t(buf, 97, SpoilersEngaged); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN); |
||||
|
#else |
||||
|
mavlink_aslctrl_data_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.h = h; |
||||
|
packet.hRef = hRef; |
||||
|
packet.hRef_t = hRef_t; |
||||
|
packet.PitchAngle = PitchAngle; |
||||
|
packet.PitchAngleRef = PitchAngleRef; |
||||
|
packet.q = q; |
||||
|
packet.qRef = qRef; |
||||
|
packet.uElev = uElev; |
||||
|
packet.uThrot = uThrot; |
||||
|
packet.uThrot2 = uThrot2; |
||||
|
packet.nZ = nZ; |
||||
|
packet.AirspeedRef = AirspeedRef; |
||||
|
packet.YawAngle = YawAngle; |
||||
|
packet.YawAngleRef = YawAngleRef; |
||||
|
packet.RollAngle = RollAngle; |
||||
|
packet.RollAngleRef = RollAngleRef; |
||||
|
packet.p = p; |
||||
|
packet.pRef = pRef; |
||||
|
packet.r = r; |
||||
|
packet.rRef = rRef; |
||||
|
packet.uAil = uAil; |
||||
|
packet.uRud = uRud; |
||||
|
packet.aslctrl_mode = aslctrl_mode; |
||||
|
packet.SpoilersEngaged = SpoilersEngaged; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASLCTRL_DATA; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a aslctrl_data 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 timestamp [us] Timestamp |
||||
|
* @param aslctrl_mode ASLCTRL control-mode (manual, stabilized, auto, etc...) |
||||
|
* @param h See sourcecode for a description of these values... |
||||
|
* @param hRef |
||||
|
* @param hRef_t |
||||
|
* @param PitchAngle [deg] Pitch angle |
||||
|
* @param PitchAngleRef [deg] Pitch angle reference |
||||
|
* @param q |
||||
|
* @param qRef |
||||
|
* @param uElev |
||||
|
* @param uThrot |
||||
|
* @param uThrot2 |
||||
|
* @param nZ |
||||
|
* @param AirspeedRef [m/s] Airspeed reference |
||||
|
* @param SpoilersEngaged |
||||
|
* @param YawAngle [deg] Yaw angle |
||||
|
* @param YawAngleRef [deg] Yaw angle reference |
||||
|
* @param RollAngle [deg] Roll angle |
||||
|
* @param RollAngleRef [deg] Roll angle reference |
||||
|
* @param p |
||||
|
* @param pRef |
||||
|
* @param r |
||||
|
* @param rRef |
||||
|
* @param uAil |
||||
|
* @param uRud |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t timestamp,uint8_t aslctrl_mode,float h,float hRef,float hRef_t,float PitchAngle,float PitchAngleRef,float q,float qRef,float uElev,float uThrot,float uThrot2,float nZ,float AirspeedRef,uint8_t SpoilersEngaged,float YawAngle,float YawAngleRef,float RollAngle,float RollAngleRef,float p,float pRef,float r,float rRef,float uAil,float uRud) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLCTRL_DATA_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, h); |
||||
|
_mav_put_float(buf, 12, hRef); |
||||
|
_mav_put_float(buf, 16, hRef_t); |
||||
|
_mav_put_float(buf, 20, PitchAngle); |
||||
|
_mav_put_float(buf, 24, PitchAngleRef); |
||||
|
_mav_put_float(buf, 28, q); |
||||
|
_mav_put_float(buf, 32, qRef); |
||||
|
_mav_put_float(buf, 36, uElev); |
||||
|
_mav_put_float(buf, 40, uThrot); |
||||
|
_mav_put_float(buf, 44, uThrot2); |
||||
|
_mav_put_float(buf, 48, nZ); |
||||
|
_mav_put_float(buf, 52, AirspeedRef); |
||||
|
_mav_put_float(buf, 56, YawAngle); |
||||
|
_mav_put_float(buf, 60, YawAngleRef); |
||||
|
_mav_put_float(buf, 64, RollAngle); |
||||
|
_mav_put_float(buf, 68, RollAngleRef); |
||||
|
_mav_put_float(buf, 72, p); |
||||
|
_mav_put_float(buf, 76, pRef); |
||||
|
_mav_put_float(buf, 80, r); |
||||
|
_mav_put_float(buf, 84, rRef); |
||||
|
_mav_put_float(buf, 88, uAil); |
||||
|
_mav_put_float(buf, 92, uRud); |
||||
|
_mav_put_uint8_t(buf, 96, aslctrl_mode); |
||||
|
_mav_put_uint8_t(buf, 97, SpoilersEngaged); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN); |
||||
|
#else |
||||
|
mavlink_aslctrl_data_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.h = h; |
||||
|
packet.hRef = hRef; |
||||
|
packet.hRef_t = hRef_t; |
||||
|
packet.PitchAngle = PitchAngle; |
||||
|
packet.PitchAngleRef = PitchAngleRef; |
||||
|
packet.q = q; |
||||
|
packet.qRef = qRef; |
||||
|
packet.uElev = uElev; |
||||
|
packet.uThrot = uThrot; |
||||
|
packet.uThrot2 = uThrot2; |
||||
|
packet.nZ = nZ; |
||||
|
packet.AirspeedRef = AirspeedRef; |
||||
|
packet.YawAngle = YawAngle; |
||||
|
packet.YawAngleRef = YawAngleRef; |
||||
|
packet.RollAngle = RollAngle; |
||||
|
packet.RollAngleRef = RollAngleRef; |
||||
|
packet.p = p; |
||||
|
packet.pRef = pRef; |
||||
|
packet.r = r; |
||||
|
packet.rRef = rRef; |
||||
|
packet.uAil = uAil; |
||||
|
packet.uRud = uRud; |
||||
|
packet.aslctrl_mode = aslctrl_mode; |
||||
|
packet.SpoilersEngaged = SpoilersEngaged; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASLCTRL_DATA; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a aslctrl_data 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 aslctrl_data C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_aslctrl_data_t* aslctrl_data) |
||||
|
{ |
||||
|
return mavlink_msg_aslctrl_data_pack(system_id, component_id, msg, aslctrl_data->timestamp, aslctrl_data->aslctrl_mode, aslctrl_data->h, aslctrl_data->hRef, aslctrl_data->hRef_t, aslctrl_data->PitchAngle, aslctrl_data->PitchAngleRef, aslctrl_data->q, aslctrl_data->qRef, aslctrl_data->uElev, aslctrl_data->uThrot, aslctrl_data->uThrot2, aslctrl_data->nZ, aslctrl_data->AirspeedRef, aslctrl_data->SpoilersEngaged, aslctrl_data->YawAngle, aslctrl_data->YawAngleRef, aslctrl_data->RollAngle, aslctrl_data->RollAngleRef, aslctrl_data->p, aslctrl_data->pRef, aslctrl_data->r, aslctrl_data->rRef, aslctrl_data->uAil, aslctrl_data->uRud); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a aslctrl_data 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 aslctrl_data C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_aslctrl_data_t* aslctrl_data) |
||||
|
{ |
||||
|
return mavlink_msg_aslctrl_data_pack_chan(system_id, component_id, chan, msg, aslctrl_data->timestamp, aslctrl_data->aslctrl_mode, aslctrl_data->h, aslctrl_data->hRef, aslctrl_data->hRef_t, aslctrl_data->PitchAngle, aslctrl_data->PitchAngleRef, aslctrl_data->q, aslctrl_data->qRef, aslctrl_data->uElev, aslctrl_data->uThrot, aslctrl_data->uThrot2, aslctrl_data->nZ, aslctrl_data->AirspeedRef, aslctrl_data->SpoilersEngaged, aslctrl_data->YawAngle, aslctrl_data->YawAngleRef, aslctrl_data->RollAngle, aslctrl_data->RollAngleRef, aslctrl_data->p, aslctrl_data->pRef, aslctrl_data->r, aslctrl_data->rRef, aslctrl_data->uAil, aslctrl_data->uRud); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a aslctrl_data message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param timestamp [us] Timestamp |
||||
|
* @param aslctrl_mode ASLCTRL control-mode (manual, stabilized, auto, etc...) |
||||
|
* @param h See sourcecode for a description of these values... |
||||
|
* @param hRef |
||||
|
* @param hRef_t |
||||
|
* @param PitchAngle [deg] Pitch angle |
||||
|
* @param PitchAngleRef [deg] Pitch angle reference |
||||
|
* @param q |
||||
|
* @param qRef |
||||
|
* @param uElev |
||||
|
* @param uThrot |
||||
|
* @param uThrot2 |
||||
|
* @param nZ |
||||
|
* @param AirspeedRef [m/s] Airspeed reference |
||||
|
* @param SpoilersEngaged |
||||
|
* @param YawAngle [deg] Yaw angle |
||||
|
* @param YawAngleRef [deg] Yaw angle reference |
||||
|
* @param RollAngle [deg] Roll angle |
||||
|
* @param RollAngleRef [deg] Roll angle reference |
||||
|
* @param p |
||||
|
* @param pRef |
||||
|
* @param r |
||||
|
* @param rRef |
||||
|
* @param uAil |
||||
|
* @param uRud |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_aslctrl_data_send(mavlink_channel_t chan, uint64_t timestamp, uint8_t aslctrl_mode, float h, float hRef, float hRef_t, float PitchAngle, float PitchAngleRef, float q, float qRef, float uElev, float uThrot, float uThrot2, float nZ, float AirspeedRef, uint8_t SpoilersEngaged, float YawAngle, float YawAngleRef, float RollAngle, float RollAngleRef, float p, float pRef, float r, float rRef, float uAil, float uRud) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLCTRL_DATA_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, h); |
||||
|
_mav_put_float(buf, 12, hRef); |
||||
|
_mav_put_float(buf, 16, hRef_t); |
||||
|
_mav_put_float(buf, 20, PitchAngle); |
||||
|
_mav_put_float(buf, 24, PitchAngleRef); |
||||
|
_mav_put_float(buf, 28, q); |
||||
|
_mav_put_float(buf, 32, qRef); |
||||
|
_mav_put_float(buf, 36, uElev); |
||||
|
_mav_put_float(buf, 40, uThrot); |
||||
|
_mav_put_float(buf, 44, uThrot2); |
||||
|
_mav_put_float(buf, 48, nZ); |
||||
|
_mav_put_float(buf, 52, AirspeedRef); |
||||
|
_mav_put_float(buf, 56, YawAngle); |
||||
|
_mav_put_float(buf, 60, YawAngleRef); |
||||
|
_mav_put_float(buf, 64, RollAngle); |
||||
|
_mav_put_float(buf, 68, RollAngleRef); |
||||
|
_mav_put_float(buf, 72, p); |
||||
|
_mav_put_float(buf, 76, pRef); |
||||
|
_mav_put_float(buf, 80, r); |
||||
|
_mav_put_float(buf, 84, rRef); |
||||
|
_mav_put_float(buf, 88, uAil); |
||||
|
_mav_put_float(buf, 92, uRud); |
||||
|
_mav_put_uint8_t(buf, 96, aslctrl_mode); |
||||
|
_mav_put_uint8_t(buf, 97, SpoilersEngaged); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DATA, buf, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
#else |
||||
|
mavlink_aslctrl_data_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.h = h; |
||||
|
packet.hRef = hRef; |
||||
|
packet.hRef_t = hRef_t; |
||||
|
packet.PitchAngle = PitchAngle; |
||||
|
packet.PitchAngleRef = PitchAngleRef; |
||||
|
packet.q = q; |
||||
|
packet.qRef = qRef; |
||||
|
packet.uElev = uElev; |
||||
|
packet.uThrot = uThrot; |
||||
|
packet.uThrot2 = uThrot2; |
||||
|
packet.nZ = nZ; |
||||
|
packet.AirspeedRef = AirspeedRef; |
||||
|
packet.YawAngle = YawAngle; |
||||
|
packet.YawAngleRef = YawAngleRef; |
||||
|
packet.RollAngle = RollAngle; |
||||
|
packet.RollAngleRef = RollAngleRef; |
||||
|
packet.p = p; |
||||
|
packet.pRef = pRef; |
||||
|
packet.r = r; |
||||
|
packet.rRef = rRef; |
||||
|
packet.uAil = uAil; |
||||
|
packet.uRud = uRud; |
||||
|
packet.aslctrl_mode = aslctrl_mode; |
||||
|
packet.SpoilersEngaged = SpoilersEngaged; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DATA, (const char *)&packet, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a aslctrl_data message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_aslctrl_data_send_struct(mavlink_channel_t chan, const mavlink_aslctrl_data_t* aslctrl_data) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_aslctrl_data_send(chan, aslctrl_data->timestamp, aslctrl_data->aslctrl_mode, aslctrl_data->h, aslctrl_data->hRef, aslctrl_data->hRef_t, aslctrl_data->PitchAngle, aslctrl_data->PitchAngleRef, aslctrl_data->q, aslctrl_data->qRef, aslctrl_data->uElev, aslctrl_data->uThrot, aslctrl_data->uThrot2, aslctrl_data->nZ, aslctrl_data->AirspeedRef, aslctrl_data->SpoilersEngaged, aslctrl_data->YawAngle, aslctrl_data->YawAngleRef, aslctrl_data->RollAngle, aslctrl_data->RollAngleRef, aslctrl_data->p, aslctrl_data->pRef, aslctrl_data->r, aslctrl_data->rRef, aslctrl_data->uAil, aslctrl_data->uRud); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DATA, (const char *)aslctrl_data, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_ASLCTRL_DATA_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_aslctrl_data_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint8_t aslctrl_mode, float h, float hRef, float hRef_t, float PitchAngle, float PitchAngleRef, float q, float qRef, float uElev, float uThrot, float uThrot2, float nZ, float AirspeedRef, uint8_t SpoilersEngaged, float YawAngle, float YawAngleRef, float RollAngle, float RollAngleRef, float p, float pRef, float r, float rRef, float uAil, float uRud) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, h); |
||||
|
_mav_put_float(buf, 12, hRef); |
||||
|
_mav_put_float(buf, 16, hRef_t); |
||||
|
_mav_put_float(buf, 20, PitchAngle); |
||||
|
_mav_put_float(buf, 24, PitchAngleRef); |
||||
|
_mav_put_float(buf, 28, q); |
||||
|
_mav_put_float(buf, 32, qRef); |
||||
|
_mav_put_float(buf, 36, uElev); |
||||
|
_mav_put_float(buf, 40, uThrot); |
||||
|
_mav_put_float(buf, 44, uThrot2); |
||||
|
_mav_put_float(buf, 48, nZ); |
||||
|
_mav_put_float(buf, 52, AirspeedRef); |
||||
|
_mav_put_float(buf, 56, YawAngle); |
||||
|
_mav_put_float(buf, 60, YawAngleRef); |
||||
|
_mav_put_float(buf, 64, RollAngle); |
||||
|
_mav_put_float(buf, 68, RollAngleRef); |
||||
|
_mav_put_float(buf, 72, p); |
||||
|
_mav_put_float(buf, 76, pRef); |
||||
|
_mav_put_float(buf, 80, r); |
||||
|
_mav_put_float(buf, 84, rRef); |
||||
|
_mav_put_float(buf, 88, uAil); |
||||
|
_mav_put_float(buf, 92, uRud); |
||||
|
_mav_put_uint8_t(buf, 96, aslctrl_mode); |
||||
|
_mav_put_uint8_t(buf, 97, SpoilersEngaged); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DATA, buf, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
#else |
||||
|
mavlink_aslctrl_data_t *packet = (mavlink_aslctrl_data_t *)msgbuf; |
||||
|
packet->timestamp = timestamp; |
||||
|
packet->h = h; |
||||
|
packet->hRef = hRef; |
||||
|
packet->hRef_t = hRef_t; |
||||
|
packet->PitchAngle = PitchAngle; |
||||
|
packet->PitchAngleRef = PitchAngleRef; |
||||
|
packet->q = q; |
||||
|
packet->qRef = qRef; |
||||
|
packet->uElev = uElev; |
||||
|
packet->uThrot = uThrot; |
||||
|
packet->uThrot2 = uThrot2; |
||||
|
packet->nZ = nZ; |
||||
|
packet->AirspeedRef = AirspeedRef; |
||||
|
packet->YawAngle = YawAngle; |
||||
|
packet->YawAngleRef = YawAngleRef; |
||||
|
packet->RollAngle = RollAngle; |
||||
|
packet->RollAngleRef = RollAngleRef; |
||||
|
packet->p = p; |
||||
|
packet->pRef = pRef; |
||||
|
packet->r = r; |
||||
|
packet->rRef = rRef; |
||||
|
packet->uAil = uAil; |
||||
|
packet->uRud = uRud; |
||||
|
packet->aslctrl_mode = aslctrl_mode; |
||||
|
packet->SpoilersEngaged = SpoilersEngaged; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DATA, (const char *)packet, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE ASLCTRL_DATA UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestamp from aslctrl_data message |
||||
|
* |
||||
|
* @return [us] Timestamp |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_aslctrl_data_get_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field aslctrl_mode from aslctrl_data message |
||||
|
* |
||||
|
* @return ASLCTRL control-mode (manual, stabilized, auto, etc...) |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_aslctrl_data_get_aslctrl_mode(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 96); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field h from aslctrl_data message |
||||
|
* |
||||
|
* @return See sourcecode for a description of these values... |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_h(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field hRef from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_hRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field hRef_t from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_hRef_t(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field PitchAngle from aslctrl_data message |
||||
|
* |
||||
|
* @return [deg] Pitch angle |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_PitchAngle(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field PitchAngleRef from aslctrl_data message |
||||
|
* |
||||
|
* @return [deg] Pitch angle reference |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_PitchAngleRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field q from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_q(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field qRef from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_qRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uElev from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_uElev(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 36); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uThrot from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_uThrot(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 40); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uThrot2 from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_uThrot2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 44); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field nZ from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_nZ(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 48); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field AirspeedRef from aslctrl_data message |
||||
|
* |
||||
|
* @return [m/s] Airspeed reference |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_AirspeedRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 52); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field SpoilersEngaged from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_aslctrl_data_get_SpoilersEngaged(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 97); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field YawAngle from aslctrl_data message |
||||
|
* |
||||
|
* @return [deg] Yaw angle |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_YawAngle(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 56); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field YawAngleRef from aslctrl_data message |
||||
|
* |
||||
|
* @return [deg] Yaw angle reference |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_YawAngleRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 60); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field RollAngle from aslctrl_data message |
||||
|
* |
||||
|
* @return [deg] Roll angle |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_RollAngle(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 64); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field RollAngleRef from aslctrl_data message |
||||
|
* |
||||
|
* @return [deg] Roll angle reference |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_RollAngleRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 68); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field p from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_p(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 72); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field pRef from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_pRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 76); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field r from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_r(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 80); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field rRef from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_rRef(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 84); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uAil from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_uAil(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 88); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field uRud from aslctrl_data message |
||||
|
* |
||||
|
* @return |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_data_get_uRud(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 92); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a aslctrl_data message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param aslctrl_data C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_aslctrl_data_decode(const mavlink_message_t* msg, mavlink_aslctrl_data_t* aslctrl_data) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
aslctrl_data->timestamp = mavlink_msg_aslctrl_data_get_timestamp(msg); |
||||
|
aslctrl_data->h = mavlink_msg_aslctrl_data_get_h(msg); |
||||
|
aslctrl_data->hRef = mavlink_msg_aslctrl_data_get_hRef(msg); |
||||
|
aslctrl_data->hRef_t = mavlink_msg_aslctrl_data_get_hRef_t(msg); |
||||
|
aslctrl_data->PitchAngle = mavlink_msg_aslctrl_data_get_PitchAngle(msg); |
||||
|
aslctrl_data->PitchAngleRef = mavlink_msg_aslctrl_data_get_PitchAngleRef(msg); |
||||
|
aslctrl_data->q = mavlink_msg_aslctrl_data_get_q(msg); |
||||
|
aslctrl_data->qRef = mavlink_msg_aslctrl_data_get_qRef(msg); |
||||
|
aslctrl_data->uElev = mavlink_msg_aslctrl_data_get_uElev(msg); |
||||
|
aslctrl_data->uThrot = mavlink_msg_aslctrl_data_get_uThrot(msg); |
||||
|
aslctrl_data->uThrot2 = mavlink_msg_aslctrl_data_get_uThrot2(msg); |
||||
|
aslctrl_data->nZ = mavlink_msg_aslctrl_data_get_nZ(msg); |
||||
|
aslctrl_data->AirspeedRef = mavlink_msg_aslctrl_data_get_AirspeedRef(msg); |
||||
|
aslctrl_data->YawAngle = mavlink_msg_aslctrl_data_get_YawAngle(msg); |
||||
|
aslctrl_data->YawAngleRef = mavlink_msg_aslctrl_data_get_YawAngleRef(msg); |
||||
|
aslctrl_data->RollAngle = mavlink_msg_aslctrl_data_get_RollAngle(msg); |
||||
|
aslctrl_data->RollAngleRef = mavlink_msg_aslctrl_data_get_RollAngleRef(msg); |
||||
|
aslctrl_data->p = mavlink_msg_aslctrl_data_get_p(msg); |
||||
|
aslctrl_data->pRef = mavlink_msg_aslctrl_data_get_pRef(msg); |
||||
|
aslctrl_data->r = mavlink_msg_aslctrl_data_get_r(msg); |
||||
|
aslctrl_data->rRef = mavlink_msg_aslctrl_data_get_rRef(msg); |
||||
|
aslctrl_data->uAil = mavlink_msg_aslctrl_data_get_uAil(msg); |
||||
|
aslctrl_data->uRud = mavlink_msg_aslctrl_data_get_uRud(msg); |
||||
|
aslctrl_data->aslctrl_mode = mavlink_msg_aslctrl_data_get_aslctrl_mode(msg); |
||||
|
aslctrl_data->SpoilersEngaged = mavlink_msg_aslctrl_data_get_SpoilersEngaged(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_ASLCTRL_DATA_LEN? msg->len : MAVLINK_MSG_ID_ASLCTRL_DATA_LEN; |
||||
|
memset(aslctrl_data, 0, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN); |
||||
|
memcpy(aslctrl_data, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,463 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE ASLCTRL_DEBUG PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DEBUG 204 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_aslctrl_debug_t { |
||||
|
uint32_t i32_1; /*< Debug data*/ |
||||
|
float f_1; /*< Debug data */ |
||||
|
float f_2; /*< Debug data*/ |
||||
|
float f_3; /*< Debug data*/ |
||||
|
float f_4; /*< Debug data*/ |
||||
|
float f_5; /*< Debug data*/ |
||||
|
float f_6; /*< Debug data*/ |
||||
|
float f_7; /*< Debug data*/ |
||||
|
float f_8; /*< Debug data*/ |
||||
|
uint8_t i8_1; /*< Debug data*/ |
||||
|
uint8_t i8_2; /*< Debug data*/ |
||||
|
}) mavlink_aslctrl_debug_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN 38 |
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN 38 |
||||
|
#define MAVLINK_MSG_ID_204_LEN 38 |
||||
|
#define MAVLINK_MSG_ID_204_MIN_LEN 38 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC 251 |
||||
|
#define MAVLINK_MSG_ID_204_CRC 251 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_ASLCTRL_DEBUG { \ |
||||
|
204, \ |
||||
|
"ASLCTRL_DEBUG", \ |
||||
|
11, \ |
||||
|
{ { "i32_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_aslctrl_debug_t, i32_1) }, \ |
||||
|
{ "i8_1", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_aslctrl_debug_t, i8_1) }, \ |
||||
|
{ "i8_2", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_aslctrl_debug_t, i8_2) }, \ |
||||
|
{ "f_1", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_aslctrl_debug_t, f_1) }, \ |
||||
|
{ "f_2", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_aslctrl_debug_t, f_2) }, \ |
||||
|
{ "f_3", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_aslctrl_debug_t, f_3) }, \ |
||||
|
{ "f_4", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_aslctrl_debug_t, f_4) }, \ |
||||
|
{ "f_5", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_aslctrl_debug_t, f_5) }, \ |
||||
|
{ "f_6", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_aslctrl_debug_t, f_6) }, \ |
||||
|
{ "f_7", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_aslctrl_debug_t, f_7) }, \ |
||||
|
{ "f_8", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_aslctrl_debug_t, f_8) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_ASLCTRL_DEBUG { \ |
||||
|
"ASLCTRL_DEBUG", \ |
||||
|
11, \ |
||||
|
{ { "i32_1", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_aslctrl_debug_t, i32_1) }, \ |
||||
|
{ "i8_1", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_aslctrl_debug_t, i8_1) }, \ |
||||
|
{ "i8_2", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_aslctrl_debug_t, i8_2) }, \ |
||||
|
{ "f_1", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_aslctrl_debug_t, f_1) }, \ |
||||
|
{ "f_2", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_aslctrl_debug_t, f_2) }, \ |
||||
|
{ "f_3", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_aslctrl_debug_t, f_3) }, \ |
||||
|
{ "f_4", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_aslctrl_debug_t, f_4) }, \ |
||||
|
{ "f_5", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_aslctrl_debug_t, f_5) }, \ |
||||
|
{ "f_6", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_aslctrl_debug_t, f_6) }, \ |
||||
|
{ "f_7", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_aslctrl_debug_t, f_7) }, \ |
||||
|
{ "f_8", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_aslctrl_debug_t, f_8) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a aslctrl_debug 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 i32_1 Debug data |
||||
|
* @param i8_1 Debug data |
||||
|
* @param i8_2 Debug data |
||||
|
* @param f_1 Debug data |
||||
|
* @param f_2 Debug data |
||||
|
* @param f_3 Debug data |
||||
|
* @param f_4 Debug data |
||||
|
* @param f_5 Debug data |
||||
|
* @param f_6 Debug data |
||||
|
* @param f_7 Debug data |
||||
|
* @param f_8 Debug data |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_debug_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint32_t i32_1, uint8_t i8_1, uint8_t i8_2, float f_1, float f_2, float f_3, float f_4, float f_5, float f_6, float f_7, float f_8) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN]; |
||||
|
_mav_put_uint32_t(buf, 0, i32_1); |
||||
|
_mav_put_float(buf, 4, f_1); |
||||
|
_mav_put_float(buf, 8, f_2); |
||||
|
_mav_put_float(buf, 12, f_3); |
||||
|
_mav_put_float(buf, 16, f_4); |
||||
|
_mav_put_float(buf, 20, f_5); |
||||
|
_mav_put_float(buf, 24, f_6); |
||||
|
_mav_put_float(buf, 28, f_7); |
||||
|
_mav_put_float(buf, 32, f_8); |
||||
|
_mav_put_uint8_t(buf, 36, i8_1); |
||||
|
_mav_put_uint8_t(buf, 37, i8_2); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN); |
||||
|
#else |
||||
|
mavlink_aslctrl_debug_t packet; |
||||
|
packet.i32_1 = i32_1; |
||||
|
packet.f_1 = f_1; |
||||
|
packet.f_2 = f_2; |
||||
|
packet.f_3 = f_3; |
||||
|
packet.f_4 = f_4; |
||||
|
packet.f_5 = f_5; |
||||
|
packet.f_6 = f_6; |
||||
|
packet.f_7 = f_7; |
||||
|
packet.f_8 = f_8; |
||||
|
packet.i8_1 = i8_1; |
||||
|
packet.i8_2 = i8_2; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASLCTRL_DEBUG; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a aslctrl_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 will be sent over |
||||
|
* @param msg The MAVLink message to compress the data into |
||||
|
* @param i32_1 Debug data |
||||
|
* @param i8_1 Debug data |
||||
|
* @param i8_2 Debug data |
||||
|
* @param f_1 Debug data |
||||
|
* @param f_2 Debug data |
||||
|
* @param f_3 Debug data |
||||
|
* @param f_4 Debug data |
||||
|
* @param f_5 Debug data |
||||
|
* @param f_6 Debug data |
||||
|
* @param f_7 Debug data |
||||
|
* @param f_8 Debug data |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_debug_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint32_t i32_1,uint8_t i8_1,uint8_t i8_2,float f_1,float f_2,float f_3,float f_4,float f_5,float f_6,float f_7,float f_8) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN]; |
||||
|
_mav_put_uint32_t(buf, 0, i32_1); |
||||
|
_mav_put_float(buf, 4, f_1); |
||||
|
_mav_put_float(buf, 8, f_2); |
||||
|
_mav_put_float(buf, 12, f_3); |
||||
|
_mav_put_float(buf, 16, f_4); |
||||
|
_mav_put_float(buf, 20, f_5); |
||||
|
_mav_put_float(buf, 24, f_6); |
||||
|
_mav_put_float(buf, 28, f_7); |
||||
|
_mav_put_float(buf, 32, f_8); |
||||
|
_mav_put_uint8_t(buf, 36, i8_1); |
||||
|
_mav_put_uint8_t(buf, 37, i8_2); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN); |
||||
|
#else |
||||
|
mavlink_aslctrl_debug_t packet; |
||||
|
packet.i32_1 = i32_1; |
||||
|
packet.f_1 = f_1; |
||||
|
packet.f_2 = f_2; |
||||
|
packet.f_3 = f_3; |
||||
|
packet.f_4 = f_4; |
||||
|
packet.f_5 = f_5; |
||||
|
packet.f_6 = f_6; |
||||
|
packet.f_7 = f_7; |
||||
|
packet.f_8 = f_8; |
||||
|
packet.i8_1 = i8_1; |
||||
|
packet.i8_2 = i8_2; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASLCTRL_DEBUG; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a aslctrl_debug 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 aslctrl_debug C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_debug_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_aslctrl_debug_t* aslctrl_debug) |
||||
|
{ |
||||
|
return mavlink_msg_aslctrl_debug_pack(system_id, component_id, msg, aslctrl_debug->i32_1, aslctrl_debug->i8_1, aslctrl_debug->i8_2, aslctrl_debug->f_1, aslctrl_debug->f_2, aslctrl_debug->f_3, aslctrl_debug->f_4, aslctrl_debug->f_5, aslctrl_debug->f_6, aslctrl_debug->f_7, aslctrl_debug->f_8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a aslctrl_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 aslctrl_debug C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_aslctrl_debug_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_aslctrl_debug_t* aslctrl_debug) |
||||
|
{ |
||||
|
return mavlink_msg_aslctrl_debug_pack_chan(system_id, component_id, chan, msg, aslctrl_debug->i32_1, aslctrl_debug->i8_1, aslctrl_debug->i8_2, aslctrl_debug->f_1, aslctrl_debug->f_2, aslctrl_debug->f_3, aslctrl_debug->f_4, aslctrl_debug->f_5, aslctrl_debug->f_6, aslctrl_debug->f_7, aslctrl_debug->f_8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a aslctrl_debug message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param i32_1 Debug data |
||||
|
* @param i8_1 Debug data |
||||
|
* @param i8_2 Debug data |
||||
|
* @param f_1 Debug data |
||||
|
* @param f_2 Debug data |
||||
|
* @param f_3 Debug data |
||||
|
* @param f_4 Debug data |
||||
|
* @param f_5 Debug data |
||||
|
* @param f_6 Debug data |
||||
|
* @param f_7 Debug data |
||||
|
* @param f_8 Debug data |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_aslctrl_debug_send(mavlink_channel_t chan, uint32_t i32_1, uint8_t i8_1, uint8_t i8_2, float f_1, float f_2, float f_3, float f_4, float f_5, float f_6, float f_7, float f_8) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN]; |
||||
|
_mav_put_uint32_t(buf, 0, i32_1); |
||||
|
_mav_put_float(buf, 4, f_1); |
||||
|
_mav_put_float(buf, 8, f_2); |
||||
|
_mav_put_float(buf, 12, f_3); |
||||
|
_mav_put_float(buf, 16, f_4); |
||||
|
_mav_put_float(buf, 20, f_5); |
||||
|
_mav_put_float(buf, 24, f_6); |
||||
|
_mav_put_float(buf, 28, f_7); |
||||
|
_mav_put_float(buf, 32, f_8); |
||||
|
_mav_put_uint8_t(buf, 36, i8_1); |
||||
|
_mav_put_uint8_t(buf, 37, i8_2); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DEBUG, buf, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
#else |
||||
|
mavlink_aslctrl_debug_t packet; |
||||
|
packet.i32_1 = i32_1; |
||||
|
packet.f_1 = f_1; |
||||
|
packet.f_2 = f_2; |
||||
|
packet.f_3 = f_3; |
||||
|
packet.f_4 = f_4; |
||||
|
packet.f_5 = f_5; |
||||
|
packet.f_6 = f_6; |
||||
|
packet.f_7 = f_7; |
||||
|
packet.f_8 = f_8; |
||||
|
packet.i8_1 = i8_1; |
||||
|
packet.i8_2 = i8_2; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DEBUG, (const char *)&packet, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a aslctrl_debug message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_aslctrl_debug_send_struct(mavlink_channel_t chan, const mavlink_aslctrl_debug_t* aslctrl_debug) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_aslctrl_debug_send(chan, aslctrl_debug->i32_1, aslctrl_debug->i8_1, aslctrl_debug->i8_2, aslctrl_debug->f_1, aslctrl_debug->f_2, aslctrl_debug->f_3, aslctrl_debug->f_4, aslctrl_debug->f_5, aslctrl_debug->f_6, aslctrl_debug->f_7, aslctrl_debug->f_8); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DEBUG, (const char *)aslctrl_debug, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_aslctrl_debug_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t i32_1, uint8_t i8_1, uint8_t i8_2, float f_1, float f_2, float f_3, float f_4, float f_5, float f_6, float f_7, float f_8) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint32_t(buf, 0, i32_1); |
||||
|
_mav_put_float(buf, 4, f_1); |
||||
|
_mav_put_float(buf, 8, f_2); |
||||
|
_mav_put_float(buf, 12, f_3); |
||||
|
_mav_put_float(buf, 16, f_4); |
||||
|
_mav_put_float(buf, 20, f_5); |
||||
|
_mav_put_float(buf, 24, f_6); |
||||
|
_mav_put_float(buf, 28, f_7); |
||||
|
_mav_put_float(buf, 32, f_8); |
||||
|
_mav_put_uint8_t(buf, 36, i8_1); |
||||
|
_mav_put_uint8_t(buf, 37, i8_2); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DEBUG, buf, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
#else |
||||
|
mavlink_aslctrl_debug_t *packet = (mavlink_aslctrl_debug_t *)msgbuf; |
||||
|
packet->i32_1 = i32_1; |
||||
|
packet->f_1 = f_1; |
||||
|
packet->f_2 = f_2; |
||||
|
packet->f_3 = f_3; |
||||
|
packet->f_4 = f_4; |
||||
|
packet->f_5 = f_5; |
||||
|
packet->f_6 = f_6; |
||||
|
packet->f_7 = f_7; |
||||
|
packet->f_8 = f_8; |
||||
|
packet->i8_1 = i8_1; |
||||
|
packet->i8_2 = i8_2; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLCTRL_DEBUG, (const char *)packet, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE ASLCTRL_DEBUG UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field i32_1 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline uint32_t mavlink_msg_aslctrl_debug_get_i32_1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint32_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field i8_1 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_aslctrl_debug_get_i8_1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 36); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field i8_2 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_aslctrl_debug_get_i8_2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 37); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_1 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 4); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_2 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_3 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_3(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_4 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_4(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_5 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_5(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_6 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_6(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_7 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_7(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field f_8 from aslctrl_debug message |
||||
|
* |
||||
|
* @return Debug data |
||||
|
*/ |
||||
|
static inline float mavlink_msg_aslctrl_debug_get_f_8(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a aslctrl_debug message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param aslctrl_debug C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_aslctrl_debug_decode(const mavlink_message_t* msg, mavlink_aslctrl_debug_t* aslctrl_debug) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
aslctrl_debug->i32_1 = mavlink_msg_aslctrl_debug_get_i32_1(msg); |
||||
|
aslctrl_debug->f_1 = mavlink_msg_aslctrl_debug_get_f_1(msg); |
||||
|
aslctrl_debug->f_2 = mavlink_msg_aslctrl_debug_get_f_2(msg); |
||||
|
aslctrl_debug->f_3 = mavlink_msg_aslctrl_debug_get_f_3(msg); |
||||
|
aslctrl_debug->f_4 = mavlink_msg_aslctrl_debug_get_f_4(msg); |
||||
|
aslctrl_debug->f_5 = mavlink_msg_aslctrl_debug_get_f_5(msg); |
||||
|
aslctrl_debug->f_6 = mavlink_msg_aslctrl_debug_get_f_6(msg); |
||||
|
aslctrl_debug->f_7 = mavlink_msg_aslctrl_debug_get_f_7(msg); |
||||
|
aslctrl_debug->f_8 = mavlink_msg_aslctrl_debug_get_f_8(msg); |
||||
|
aslctrl_debug->i8_1 = mavlink_msg_aslctrl_debug_get_i8_1(msg); |
||||
|
aslctrl_debug->i8_2 = mavlink_msg_aslctrl_debug_get_i8_2(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN? msg->len : MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN; |
||||
|
memset(aslctrl_debug, 0, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN); |
||||
|
memcpy(aslctrl_debug, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,280 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE ASLUAV_STATUS PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLUAV_STATUS 205 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_asluav_status_t { |
||||
|
float Motor_rpm; /*< Motor RPM */ |
||||
|
uint8_t LED_status; /*< Status of the position-indicator LEDs*/ |
||||
|
uint8_t SATCOM_status; /*< Status of the IRIDIUM satellite communication system*/ |
||||
|
uint8_t Servo_status[8]; /*< Status vector for up to 8 servos*/ |
||||
|
}) mavlink_asluav_status_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLUAV_STATUS_LEN 14 |
||||
|
#define MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN 14 |
||||
|
#define MAVLINK_MSG_ID_205_LEN 14 |
||||
|
#define MAVLINK_MSG_ID_205_MIN_LEN 14 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_ASLUAV_STATUS_CRC 97 |
||||
|
#define MAVLINK_MSG_ID_205_CRC 97 |
||||
|
|
||||
|
#define MAVLINK_MSG_ASLUAV_STATUS_FIELD_SERVO_STATUS_LEN 8 |
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_ASLUAV_STATUS { \ |
||||
|
205, \ |
||||
|
"ASLUAV_STATUS", \ |
||||
|
4, \ |
||||
|
{ { "LED_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_asluav_status_t, LED_status) }, \ |
||||
|
{ "SATCOM_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_asluav_status_t, SATCOM_status) }, \ |
||||
|
{ "Servo_status", NULL, MAVLINK_TYPE_UINT8_T, 8, 6, offsetof(mavlink_asluav_status_t, Servo_status) }, \ |
||||
|
{ "Motor_rpm", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_asluav_status_t, Motor_rpm) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_ASLUAV_STATUS { \ |
||||
|
"ASLUAV_STATUS", \ |
||||
|
4, \ |
||||
|
{ { "LED_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_asluav_status_t, LED_status) }, \ |
||||
|
{ "SATCOM_status", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_asluav_status_t, SATCOM_status) }, \ |
||||
|
{ "Servo_status", NULL, MAVLINK_TYPE_UINT8_T, 8, 6, offsetof(mavlink_asluav_status_t, Servo_status) }, \ |
||||
|
{ "Motor_rpm", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_asluav_status_t, Motor_rpm) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a asluav_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 LED_status Status of the position-indicator LEDs |
||||
|
* @param SATCOM_status Status of the IRIDIUM satellite communication system |
||||
|
* @param Servo_status Status vector for up to 8 servos |
||||
|
* @param Motor_rpm Motor RPM |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asluav_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint8_t LED_status, uint8_t SATCOM_status, const uint8_t *Servo_status, float Motor_rpm) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLUAV_STATUS_LEN]; |
||||
|
_mav_put_float(buf, 0, Motor_rpm); |
||||
|
_mav_put_uint8_t(buf, 4, LED_status); |
||||
|
_mav_put_uint8_t(buf, 5, SATCOM_status); |
||||
|
_mav_put_uint8_t_array(buf, 6, Servo_status, 8); |
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN); |
||||
|
#else |
||||
|
mavlink_asluav_status_t packet; |
||||
|
packet.Motor_rpm = Motor_rpm; |
||||
|
packet.LED_status = LED_status; |
||||
|
packet.SATCOM_status = SATCOM_status; |
||||
|
mav_array_memcpy(packet.Servo_status, Servo_status, sizeof(uint8_t)*8); |
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASLUAV_STATUS; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a asluav_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 will be sent over |
||||
|
* @param msg The MAVLink message to compress the data into |
||||
|
* @param LED_status Status of the position-indicator LEDs |
||||
|
* @param SATCOM_status Status of the IRIDIUM satellite communication system |
||||
|
* @param Servo_status Status vector for up to 8 servos |
||||
|
* @param Motor_rpm Motor RPM |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asluav_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint8_t LED_status,uint8_t SATCOM_status,const uint8_t *Servo_status,float Motor_rpm) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLUAV_STATUS_LEN]; |
||||
|
_mav_put_float(buf, 0, Motor_rpm); |
||||
|
_mav_put_uint8_t(buf, 4, LED_status); |
||||
|
_mav_put_uint8_t(buf, 5, SATCOM_status); |
||||
|
_mav_put_uint8_t_array(buf, 6, Servo_status, 8); |
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN); |
||||
|
#else |
||||
|
mavlink_asluav_status_t packet; |
||||
|
packet.Motor_rpm = Motor_rpm; |
||||
|
packet.LED_status = LED_status; |
||||
|
packet.SATCOM_status = SATCOM_status; |
||||
|
mav_array_memcpy(packet.Servo_status, Servo_status, sizeof(uint8_t)*8); |
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_ASLUAV_STATUS; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a asluav_status 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 asluav_status C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asluav_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_asluav_status_t* asluav_status) |
||||
|
{ |
||||
|
return mavlink_msg_asluav_status_pack(system_id, component_id, msg, asluav_status->LED_status, asluav_status->SATCOM_status, asluav_status->Servo_status, asluav_status->Motor_rpm); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a asluav_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 asluav_status C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asluav_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_asluav_status_t* asluav_status) |
||||
|
{ |
||||
|
return mavlink_msg_asluav_status_pack_chan(system_id, component_id, chan, msg, asluav_status->LED_status, asluav_status->SATCOM_status, asluav_status->Servo_status, asluav_status->Motor_rpm); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a asluav_status message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param LED_status Status of the position-indicator LEDs |
||||
|
* @param SATCOM_status Status of the IRIDIUM satellite communication system |
||||
|
* @param Servo_status Status vector for up to 8 servos |
||||
|
* @param Motor_rpm Motor RPM |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_asluav_status_send(mavlink_channel_t chan, uint8_t LED_status, uint8_t SATCOM_status, const uint8_t *Servo_status, float Motor_rpm) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_ASLUAV_STATUS_LEN]; |
||||
|
_mav_put_float(buf, 0, Motor_rpm); |
||||
|
_mav_put_uint8_t(buf, 4, LED_status); |
||||
|
_mav_put_uint8_t(buf, 5, SATCOM_status); |
||||
|
_mav_put_uint8_t_array(buf, 6, Servo_status, 8); |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLUAV_STATUS, buf, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
#else |
||||
|
mavlink_asluav_status_t packet; |
||||
|
packet.Motor_rpm = Motor_rpm; |
||||
|
packet.LED_status = LED_status; |
||||
|
packet.SATCOM_status = SATCOM_status; |
||||
|
mav_array_memcpy(packet.Servo_status, Servo_status, sizeof(uint8_t)*8); |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLUAV_STATUS, (const char *)&packet, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a asluav_status message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_asluav_status_send_struct(mavlink_channel_t chan, const mavlink_asluav_status_t* asluav_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_asluav_status_send(chan, asluav_status->LED_status, asluav_status->SATCOM_status, asluav_status->Servo_status, asluav_status->Motor_rpm); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLUAV_STATUS, (const char *)asluav_status, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_ASLUAV_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_asluav_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t LED_status, uint8_t SATCOM_status, const uint8_t *Servo_status, float Motor_rpm) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_float(buf, 0, Motor_rpm); |
||||
|
_mav_put_uint8_t(buf, 4, LED_status); |
||||
|
_mav_put_uint8_t(buf, 5, SATCOM_status); |
||||
|
_mav_put_uint8_t_array(buf, 6, Servo_status, 8); |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLUAV_STATUS, buf, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
#else |
||||
|
mavlink_asluav_status_t *packet = (mavlink_asluav_status_t *)msgbuf; |
||||
|
packet->Motor_rpm = Motor_rpm; |
||||
|
packet->LED_status = LED_status; |
||||
|
packet->SATCOM_status = SATCOM_status; |
||||
|
mav_array_memcpy(packet->Servo_status, Servo_status, sizeof(uint8_t)*8); |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ASLUAV_STATUS, (const char *)packet, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE ASLUAV_STATUS UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field LED_status from asluav_status message |
||||
|
* |
||||
|
* @return Status of the position-indicator LEDs |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_asluav_status_get_LED_status(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 4); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field SATCOM_status from asluav_status message |
||||
|
* |
||||
|
* @return Status of the IRIDIUM satellite communication system |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_asluav_status_get_SATCOM_status(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 5); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field Servo_status from asluav_status message |
||||
|
* |
||||
|
* @return Status vector for up to 8 servos |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_asluav_status_get_Servo_status(const mavlink_message_t* msg, uint8_t *Servo_status) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t_array(msg, Servo_status, 8, 6); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field Motor_rpm from asluav_status message |
||||
|
* |
||||
|
* @return Motor RPM |
||||
|
*/ |
||||
|
static inline float mavlink_msg_asluav_status_get_Motor_rpm(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a asluav_status message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param asluav_status C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_asluav_status_decode(const mavlink_message_t* msg, mavlink_asluav_status_t* asluav_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
asluav_status->Motor_rpm = mavlink_msg_asluav_status_get_Motor_rpm(msg); |
||||
|
asluav_status->LED_status = mavlink_msg_asluav_status_get_LED_status(msg); |
||||
|
asluav_status->SATCOM_status = mavlink_msg_asluav_status_get_SATCOM_status(msg); |
||||
|
mavlink_msg_asluav_status_get_Servo_status(msg, asluav_status->Servo_status); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_ASLUAV_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ASLUAV_STATUS_LEN; |
||||
|
memset(asluav_status, 0, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN); |
||||
|
memcpy(asluav_status, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,563 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE COMMAND_INT_STAMPED PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_COMMAND_INT_STAMPED 78 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_command_int_stamped_t { |
||||
|
uint64_t vehicle_timestamp; /*< Microseconds elapsed since vehicle boot*/ |
||||
|
uint32_t utc_time; /*< UTC time, seconds elapsed since 01.01.1970*/ |
||||
|
float param1; /*< PARAM1, see MAV_CMD enum*/ |
||||
|
float param2; /*< PARAM2, see MAV_CMD enum*/ |
||||
|
float param3; /*< PARAM3, see MAV_CMD enum*/ |
||||
|
float param4; /*< PARAM4, see MAV_CMD enum*/ |
||||
|
int32_t x; /*< PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7*/ |
||||
|
int32_t y; /*< PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7*/ |
||||
|
float z; /*< PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame).*/ |
||||
|
uint16_t command; /*< The scheduled action for the mission item, as defined by MAV_CMD enum*/ |
||||
|
uint8_t target_system; /*< System ID*/ |
||||
|
uint8_t target_component; /*< Component ID*/ |
||||
|
uint8_t frame; /*< The coordinate system of the COMMAND, as defined by MAV_FRAME enum*/ |
||||
|
uint8_t current; /*< false:0, true:1*/ |
||||
|
uint8_t autocontinue; /*< autocontinue to next wp*/ |
||||
|
}) mavlink_command_int_stamped_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN 47 |
||||
|
#define MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN 47 |
||||
|
#define MAVLINK_MSG_ID_78_LEN 47 |
||||
|
#define MAVLINK_MSG_ID_78_MIN_LEN 47 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC 119 |
||||
|
#define MAVLINK_MSG_ID_78_CRC 119 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_COMMAND_INT_STAMPED { \ |
||||
|
78, \ |
||||
|
"COMMAND_INT_STAMPED", \ |
||||
|
15, \ |
||||
|
{ { "utc_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_command_int_stamped_t, utc_time) }, \ |
||||
|
{ "vehicle_timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_command_int_stamped_t, vehicle_timestamp) }, \ |
||||
|
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_command_int_stamped_t, target_system) }, \ |
||||
|
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_command_int_stamped_t, target_component) }, \ |
||||
|
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_command_int_stamped_t, frame) }, \ |
||||
|
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_command_int_stamped_t, command) }, \ |
||||
|
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_command_int_stamped_t, current) }, \ |
||||
|
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_command_int_stamped_t, autocontinue) }, \ |
||||
|
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_int_stamped_t, param1) }, \ |
||||
|
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_command_int_stamped_t, param2) }, \ |
||||
|
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_command_int_stamped_t, param3) }, \ |
||||
|
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_int_stamped_t, param4) }, \ |
||||
|
{ "x", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_command_int_stamped_t, x) }, \ |
||||
|
{ "y", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_command_int_stamped_t, y) }, \ |
||||
|
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_command_int_stamped_t, z) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_COMMAND_INT_STAMPED { \ |
||||
|
"COMMAND_INT_STAMPED", \ |
||||
|
15, \ |
||||
|
{ { "utc_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_command_int_stamped_t, utc_time) }, \ |
||||
|
{ "vehicle_timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_command_int_stamped_t, vehicle_timestamp) }, \ |
||||
|
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_command_int_stamped_t, target_system) }, \ |
||||
|
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_command_int_stamped_t, target_component) }, \ |
||||
|
{ "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_command_int_stamped_t, frame) }, \ |
||||
|
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_command_int_stamped_t, command) }, \ |
||||
|
{ "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 45, offsetof(mavlink_command_int_stamped_t, current) }, \ |
||||
|
{ "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 46, offsetof(mavlink_command_int_stamped_t, autocontinue) }, \ |
||||
|
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_int_stamped_t, param1) }, \ |
||||
|
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_command_int_stamped_t, param2) }, \ |
||||
|
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_command_int_stamped_t, param3) }, \ |
||||
|
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_int_stamped_t, param4) }, \ |
||||
|
{ "x", NULL, MAVLINK_TYPE_INT32_T, 0, 28, offsetof(mavlink_command_int_stamped_t, x) }, \ |
||||
|
{ "y", NULL, MAVLINK_TYPE_INT32_T, 0, 32, offsetof(mavlink_command_int_stamped_t, y) }, \ |
||||
|
{ "z", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_command_int_stamped_t, z) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a command_int_stamped 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 utc_time UTC time, seconds elapsed since 01.01.1970 |
||||
|
* @param vehicle_timestamp Microseconds elapsed since vehicle boot |
||||
|
* @param target_system System ID |
||||
|
* @param target_component Component ID |
||||
|
* @param frame The coordinate system of the COMMAND, as defined by MAV_FRAME enum |
||||
|
* @param command The scheduled action for the mission item, as defined by MAV_CMD enum |
||||
|
* @param current false:0, true:1 |
||||
|
* @param autocontinue autocontinue to next wp |
||||
|
* @param param1 PARAM1, see MAV_CMD enum |
||||
|
* @param param2 PARAM2, see MAV_CMD enum |
||||
|
* @param param3 PARAM3, see MAV_CMD enum |
||||
|
* @param param4 PARAM4, see MAV_CMD enum |
||||
|
* @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 |
||||
|
* @param y PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 |
||||
|
* @param z PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame). |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_int_stamped_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, int32_t x, int32_t y, float z) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_int32_t(buf, 28, x); |
||||
|
_mav_put_int32_t(buf, 32, y); |
||||
|
_mav_put_float(buf, 36, z); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, frame); |
||||
|
_mav_put_uint8_t(buf, 45, current); |
||||
|
_mav_put_uint8_t(buf, 46, autocontinue); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN); |
||||
|
#else |
||||
|
mavlink_command_int_stamped_t packet; |
||||
|
packet.vehicle_timestamp = vehicle_timestamp; |
||||
|
packet.utc_time = utc_time; |
||||
|
packet.param1 = param1; |
||||
|
packet.param2 = param2; |
||||
|
packet.param3 = param3; |
||||
|
packet.param4 = param4; |
||||
|
packet.x = x; |
||||
|
packet.y = y; |
||||
|
packet.z = z; |
||||
|
packet.command = command; |
||||
|
packet.target_system = target_system; |
||||
|
packet.target_component = target_component; |
||||
|
packet.frame = frame; |
||||
|
packet.current = current; |
||||
|
packet.autocontinue = autocontinue; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_COMMAND_INT_STAMPED; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a command_int_stamped 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 utc_time UTC time, seconds elapsed since 01.01.1970 |
||||
|
* @param vehicle_timestamp Microseconds elapsed since vehicle boot |
||||
|
* @param target_system System ID |
||||
|
* @param target_component Component ID |
||||
|
* @param frame The coordinate system of the COMMAND, as defined by MAV_FRAME enum |
||||
|
* @param command The scheduled action for the mission item, as defined by MAV_CMD enum |
||||
|
* @param current false:0, true:1 |
||||
|
* @param autocontinue autocontinue to next wp |
||||
|
* @param param1 PARAM1, see MAV_CMD enum |
||||
|
* @param param2 PARAM2, see MAV_CMD enum |
||||
|
* @param param3 PARAM3, see MAV_CMD enum |
||||
|
* @param param4 PARAM4, see MAV_CMD enum |
||||
|
* @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 |
||||
|
* @param y PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 |
||||
|
* @param z PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame). |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_int_stamped_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint32_t utc_time,uint64_t vehicle_timestamp,uint8_t target_system,uint8_t target_component,uint8_t frame,uint16_t command,uint8_t current,uint8_t autocontinue,float param1,float param2,float param3,float param4,int32_t x,int32_t y,float z) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_int32_t(buf, 28, x); |
||||
|
_mav_put_int32_t(buf, 32, y); |
||||
|
_mav_put_float(buf, 36, z); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, frame); |
||||
|
_mav_put_uint8_t(buf, 45, current); |
||||
|
_mav_put_uint8_t(buf, 46, autocontinue); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN); |
||||
|
#else |
||||
|
mavlink_command_int_stamped_t packet; |
||||
|
packet.vehicle_timestamp = vehicle_timestamp; |
||||
|
packet.utc_time = utc_time; |
||||
|
packet.param1 = param1; |
||||
|
packet.param2 = param2; |
||||
|
packet.param3 = param3; |
||||
|
packet.param4 = param4; |
||||
|
packet.x = x; |
||||
|
packet.y = y; |
||||
|
packet.z = z; |
||||
|
packet.command = command; |
||||
|
packet.target_system = target_system; |
||||
|
packet.target_component = target_component; |
||||
|
packet.frame = frame; |
||||
|
packet.current = current; |
||||
|
packet.autocontinue = autocontinue; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_COMMAND_INT_STAMPED; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a command_int_stamped 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 command_int_stamped C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_int_stamped_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_command_int_stamped_t* command_int_stamped) |
||||
|
{ |
||||
|
return mavlink_msg_command_int_stamped_pack(system_id, component_id, msg, command_int_stamped->utc_time, command_int_stamped->vehicle_timestamp, command_int_stamped->target_system, command_int_stamped->target_component, command_int_stamped->frame, command_int_stamped->command, command_int_stamped->current, command_int_stamped->autocontinue, command_int_stamped->param1, command_int_stamped->param2, command_int_stamped->param3, command_int_stamped->param4, command_int_stamped->x, command_int_stamped->y, command_int_stamped->z); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a command_int_stamped 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_int_stamped C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_int_stamped_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_command_int_stamped_t* command_int_stamped) |
||||
|
{ |
||||
|
return mavlink_msg_command_int_stamped_pack_chan(system_id, component_id, chan, msg, command_int_stamped->utc_time, command_int_stamped->vehicle_timestamp, command_int_stamped->target_system, command_int_stamped->target_component, command_int_stamped->frame, command_int_stamped->command, command_int_stamped->current, command_int_stamped->autocontinue, command_int_stamped->param1, command_int_stamped->param2, command_int_stamped->param3, command_int_stamped->param4, command_int_stamped->x, command_int_stamped->y, command_int_stamped->z); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a command_int_stamped message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param utc_time UTC time, seconds elapsed since 01.01.1970 |
||||
|
* @param vehicle_timestamp Microseconds elapsed since vehicle boot |
||||
|
* @param target_system System ID |
||||
|
* @param target_component Component ID |
||||
|
* @param frame The coordinate system of the COMMAND, as defined by MAV_FRAME enum |
||||
|
* @param command The scheduled action for the mission item, as defined by MAV_CMD enum |
||||
|
* @param current false:0, true:1 |
||||
|
* @param autocontinue autocontinue to next wp |
||||
|
* @param param1 PARAM1, see MAV_CMD enum |
||||
|
* @param param2 PARAM2, see MAV_CMD enum |
||||
|
* @param param3 PARAM3, see MAV_CMD enum |
||||
|
* @param param4 PARAM4, see MAV_CMD enum |
||||
|
* @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 |
||||
|
* @param y PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 |
||||
|
* @param z PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame). |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_command_int_stamped_send(mavlink_channel_t chan, uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, int32_t x, int32_t y, float z) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_int32_t(buf, 28, x); |
||||
|
_mav_put_int32_t(buf, 32, y); |
||||
|
_mav_put_float(buf, 36, z); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, frame); |
||||
|
_mav_put_uint8_t(buf, 45, current); |
||||
|
_mav_put_uint8_t(buf, 46, autocontinue); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT_STAMPED, buf, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
#else |
||||
|
mavlink_command_int_stamped_t packet; |
||||
|
packet.vehicle_timestamp = vehicle_timestamp; |
||||
|
packet.utc_time = utc_time; |
||||
|
packet.param1 = param1; |
||||
|
packet.param2 = param2; |
||||
|
packet.param3 = param3; |
||||
|
packet.param4 = param4; |
||||
|
packet.x = x; |
||||
|
packet.y = y; |
||||
|
packet.z = z; |
||||
|
packet.command = command; |
||||
|
packet.target_system = target_system; |
||||
|
packet.target_component = target_component; |
||||
|
packet.frame = frame; |
||||
|
packet.current = current; |
||||
|
packet.autocontinue = autocontinue; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT_STAMPED, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a command_int_stamped message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_command_int_stamped_send_struct(mavlink_channel_t chan, const mavlink_command_int_stamped_t* command_int_stamped) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_command_int_stamped_send(chan, command_int_stamped->utc_time, command_int_stamped->vehicle_timestamp, command_int_stamped->target_system, command_int_stamped->target_component, command_int_stamped->frame, command_int_stamped->command, command_int_stamped->current, command_int_stamped->autocontinue, command_int_stamped->param1, command_int_stamped->param2, command_int_stamped->param3, command_int_stamped->param4, command_int_stamped->x, command_int_stamped->y, command_int_stamped->z); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT_STAMPED, (const char *)command_int_stamped, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_command_int_stamped_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, int32_t x, int32_t y, float z) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_int32_t(buf, 28, x); |
||||
|
_mav_put_int32_t(buf, 32, y); |
||||
|
_mav_put_float(buf, 36, z); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, frame); |
||||
|
_mav_put_uint8_t(buf, 45, current); |
||||
|
_mav_put_uint8_t(buf, 46, autocontinue); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT_STAMPED, buf, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
#else |
||||
|
mavlink_command_int_stamped_t *packet = (mavlink_command_int_stamped_t *)msgbuf; |
||||
|
packet->vehicle_timestamp = vehicle_timestamp; |
||||
|
packet->utc_time = utc_time; |
||||
|
packet->param1 = param1; |
||||
|
packet->param2 = param2; |
||||
|
packet->param3 = param3; |
||||
|
packet->param4 = param4; |
||||
|
packet->x = x; |
||||
|
packet->y = y; |
||||
|
packet->z = z; |
||||
|
packet->command = command; |
||||
|
packet->target_system = target_system; |
||||
|
packet->target_component = target_component; |
||||
|
packet->frame = frame; |
||||
|
packet->current = current; |
||||
|
packet->autocontinue = autocontinue; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT_STAMPED, (const char *)packet, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE COMMAND_INT_STAMPED UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field utc_time from command_int_stamped message |
||||
|
* |
||||
|
* @return UTC time, seconds elapsed since 01.01.1970 |
||||
|
*/ |
||||
|
static inline uint32_t mavlink_msg_command_int_stamped_get_utc_time(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint32_t(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field vehicle_timestamp from command_int_stamped message |
||||
|
* |
||||
|
* @return Microseconds elapsed since vehicle boot |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_command_int_stamped_get_vehicle_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field target_system from command_int_stamped message |
||||
|
* |
||||
|
* @return System ID |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_int_stamped_get_target_system(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 42); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field target_component from command_int_stamped message |
||||
|
* |
||||
|
* @return Component ID |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_int_stamped_get_target_component(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 43); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field frame from command_int_stamped message |
||||
|
* |
||||
|
* @return The coordinate system of the COMMAND, as defined by MAV_FRAME enum |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_int_stamped_get_frame(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 44); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field command from command_int_stamped message |
||||
|
* |
||||
|
* @return The scheduled action for the mission item, as defined by MAV_CMD enum |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_int_stamped_get_command(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 40); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field current from command_int_stamped message |
||||
|
* |
||||
|
* @return false:0, true:1 |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_int_stamped_get_current(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 45); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field autocontinue from command_int_stamped message |
||||
|
* |
||||
|
* @return autocontinue to next wp |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_int_stamped_get_autocontinue(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 46); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param1 from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM1, see MAV_CMD enum |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_int_stamped_get_param1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param2 from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM2, see MAV_CMD enum |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_int_stamped_get_param2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param3 from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM3, see MAV_CMD enum |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_int_stamped_get_param3(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param4 from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM4, see MAV_CMD enum |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_int_stamped_get_param4(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field x from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7 |
||||
|
*/ |
||||
|
static inline int32_t mavlink_msg_command_int_stamped_get_x(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_int32_t(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field y from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7 |
||||
|
*/ |
||||
|
static inline int32_t mavlink_msg_command_int_stamped_get_y(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_int32_t(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field z from command_int_stamped message |
||||
|
* |
||||
|
* @return PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame). |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_int_stamped_get_z(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 36); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a command_int_stamped message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param command_int_stamped C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_command_int_stamped_decode(const mavlink_message_t* msg, mavlink_command_int_stamped_t* command_int_stamped) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
command_int_stamped->vehicle_timestamp = mavlink_msg_command_int_stamped_get_vehicle_timestamp(msg); |
||||
|
command_int_stamped->utc_time = mavlink_msg_command_int_stamped_get_utc_time(msg); |
||||
|
command_int_stamped->param1 = mavlink_msg_command_int_stamped_get_param1(msg); |
||||
|
command_int_stamped->param2 = mavlink_msg_command_int_stamped_get_param2(msg); |
||||
|
command_int_stamped->param3 = mavlink_msg_command_int_stamped_get_param3(msg); |
||||
|
command_int_stamped->param4 = mavlink_msg_command_int_stamped_get_param4(msg); |
||||
|
command_int_stamped->x = mavlink_msg_command_int_stamped_get_x(msg); |
||||
|
command_int_stamped->y = mavlink_msg_command_int_stamped_get_y(msg); |
||||
|
command_int_stamped->z = mavlink_msg_command_int_stamped_get_z(msg); |
||||
|
command_int_stamped->command = mavlink_msg_command_int_stamped_get_command(msg); |
||||
|
command_int_stamped->target_system = mavlink_msg_command_int_stamped_get_target_system(msg); |
||||
|
command_int_stamped->target_component = mavlink_msg_command_int_stamped_get_target_component(msg); |
||||
|
command_int_stamped->frame = mavlink_msg_command_int_stamped_get_frame(msg); |
||||
|
command_int_stamped->current = mavlink_msg_command_int_stamped_get_current(msg); |
||||
|
command_int_stamped->autocontinue = mavlink_msg_command_int_stamped_get_autocontinue(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN? msg->len : MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN; |
||||
|
memset(command_int_stamped, 0, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN); |
||||
|
memcpy(command_int_stamped, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,513 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE COMMAND_LONG_STAMPED PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_COMMAND_LONG_STAMPED 79 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_command_long_stamped_t { |
||||
|
uint64_t vehicle_timestamp; /*< Microseconds elapsed since vehicle boot*/ |
||||
|
uint32_t utc_time; /*< UTC time, seconds elapsed since 01.01.1970*/ |
||||
|
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.*/ |
||||
|
float param5; /*< Parameter 5, as defined by MAV_CMD enum.*/ |
||||
|
float param6; /*< Parameter 6, as defined by MAV_CMD enum.*/ |
||||
|
float param7; /*< Parameter 7, as defined by MAV_CMD enum.*/ |
||||
|
uint16_t command; /*< Command ID, 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 confirmation; /*< 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)*/ |
||||
|
}) mavlink_command_long_stamped_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN 45 |
||||
|
#define MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN 45 |
||||
|
#define MAVLINK_MSG_ID_79_LEN 45 |
||||
|
#define MAVLINK_MSG_ID_79_MIN_LEN 45 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC 102 |
||||
|
#define MAVLINK_MSG_ID_79_CRC 102 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_COMMAND_LONG_STAMPED { \ |
||||
|
79, \ |
||||
|
"COMMAND_LONG_STAMPED", \ |
||||
|
13, \ |
||||
|
{ { "utc_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_command_long_stamped_t, utc_time) }, \ |
||||
|
{ "vehicle_timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_command_long_stamped_t, vehicle_timestamp) }, \ |
||||
|
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_command_long_stamped_t, target_system) }, \ |
||||
|
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_command_long_stamped_t, target_component) }, \ |
||||
|
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_command_long_stamped_t, command) }, \ |
||||
|
{ "confirmation", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_command_long_stamped_t, confirmation) }, \ |
||||
|
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_long_stamped_t, param1) }, \ |
||||
|
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_command_long_stamped_t, param2) }, \ |
||||
|
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_command_long_stamped_t, param3) }, \ |
||||
|
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_long_stamped_t, param4) }, \ |
||||
|
{ "param5", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_command_long_stamped_t, param5) }, \ |
||||
|
{ "param6", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_command_long_stamped_t, param6) }, \ |
||||
|
{ "param7", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_command_long_stamped_t, param7) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_COMMAND_LONG_STAMPED { \ |
||||
|
"COMMAND_LONG_STAMPED", \ |
||||
|
13, \ |
||||
|
{ { "utc_time", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_command_long_stamped_t, utc_time) }, \ |
||||
|
{ "vehicle_timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_command_long_stamped_t, vehicle_timestamp) }, \ |
||||
|
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_command_long_stamped_t, target_system) }, \ |
||||
|
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_command_long_stamped_t, target_component) }, \ |
||||
|
{ "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 40, offsetof(mavlink_command_long_stamped_t, command) }, \ |
||||
|
{ "confirmation", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_command_long_stamped_t, confirmation) }, \ |
||||
|
{ "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_long_stamped_t, param1) }, \ |
||||
|
{ "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_command_long_stamped_t, param2) }, \ |
||||
|
{ "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_command_long_stamped_t, param3) }, \ |
||||
|
{ "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_long_stamped_t, param4) }, \ |
||||
|
{ "param5", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_command_long_stamped_t, param5) }, \ |
||||
|
{ "param6", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_command_long_stamped_t, param6) }, \ |
||||
|
{ "param7", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_command_long_stamped_t, param7) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a command_long_stamped 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 utc_time UTC time, seconds elapsed since 01.01.1970 |
||||
|
* @param vehicle_timestamp Microseconds elapsed since vehicle boot |
||||
|
* @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. |
||||
|
* @param param5 Parameter 5, as defined by MAV_CMD enum. |
||||
|
* @param param6 Parameter 6, as defined by MAV_CMD enum. |
||||
|
* @param param7 Parameter 7, 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_long_stamped_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_float(buf, 28, param5); |
||||
|
_mav_put_float(buf, 32, param6); |
||||
|
_mav_put_float(buf, 36, param7); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, confirmation); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN); |
||||
|
#else |
||||
|
mavlink_command_long_stamped_t packet; |
||||
|
packet.vehicle_timestamp = vehicle_timestamp; |
||||
|
packet.utc_time = utc_time; |
||||
|
packet.param1 = param1; |
||||
|
packet.param2 = param2; |
||||
|
packet.param3 = param3; |
||||
|
packet.param4 = param4; |
||||
|
packet.param5 = param5; |
||||
|
packet.param6 = param6; |
||||
|
packet.param7 = param7; |
||||
|
packet.command = command; |
||||
|
packet.target_system = target_system; |
||||
|
packet.target_component = target_component; |
||||
|
packet.confirmation = confirmation; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG_STAMPED; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a command_long_stamped 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 utc_time UTC time, seconds elapsed since 01.01.1970 |
||||
|
* @param vehicle_timestamp Microseconds elapsed since vehicle boot |
||||
|
* @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. |
||||
|
* @param param5 Parameter 5, as defined by MAV_CMD enum. |
||||
|
* @param param6 Parameter 6, as defined by MAV_CMD enum. |
||||
|
* @param param7 Parameter 7, 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_long_stamped_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint32_t utc_time,uint64_t vehicle_timestamp,uint8_t target_system,uint8_t target_component,uint16_t command,uint8_t confirmation,float param1,float param2,float param3,float param4,float param5,float param6,float param7) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_float(buf, 28, param5); |
||||
|
_mav_put_float(buf, 32, param6); |
||||
|
_mav_put_float(buf, 36, param7); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, confirmation); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN); |
||||
|
#else |
||||
|
mavlink_command_long_stamped_t packet; |
||||
|
packet.vehicle_timestamp = vehicle_timestamp; |
||||
|
packet.utc_time = utc_time; |
||||
|
packet.param1 = param1; |
||||
|
packet.param2 = param2; |
||||
|
packet.param3 = param3; |
||||
|
packet.param4 = param4; |
||||
|
packet.param5 = param5; |
||||
|
packet.param6 = param6; |
||||
|
packet.param7 = param7; |
||||
|
packet.command = command; |
||||
|
packet.target_system = target_system; |
||||
|
packet.target_component = target_component; |
||||
|
packet.confirmation = confirmation; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG_STAMPED; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a command_long_stamped 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 command_long_stamped C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_long_stamped_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_command_long_stamped_t* command_long_stamped) |
||||
|
{ |
||||
|
return mavlink_msg_command_long_stamped_pack(system_id, component_id, msg, command_long_stamped->utc_time, command_long_stamped->vehicle_timestamp, command_long_stamped->target_system, command_long_stamped->target_component, command_long_stamped->command, command_long_stamped->confirmation, command_long_stamped->param1, command_long_stamped->param2, command_long_stamped->param3, command_long_stamped->param4, command_long_stamped->param5, command_long_stamped->param6, command_long_stamped->param7); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a command_long_stamped 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_stamped C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_long_stamped_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_command_long_stamped_t* command_long_stamped) |
||||
|
{ |
||||
|
return mavlink_msg_command_long_stamped_pack_chan(system_id, component_id, chan, msg, command_long_stamped->utc_time, command_long_stamped->vehicle_timestamp, command_long_stamped->target_system, command_long_stamped->target_component, command_long_stamped->command, command_long_stamped->confirmation, command_long_stamped->param1, command_long_stamped->param2, command_long_stamped->param3, command_long_stamped->param4, command_long_stamped->param5, command_long_stamped->param6, command_long_stamped->param7); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a command_long_stamped message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param utc_time UTC time, seconds elapsed since 01.01.1970 |
||||
|
* @param vehicle_timestamp Microseconds elapsed since vehicle boot |
||||
|
* @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. |
||||
|
* @param param5 Parameter 5, as defined by MAV_CMD enum. |
||||
|
* @param param6 Parameter 6, as defined by MAV_CMD enum. |
||||
|
* @param param7 Parameter 7, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_command_long_stamped_send(mavlink_channel_t chan, uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_float(buf, 28, param5); |
||||
|
_mav_put_float(buf, 32, param6); |
||||
|
_mav_put_float(buf, 36, param7); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, confirmation); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED, buf, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
#else |
||||
|
mavlink_command_long_stamped_t packet; |
||||
|
packet.vehicle_timestamp = vehicle_timestamp; |
||||
|
packet.utc_time = utc_time; |
||||
|
packet.param1 = param1; |
||||
|
packet.param2 = param2; |
||||
|
packet.param3 = param3; |
||||
|
packet.param4 = param4; |
||||
|
packet.param5 = param5; |
||||
|
packet.param6 = param6; |
||||
|
packet.param7 = param7; |
||||
|
packet.command = command; |
||||
|
packet.target_system = target_system; |
||||
|
packet.target_component = target_component; |
||||
|
packet.confirmation = confirmation; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED, (const char *)&packet, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a command_long_stamped message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_command_long_stamped_send_struct(mavlink_channel_t chan, const mavlink_command_long_stamped_t* command_long_stamped) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_command_long_stamped_send(chan, command_long_stamped->utc_time, command_long_stamped->vehicle_timestamp, command_long_stamped->target_system, command_long_stamped->target_component, command_long_stamped->command, command_long_stamped->confirmation, command_long_stamped->param1, command_long_stamped->param2, command_long_stamped->param3, command_long_stamped->param4, command_long_stamped->param5, command_long_stamped->param6, command_long_stamped->param7); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED, (const char *)command_long_stamped, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_command_long_stamped_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, vehicle_timestamp); |
||||
|
_mav_put_uint32_t(buf, 8, utc_time); |
||||
|
_mav_put_float(buf, 12, param1); |
||||
|
_mav_put_float(buf, 16, param2); |
||||
|
_mav_put_float(buf, 20, param3); |
||||
|
_mav_put_float(buf, 24, param4); |
||||
|
_mav_put_float(buf, 28, param5); |
||||
|
_mav_put_float(buf, 32, param6); |
||||
|
_mav_put_float(buf, 36, param7); |
||||
|
_mav_put_uint16_t(buf, 40, command); |
||||
|
_mav_put_uint8_t(buf, 42, target_system); |
||||
|
_mav_put_uint8_t(buf, 43, target_component); |
||||
|
_mav_put_uint8_t(buf, 44, confirmation); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED, buf, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
#else |
||||
|
mavlink_command_long_stamped_t *packet = (mavlink_command_long_stamped_t *)msgbuf; |
||||
|
packet->vehicle_timestamp = vehicle_timestamp; |
||||
|
packet->utc_time = utc_time; |
||||
|
packet->param1 = param1; |
||||
|
packet->param2 = param2; |
||||
|
packet->param3 = param3; |
||||
|
packet->param4 = param4; |
||||
|
packet->param5 = param5; |
||||
|
packet->param6 = param6; |
||||
|
packet->param7 = param7; |
||||
|
packet->command = command; |
||||
|
packet->target_system = target_system; |
||||
|
packet->target_component = target_component; |
||||
|
packet->confirmation = confirmation; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED, (const char *)packet, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE COMMAND_LONG_STAMPED UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field utc_time from command_long_stamped message |
||||
|
* |
||||
|
* @return UTC time, seconds elapsed since 01.01.1970 |
||||
|
*/ |
||||
|
static inline uint32_t mavlink_msg_command_long_stamped_get_utc_time(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint32_t(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field vehicle_timestamp from command_long_stamped message |
||||
|
* |
||||
|
* @return Microseconds elapsed since vehicle boot |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_command_long_stamped_get_vehicle_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field target_system from command_long_stamped message |
||||
|
* |
||||
|
* @return System which should execute the command |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_long_stamped_get_target_system(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 42); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field target_component from command_long_stamped message |
||||
|
* |
||||
|
* @return Component which should execute the command, 0 for all components |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_long_stamped_get_target_component(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 43); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field command from command_long_stamped message |
||||
|
* |
||||
|
* @return Command ID, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_command_long_stamped_get_command(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 40); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field confirmation from command_long_stamped message |
||||
|
* |
||||
|
* @return 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command) |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_command_long_stamped_get_confirmation(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 44); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param1 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 1, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param2 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 2, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param3 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 3, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param3(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param4 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 4, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param4(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param5 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 5, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param5(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param6 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 6, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param6(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field param7 from command_long_stamped message |
||||
|
* |
||||
|
* @return Parameter 7, as defined by MAV_CMD enum. |
||||
|
*/ |
||||
|
static inline float mavlink_msg_command_long_stamped_get_param7(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 36); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a command_long_stamped message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param command_long_stamped C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_command_long_stamped_decode(const mavlink_message_t* msg, mavlink_command_long_stamped_t* command_long_stamped) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
command_long_stamped->vehicle_timestamp = mavlink_msg_command_long_stamped_get_vehicle_timestamp(msg); |
||||
|
command_long_stamped->utc_time = mavlink_msg_command_long_stamped_get_utc_time(msg); |
||||
|
command_long_stamped->param1 = mavlink_msg_command_long_stamped_get_param1(msg); |
||||
|
command_long_stamped->param2 = mavlink_msg_command_long_stamped_get_param2(msg); |
||||
|
command_long_stamped->param3 = mavlink_msg_command_long_stamped_get_param3(msg); |
||||
|
command_long_stamped->param4 = mavlink_msg_command_long_stamped_get_param4(msg); |
||||
|
command_long_stamped->param5 = mavlink_msg_command_long_stamped_get_param5(msg); |
||||
|
command_long_stamped->param6 = mavlink_msg_command_long_stamped_get_param6(msg); |
||||
|
command_long_stamped->param7 = mavlink_msg_command_long_stamped_get_param7(msg); |
||||
|
command_long_stamped->command = mavlink_msg_command_long_stamped_get_command(msg); |
||||
|
command_long_stamped->target_system = mavlink_msg_command_long_stamped_get_target_system(msg); |
||||
|
command_long_stamped->target_component = mavlink_msg_command_long_stamped_get_target_component(msg); |
||||
|
command_long_stamped->confirmation = mavlink_msg_command_long_stamped_get_confirmation(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN? msg->len : MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN; |
||||
|
memset(command_long_stamped, 0, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN); |
||||
|
memcpy(command_long_stamped, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,363 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE EKF_EXT PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_EKF_EXT 206 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_ekf_ext_t { |
||||
|
uint64_t timestamp; /*< [us] Time since system start*/ |
||||
|
float Windspeed; /*< [m/s] Magnitude of wind velocity (in lateral inertial plane)*/ |
||||
|
float WindDir; /*< [rad] Wind heading angle from North*/ |
||||
|
float WindZ; /*< [m/s] Z (Down) component of inertial wind velocity*/ |
||||
|
float Airspeed; /*< [m/s] Magnitude of air velocity*/ |
||||
|
float beta; /*< [rad] Sideslip angle*/ |
||||
|
float alpha; /*< [rad] Angle of attack*/ |
||||
|
}) mavlink_ekf_ext_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_EKF_EXT_LEN 32 |
||||
|
#define MAVLINK_MSG_ID_EKF_EXT_MIN_LEN 32 |
||||
|
#define MAVLINK_MSG_ID_206_LEN 32 |
||||
|
#define MAVLINK_MSG_ID_206_MIN_LEN 32 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_EKF_EXT_CRC 64 |
||||
|
#define MAVLINK_MSG_ID_206_CRC 64 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_EKF_EXT { \ |
||||
|
206, \ |
||||
|
"EKF_EXT", \ |
||||
|
7, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_ekf_ext_t, timestamp) }, \ |
||||
|
{ "Windspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_ekf_ext_t, Windspeed) }, \ |
||||
|
{ "WindDir", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_ekf_ext_t, WindDir) }, \ |
||||
|
{ "WindZ", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_ekf_ext_t, WindZ) }, \ |
||||
|
{ "Airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_ekf_ext_t, Airspeed) }, \ |
||||
|
{ "beta", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_ekf_ext_t, beta) }, \ |
||||
|
{ "alpha", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_ekf_ext_t, alpha) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_EKF_EXT { \ |
||||
|
"EKF_EXT", \ |
||||
|
7, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_ekf_ext_t, timestamp) }, \ |
||||
|
{ "Windspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_ekf_ext_t, Windspeed) }, \ |
||||
|
{ "WindDir", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_ekf_ext_t, WindDir) }, \ |
||||
|
{ "WindZ", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_ekf_ext_t, WindZ) }, \ |
||||
|
{ "Airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_ekf_ext_t, Airspeed) }, \ |
||||
|
{ "beta", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_ekf_ext_t, beta) }, \ |
||||
|
{ "alpha", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_ekf_ext_t, alpha) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a ekf_ext 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 timestamp [us] Time since system start |
||||
|
* @param Windspeed [m/s] Magnitude of wind velocity (in lateral inertial plane) |
||||
|
* @param WindDir [rad] Wind heading angle from North |
||||
|
* @param WindZ [m/s] Z (Down) component of inertial wind velocity |
||||
|
* @param Airspeed [m/s] Magnitude of air velocity |
||||
|
* @param beta [rad] Sideslip angle |
||||
|
* @param alpha [rad] Angle of attack |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_ekf_ext_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t timestamp, float Windspeed, float WindDir, float WindZ, float Airspeed, float beta, float alpha) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_EKF_EXT_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, Windspeed); |
||||
|
_mav_put_float(buf, 12, WindDir); |
||||
|
_mav_put_float(buf, 16, WindZ); |
||||
|
_mav_put_float(buf, 20, Airspeed); |
||||
|
_mav_put_float(buf, 24, beta); |
||||
|
_mav_put_float(buf, 28, alpha); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EKF_EXT_LEN); |
||||
|
#else |
||||
|
mavlink_ekf_ext_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.Windspeed = Windspeed; |
||||
|
packet.WindDir = WindDir; |
||||
|
packet.WindZ = WindZ; |
||||
|
packet.Airspeed = Airspeed; |
||||
|
packet.beta = beta; |
||||
|
packet.alpha = alpha; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EKF_EXT_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_EKF_EXT; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a ekf_ext 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 timestamp [us] Time since system start |
||||
|
* @param Windspeed [m/s] Magnitude of wind velocity (in lateral inertial plane) |
||||
|
* @param WindDir [rad] Wind heading angle from North |
||||
|
* @param WindZ [m/s] Z (Down) component of inertial wind velocity |
||||
|
* @param Airspeed [m/s] Magnitude of air velocity |
||||
|
* @param beta [rad] Sideslip angle |
||||
|
* @param alpha [rad] Angle of attack |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_ekf_ext_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t timestamp,float Windspeed,float WindDir,float WindZ,float Airspeed,float beta,float alpha) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_EKF_EXT_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, Windspeed); |
||||
|
_mav_put_float(buf, 12, WindDir); |
||||
|
_mav_put_float(buf, 16, WindZ); |
||||
|
_mav_put_float(buf, 20, Airspeed); |
||||
|
_mav_put_float(buf, 24, beta); |
||||
|
_mav_put_float(buf, 28, alpha); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EKF_EXT_LEN); |
||||
|
#else |
||||
|
mavlink_ekf_ext_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.Windspeed = Windspeed; |
||||
|
packet.WindDir = WindDir; |
||||
|
packet.WindZ = WindZ; |
||||
|
packet.Airspeed = Airspeed; |
||||
|
packet.beta = beta; |
||||
|
packet.alpha = alpha; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EKF_EXT_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_EKF_EXT; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a ekf_ext 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 ekf_ext C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_ekf_ext_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ekf_ext_t* ekf_ext) |
||||
|
{ |
||||
|
return mavlink_msg_ekf_ext_pack(system_id, component_id, msg, ekf_ext->timestamp, ekf_ext->Windspeed, ekf_ext->WindDir, ekf_ext->WindZ, ekf_ext->Airspeed, ekf_ext->beta, ekf_ext->alpha); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a ekf_ext 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 ekf_ext C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_ekf_ext_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ekf_ext_t* ekf_ext) |
||||
|
{ |
||||
|
return mavlink_msg_ekf_ext_pack_chan(system_id, component_id, chan, msg, ekf_ext->timestamp, ekf_ext->Windspeed, ekf_ext->WindDir, ekf_ext->WindZ, ekf_ext->Airspeed, ekf_ext->beta, ekf_ext->alpha); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a ekf_ext message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param timestamp [us] Time since system start |
||||
|
* @param Windspeed [m/s] Magnitude of wind velocity (in lateral inertial plane) |
||||
|
* @param WindDir [rad] Wind heading angle from North |
||||
|
* @param WindZ [m/s] Z (Down) component of inertial wind velocity |
||||
|
* @param Airspeed [m/s] Magnitude of air velocity |
||||
|
* @param beta [rad] Sideslip angle |
||||
|
* @param alpha [rad] Angle of attack |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_ekf_ext_send(mavlink_channel_t chan, uint64_t timestamp, float Windspeed, float WindDir, float WindZ, float Airspeed, float beta, float alpha) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_EKF_EXT_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, Windspeed); |
||||
|
_mav_put_float(buf, 12, WindDir); |
||||
|
_mav_put_float(buf, 16, WindZ); |
||||
|
_mav_put_float(buf, 20, Airspeed); |
||||
|
_mav_put_float(buf, 24, beta); |
||||
|
_mav_put_float(buf, 28, alpha); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EKF_EXT, buf, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
#else |
||||
|
mavlink_ekf_ext_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.Windspeed = Windspeed; |
||||
|
packet.WindDir = WindDir; |
||||
|
packet.WindZ = WindZ; |
||||
|
packet.Airspeed = Airspeed; |
||||
|
packet.beta = beta; |
||||
|
packet.alpha = alpha; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EKF_EXT, (const char *)&packet, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a ekf_ext message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_ekf_ext_send_struct(mavlink_channel_t chan, const mavlink_ekf_ext_t* ekf_ext) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_ekf_ext_send(chan, ekf_ext->timestamp, ekf_ext->Windspeed, ekf_ext->WindDir, ekf_ext->WindZ, ekf_ext->Airspeed, ekf_ext->beta, ekf_ext->alpha); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EKF_EXT, (const char *)ekf_ext, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_EKF_EXT_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_ekf_ext_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, float Windspeed, float WindDir, float WindZ, float Airspeed, float beta, float alpha) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, Windspeed); |
||||
|
_mav_put_float(buf, 12, WindDir); |
||||
|
_mav_put_float(buf, 16, WindZ); |
||||
|
_mav_put_float(buf, 20, Airspeed); |
||||
|
_mav_put_float(buf, 24, beta); |
||||
|
_mav_put_float(buf, 28, alpha); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EKF_EXT, buf, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
#else |
||||
|
mavlink_ekf_ext_t *packet = (mavlink_ekf_ext_t *)msgbuf; |
||||
|
packet->timestamp = timestamp; |
||||
|
packet->Windspeed = Windspeed; |
||||
|
packet->WindDir = WindDir; |
||||
|
packet->WindZ = WindZ; |
||||
|
packet->Airspeed = Airspeed; |
||||
|
packet->beta = beta; |
||||
|
packet->alpha = alpha; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EKF_EXT, (const char *)packet, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE EKF_EXT UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestamp from ekf_ext message |
||||
|
* |
||||
|
* @return [us] Time since system start |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_ekf_ext_get_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field Windspeed from ekf_ext message |
||||
|
* |
||||
|
* @return [m/s] Magnitude of wind velocity (in lateral inertial plane) |
||||
|
*/ |
||||
|
static inline float mavlink_msg_ekf_ext_get_Windspeed(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field WindDir from ekf_ext message |
||||
|
* |
||||
|
* @return [rad] Wind heading angle from North |
||||
|
*/ |
||||
|
static inline float mavlink_msg_ekf_ext_get_WindDir(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field WindZ from ekf_ext message |
||||
|
* |
||||
|
* @return [m/s] Z (Down) component of inertial wind velocity |
||||
|
*/ |
||||
|
static inline float mavlink_msg_ekf_ext_get_WindZ(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field Airspeed from ekf_ext message |
||||
|
* |
||||
|
* @return [m/s] Magnitude of air velocity |
||||
|
*/ |
||||
|
static inline float mavlink_msg_ekf_ext_get_Airspeed(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field beta from ekf_ext message |
||||
|
* |
||||
|
* @return [rad] Sideslip angle |
||||
|
*/ |
||||
|
static inline float mavlink_msg_ekf_ext_get_beta(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field alpha from ekf_ext message |
||||
|
* |
||||
|
* @return [rad] Angle of attack |
||||
|
*/ |
||||
|
static inline float mavlink_msg_ekf_ext_get_alpha(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a ekf_ext message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param ekf_ext C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_ekf_ext_decode(const mavlink_message_t* msg, mavlink_ekf_ext_t* ekf_ext) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
ekf_ext->timestamp = mavlink_msg_ekf_ext_get_timestamp(msg); |
||||
|
ekf_ext->Windspeed = mavlink_msg_ekf_ext_get_Windspeed(msg); |
||||
|
ekf_ext->WindDir = mavlink_msg_ekf_ext_get_WindDir(msg); |
||||
|
ekf_ext->WindZ = mavlink_msg_ekf_ext_get_WindZ(msg); |
||||
|
ekf_ext->Airspeed = mavlink_msg_ekf_ext_get_Airspeed(msg); |
||||
|
ekf_ext->beta = mavlink_msg_ekf_ext_get_beta(msg); |
||||
|
ekf_ext->alpha = mavlink_msg_ekf_ext_get_alpha(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_EKF_EXT_LEN? msg->len : MAVLINK_MSG_ID_EKF_EXT_LEN; |
||||
|
memset(ekf_ext, 0, MAVLINK_MSG_ID_EKF_EXT_LEN); |
||||
|
memcpy(ekf_ext, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,813 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE FW_SOARING_DATA PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_FW_SOARING_DATA 210 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_fw_soaring_data_t { |
||||
|
uint64_t timestamp; /*< [ms] Timestamp*/ |
||||
|
uint64_t timestampModeChanged; /*< [ms] Timestamp since last mode change*/ |
||||
|
float xW; /*< [m/s] Thermal core updraft strength*/ |
||||
|
float xR; /*< [m] Thermal radius*/ |
||||
|
float xLat; /*< [deg] Thermal center latitude*/ |
||||
|
float xLon; /*< [deg] Thermal center longitude*/ |
||||
|
float VarW; /*< Variance W*/ |
||||
|
float VarR; /*< Variance R*/ |
||||
|
float VarLat; /*< Variance Lat*/ |
||||
|
float VarLon; /*< Variance Lon */ |
||||
|
float LoiterRadius; /*< [m] Suggested loiter radius*/ |
||||
|
float LoiterDirection; /*< Suggested loiter direction*/ |
||||
|
float DistToSoarPoint; /*< [m] Distance to soar point*/ |
||||
|
float vSinkExp; /*< [m/s] Expected sink rate at current airspeed, roll and throttle*/ |
||||
|
float z1_LocalUpdraftSpeed; /*< [m/s] Measurement / updraft speed at current/local airplane position*/ |
||||
|
float z2_DeltaRoll; /*< [deg] Measurement / roll angle tracking error*/ |
||||
|
float z1_exp; /*< Expected measurement 1*/ |
||||
|
float z2_exp; /*< Expected measurement 2*/ |
||||
|
float ThermalGSNorth; /*< [m/s] Thermal drift (from estimator prediction step only)*/ |
||||
|
float ThermalGSEast; /*< [m/s] Thermal drift (from estimator prediction step only)*/ |
||||
|
float TSE_dot; /*< [m/s] Total specific energy change (filtered)*/ |
||||
|
float DebugVar1; /*< Debug variable 1*/ |
||||
|
float DebugVar2; /*< Debug variable 2*/ |
||||
|
uint8_t ControlMode; /*< Control Mode [-]*/ |
||||
|
uint8_t valid; /*< Data valid [-]*/ |
||||
|
}) mavlink_fw_soaring_data_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_FW_SOARING_DATA_LEN 102 |
||||
|
#define MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN 102 |
||||
|
#define MAVLINK_MSG_ID_210_LEN 102 |
||||
|
#define MAVLINK_MSG_ID_210_MIN_LEN 102 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_FW_SOARING_DATA_CRC 20 |
||||
|
#define MAVLINK_MSG_ID_210_CRC 20 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_FW_SOARING_DATA { \ |
||||
|
210, \ |
||||
|
"FW_SOARING_DATA", \ |
||||
|
25, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_fw_soaring_data_t, timestamp) }, \ |
||||
|
{ "timestampModeChanged", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_fw_soaring_data_t, timestampModeChanged) }, \ |
||||
|
{ "xW", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fw_soaring_data_t, xW) }, \ |
||||
|
{ "xR", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_fw_soaring_data_t, xR) }, \ |
||||
|
{ "xLat", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_fw_soaring_data_t, xLat) }, \ |
||||
|
{ "xLon", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_fw_soaring_data_t, xLon) }, \ |
||||
|
{ "VarW", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_fw_soaring_data_t, VarW) }, \ |
||||
|
{ "VarR", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_fw_soaring_data_t, VarR) }, \ |
||||
|
{ "VarLat", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_fw_soaring_data_t, VarLat) }, \ |
||||
|
{ "VarLon", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_fw_soaring_data_t, VarLon) }, \ |
||||
|
{ "LoiterRadius", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_fw_soaring_data_t, LoiterRadius) }, \ |
||||
|
{ "LoiterDirection", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_fw_soaring_data_t, LoiterDirection) }, \ |
||||
|
{ "DistToSoarPoint", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_fw_soaring_data_t, DistToSoarPoint) }, \ |
||||
|
{ "vSinkExp", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_fw_soaring_data_t, vSinkExp) }, \ |
||||
|
{ "z1_LocalUpdraftSpeed", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_fw_soaring_data_t, z1_LocalUpdraftSpeed) }, \ |
||||
|
{ "z2_DeltaRoll", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_fw_soaring_data_t, z2_DeltaRoll) }, \ |
||||
|
{ "z1_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_fw_soaring_data_t, z1_exp) }, \ |
||||
|
{ "z2_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_fw_soaring_data_t, z2_exp) }, \ |
||||
|
{ "ThermalGSNorth", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_fw_soaring_data_t, ThermalGSNorth) }, \ |
||||
|
{ "ThermalGSEast", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_fw_soaring_data_t, ThermalGSEast) }, \ |
||||
|
{ "TSE_dot", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_fw_soaring_data_t, TSE_dot) }, \ |
||||
|
{ "DebugVar1", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_fw_soaring_data_t, DebugVar1) }, \ |
||||
|
{ "DebugVar2", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_fw_soaring_data_t, DebugVar2) }, \ |
||||
|
{ "ControlMode", NULL, MAVLINK_TYPE_UINT8_T, 0, 100, offsetof(mavlink_fw_soaring_data_t, ControlMode) }, \ |
||||
|
{ "valid", NULL, MAVLINK_TYPE_UINT8_T, 0, 101, offsetof(mavlink_fw_soaring_data_t, valid) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_FW_SOARING_DATA { \ |
||||
|
"FW_SOARING_DATA", \ |
||||
|
25, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_fw_soaring_data_t, timestamp) }, \ |
||||
|
{ "timestampModeChanged", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_fw_soaring_data_t, timestampModeChanged) }, \ |
||||
|
{ "xW", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_fw_soaring_data_t, xW) }, \ |
||||
|
{ "xR", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_fw_soaring_data_t, xR) }, \ |
||||
|
{ "xLat", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_fw_soaring_data_t, xLat) }, \ |
||||
|
{ "xLon", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_fw_soaring_data_t, xLon) }, \ |
||||
|
{ "VarW", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_fw_soaring_data_t, VarW) }, \ |
||||
|
{ "VarR", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_fw_soaring_data_t, VarR) }, \ |
||||
|
{ "VarLat", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_fw_soaring_data_t, VarLat) }, \ |
||||
|
{ "VarLon", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_fw_soaring_data_t, VarLon) }, \ |
||||
|
{ "LoiterRadius", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_fw_soaring_data_t, LoiterRadius) }, \ |
||||
|
{ "LoiterDirection", NULL, MAVLINK_TYPE_FLOAT, 0, 52, offsetof(mavlink_fw_soaring_data_t, LoiterDirection) }, \ |
||||
|
{ "DistToSoarPoint", NULL, MAVLINK_TYPE_FLOAT, 0, 56, offsetof(mavlink_fw_soaring_data_t, DistToSoarPoint) }, \ |
||||
|
{ "vSinkExp", NULL, MAVLINK_TYPE_FLOAT, 0, 60, offsetof(mavlink_fw_soaring_data_t, vSinkExp) }, \ |
||||
|
{ "z1_LocalUpdraftSpeed", NULL, MAVLINK_TYPE_FLOAT, 0, 64, offsetof(mavlink_fw_soaring_data_t, z1_LocalUpdraftSpeed) }, \ |
||||
|
{ "z2_DeltaRoll", NULL, MAVLINK_TYPE_FLOAT, 0, 68, offsetof(mavlink_fw_soaring_data_t, z2_DeltaRoll) }, \ |
||||
|
{ "z1_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 72, offsetof(mavlink_fw_soaring_data_t, z1_exp) }, \ |
||||
|
{ "z2_exp", NULL, MAVLINK_TYPE_FLOAT, 0, 76, offsetof(mavlink_fw_soaring_data_t, z2_exp) }, \ |
||||
|
{ "ThermalGSNorth", NULL, MAVLINK_TYPE_FLOAT, 0, 80, offsetof(mavlink_fw_soaring_data_t, ThermalGSNorth) }, \ |
||||
|
{ "ThermalGSEast", NULL, MAVLINK_TYPE_FLOAT, 0, 84, offsetof(mavlink_fw_soaring_data_t, ThermalGSEast) }, \ |
||||
|
{ "TSE_dot", NULL, MAVLINK_TYPE_FLOAT, 0, 88, offsetof(mavlink_fw_soaring_data_t, TSE_dot) }, \ |
||||
|
{ "DebugVar1", NULL, MAVLINK_TYPE_FLOAT, 0, 92, offsetof(mavlink_fw_soaring_data_t, DebugVar1) }, \ |
||||
|
{ "DebugVar2", NULL, MAVLINK_TYPE_FLOAT, 0, 96, offsetof(mavlink_fw_soaring_data_t, DebugVar2) }, \ |
||||
|
{ "ControlMode", NULL, MAVLINK_TYPE_UINT8_T, 0, 100, offsetof(mavlink_fw_soaring_data_t, ControlMode) }, \ |
||||
|
{ "valid", NULL, MAVLINK_TYPE_UINT8_T, 0, 101, offsetof(mavlink_fw_soaring_data_t, valid) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a fw_soaring_data 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 timestamp [ms] Timestamp |
||||
|
* @param timestampModeChanged [ms] Timestamp since last mode change |
||||
|
* @param xW [m/s] Thermal core updraft strength |
||||
|
* @param xR [m] Thermal radius |
||||
|
* @param xLat [deg] Thermal center latitude |
||||
|
* @param xLon [deg] Thermal center longitude |
||||
|
* @param VarW Variance W |
||||
|
* @param VarR Variance R |
||||
|
* @param VarLat Variance Lat |
||||
|
* @param VarLon Variance Lon |
||||
|
* @param LoiterRadius [m] Suggested loiter radius |
||||
|
* @param LoiterDirection Suggested loiter direction |
||||
|
* @param DistToSoarPoint [m] Distance to soar point |
||||
|
* @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle |
||||
|
* @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position |
||||
|
* @param z2_DeltaRoll [deg] Measurement / roll angle tracking error |
||||
|
* @param z1_exp Expected measurement 1 |
||||
|
* @param z2_exp Expected measurement 2 |
||||
|
* @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only) |
||||
|
* @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only) |
||||
|
* @param TSE_dot [m/s] Total specific energy change (filtered) |
||||
|
* @param DebugVar1 Debug variable 1 |
||||
|
* @param DebugVar2 Debug variable 2 |
||||
|
* @param ControlMode Control Mode [-] |
||||
|
* @param valid Data valid [-] |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_fw_soaring_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint64_t(buf, 8, timestampModeChanged); |
||||
|
_mav_put_float(buf, 16, xW); |
||||
|
_mav_put_float(buf, 20, xR); |
||||
|
_mav_put_float(buf, 24, xLat); |
||||
|
_mav_put_float(buf, 28, xLon); |
||||
|
_mav_put_float(buf, 32, VarW); |
||||
|
_mav_put_float(buf, 36, VarR); |
||||
|
_mav_put_float(buf, 40, VarLat); |
||||
|
_mav_put_float(buf, 44, VarLon); |
||||
|
_mav_put_float(buf, 48, LoiterRadius); |
||||
|
_mav_put_float(buf, 52, LoiterDirection); |
||||
|
_mav_put_float(buf, 56, DistToSoarPoint); |
||||
|
_mav_put_float(buf, 60, vSinkExp); |
||||
|
_mav_put_float(buf, 64, z1_LocalUpdraftSpeed); |
||||
|
_mav_put_float(buf, 68, z2_DeltaRoll); |
||||
|
_mav_put_float(buf, 72, z1_exp); |
||||
|
_mav_put_float(buf, 76, z2_exp); |
||||
|
_mav_put_float(buf, 80, ThermalGSNorth); |
||||
|
_mav_put_float(buf, 84, ThermalGSEast); |
||||
|
_mav_put_float(buf, 88, TSE_dot); |
||||
|
_mav_put_float(buf, 92, DebugVar1); |
||||
|
_mav_put_float(buf, 96, DebugVar2); |
||||
|
_mav_put_uint8_t(buf, 100, ControlMode); |
||||
|
_mav_put_uint8_t(buf, 101, valid); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN); |
||||
|
#else |
||||
|
mavlink_fw_soaring_data_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.timestampModeChanged = timestampModeChanged; |
||||
|
packet.xW = xW; |
||||
|
packet.xR = xR; |
||||
|
packet.xLat = xLat; |
||||
|
packet.xLon = xLon; |
||||
|
packet.VarW = VarW; |
||||
|
packet.VarR = VarR; |
||||
|
packet.VarLat = VarLat; |
||||
|
packet.VarLon = VarLon; |
||||
|
packet.LoiterRadius = LoiterRadius; |
||||
|
packet.LoiterDirection = LoiterDirection; |
||||
|
packet.DistToSoarPoint = DistToSoarPoint; |
||||
|
packet.vSinkExp = vSinkExp; |
||||
|
packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed; |
||||
|
packet.z2_DeltaRoll = z2_DeltaRoll; |
||||
|
packet.z1_exp = z1_exp; |
||||
|
packet.z2_exp = z2_exp; |
||||
|
packet.ThermalGSNorth = ThermalGSNorth; |
||||
|
packet.ThermalGSEast = ThermalGSEast; |
||||
|
packet.TSE_dot = TSE_dot; |
||||
|
packet.DebugVar1 = DebugVar1; |
||||
|
packet.DebugVar2 = DebugVar2; |
||||
|
packet.ControlMode = ControlMode; |
||||
|
packet.valid = valid; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_FW_SOARING_DATA; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a fw_soaring_data 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 timestamp [ms] Timestamp |
||||
|
* @param timestampModeChanged [ms] Timestamp since last mode change |
||||
|
* @param xW [m/s] Thermal core updraft strength |
||||
|
* @param xR [m] Thermal radius |
||||
|
* @param xLat [deg] Thermal center latitude |
||||
|
* @param xLon [deg] Thermal center longitude |
||||
|
* @param VarW Variance W |
||||
|
* @param VarR Variance R |
||||
|
* @param VarLat Variance Lat |
||||
|
* @param VarLon Variance Lon |
||||
|
* @param LoiterRadius [m] Suggested loiter radius |
||||
|
* @param LoiterDirection Suggested loiter direction |
||||
|
* @param DistToSoarPoint [m] Distance to soar point |
||||
|
* @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle |
||||
|
* @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position |
||||
|
* @param z2_DeltaRoll [deg] Measurement / roll angle tracking error |
||||
|
* @param z1_exp Expected measurement 1 |
||||
|
* @param z2_exp Expected measurement 2 |
||||
|
* @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only) |
||||
|
* @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only) |
||||
|
* @param TSE_dot [m/s] Total specific energy change (filtered) |
||||
|
* @param DebugVar1 Debug variable 1 |
||||
|
* @param DebugVar2 Debug variable 2 |
||||
|
* @param ControlMode Control Mode [-] |
||||
|
* @param valid Data valid [-] |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_fw_soaring_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t timestamp,uint64_t timestampModeChanged,float xW,float xR,float xLat,float xLon,float VarW,float VarR,float VarLat,float VarLon,float LoiterRadius,float LoiterDirection,float DistToSoarPoint,float vSinkExp,float z1_LocalUpdraftSpeed,float z2_DeltaRoll,float z1_exp,float z2_exp,float ThermalGSNorth,float ThermalGSEast,float TSE_dot,float DebugVar1,float DebugVar2,uint8_t ControlMode,uint8_t valid) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint64_t(buf, 8, timestampModeChanged); |
||||
|
_mav_put_float(buf, 16, xW); |
||||
|
_mav_put_float(buf, 20, xR); |
||||
|
_mav_put_float(buf, 24, xLat); |
||||
|
_mav_put_float(buf, 28, xLon); |
||||
|
_mav_put_float(buf, 32, VarW); |
||||
|
_mav_put_float(buf, 36, VarR); |
||||
|
_mav_put_float(buf, 40, VarLat); |
||||
|
_mav_put_float(buf, 44, VarLon); |
||||
|
_mav_put_float(buf, 48, LoiterRadius); |
||||
|
_mav_put_float(buf, 52, LoiterDirection); |
||||
|
_mav_put_float(buf, 56, DistToSoarPoint); |
||||
|
_mav_put_float(buf, 60, vSinkExp); |
||||
|
_mav_put_float(buf, 64, z1_LocalUpdraftSpeed); |
||||
|
_mav_put_float(buf, 68, z2_DeltaRoll); |
||||
|
_mav_put_float(buf, 72, z1_exp); |
||||
|
_mav_put_float(buf, 76, z2_exp); |
||||
|
_mav_put_float(buf, 80, ThermalGSNorth); |
||||
|
_mav_put_float(buf, 84, ThermalGSEast); |
||||
|
_mav_put_float(buf, 88, TSE_dot); |
||||
|
_mav_put_float(buf, 92, DebugVar1); |
||||
|
_mav_put_float(buf, 96, DebugVar2); |
||||
|
_mav_put_uint8_t(buf, 100, ControlMode); |
||||
|
_mav_put_uint8_t(buf, 101, valid); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN); |
||||
|
#else |
||||
|
mavlink_fw_soaring_data_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.timestampModeChanged = timestampModeChanged; |
||||
|
packet.xW = xW; |
||||
|
packet.xR = xR; |
||||
|
packet.xLat = xLat; |
||||
|
packet.xLon = xLon; |
||||
|
packet.VarW = VarW; |
||||
|
packet.VarR = VarR; |
||||
|
packet.VarLat = VarLat; |
||||
|
packet.VarLon = VarLon; |
||||
|
packet.LoiterRadius = LoiterRadius; |
||||
|
packet.LoiterDirection = LoiterDirection; |
||||
|
packet.DistToSoarPoint = DistToSoarPoint; |
||||
|
packet.vSinkExp = vSinkExp; |
||||
|
packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed; |
||||
|
packet.z2_DeltaRoll = z2_DeltaRoll; |
||||
|
packet.z1_exp = z1_exp; |
||||
|
packet.z2_exp = z2_exp; |
||||
|
packet.ThermalGSNorth = ThermalGSNorth; |
||||
|
packet.ThermalGSEast = ThermalGSEast; |
||||
|
packet.TSE_dot = TSE_dot; |
||||
|
packet.DebugVar1 = DebugVar1; |
||||
|
packet.DebugVar2 = DebugVar2; |
||||
|
packet.ControlMode = ControlMode; |
||||
|
packet.valid = valid; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_FW_SOARING_DATA; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a fw_soaring_data 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 fw_soaring_data C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_fw_soaring_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_fw_soaring_data_t* fw_soaring_data) |
||||
|
{ |
||||
|
return mavlink_msg_fw_soaring_data_pack(system_id, component_id, msg, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a fw_soaring_data 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 fw_soaring_data C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_fw_soaring_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_fw_soaring_data_t* fw_soaring_data) |
||||
|
{ |
||||
|
return mavlink_msg_fw_soaring_data_pack_chan(system_id, component_id, chan, msg, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a fw_soaring_data message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param timestamp [ms] Timestamp |
||||
|
* @param timestampModeChanged [ms] Timestamp since last mode change |
||||
|
* @param xW [m/s] Thermal core updraft strength |
||||
|
* @param xR [m] Thermal radius |
||||
|
* @param xLat [deg] Thermal center latitude |
||||
|
* @param xLon [deg] Thermal center longitude |
||||
|
* @param VarW Variance W |
||||
|
* @param VarR Variance R |
||||
|
* @param VarLat Variance Lat |
||||
|
* @param VarLon Variance Lon |
||||
|
* @param LoiterRadius [m] Suggested loiter radius |
||||
|
* @param LoiterDirection Suggested loiter direction |
||||
|
* @param DistToSoarPoint [m] Distance to soar point |
||||
|
* @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle |
||||
|
* @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position |
||||
|
* @param z2_DeltaRoll [deg] Measurement / roll angle tracking error |
||||
|
* @param z1_exp Expected measurement 1 |
||||
|
* @param z2_exp Expected measurement 2 |
||||
|
* @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only) |
||||
|
* @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only) |
||||
|
* @param TSE_dot [m/s] Total specific energy change (filtered) |
||||
|
* @param DebugVar1 Debug variable 1 |
||||
|
* @param DebugVar2 Debug variable 2 |
||||
|
* @param ControlMode Control Mode [-] |
||||
|
* @param valid Data valid [-] |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_fw_soaring_data_send(mavlink_channel_t chan, uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint64_t(buf, 8, timestampModeChanged); |
||||
|
_mav_put_float(buf, 16, xW); |
||||
|
_mav_put_float(buf, 20, xR); |
||||
|
_mav_put_float(buf, 24, xLat); |
||||
|
_mav_put_float(buf, 28, xLon); |
||||
|
_mav_put_float(buf, 32, VarW); |
||||
|
_mav_put_float(buf, 36, VarR); |
||||
|
_mav_put_float(buf, 40, VarLat); |
||||
|
_mav_put_float(buf, 44, VarLon); |
||||
|
_mav_put_float(buf, 48, LoiterRadius); |
||||
|
_mav_put_float(buf, 52, LoiterDirection); |
||||
|
_mav_put_float(buf, 56, DistToSoarPoint); |
||||
|
_mav_put_float(buf, 60, vSinkExp); |
||||
|
_mav_put_float(buf, 64, z1_LocalUpdraftSpeed); |
||||
|
_mav_put_float(buf, 68, z2_DeltaRoll); |
||||
|
_mav_put_float(buf, 72, z1_exp); |
||||
|
_mav_put_float(buf, 76, z2_exp); |
||||
|
_mav_put_float(buf, 80, ThermalGSNorth); |
||||
|
_mav_put_float(buf, 84, ThermalGSEast); |
||||
|
_mav_put_float(buf, 88, TSE_dot); |
||||
|
_mav_put_float(buf, 92, DebugVar1); |
||||
|
_mav_put_float(buf, 96, DebugVar2); |
||||
|
_mav_put_uint8_t(buf, 100, ControlMode); |
||||
|
_mav_put_uint8_t(buf, 101, valid); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, buf, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
#else |
||||
|
mavlink_fw_soaring_data_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.timestampModeChanged = timestampModeChanged; |
||||
|
packet.xW = xW; |
||||
|
packet.xR = xR; |
||||
|
packet.xLat = xLat; |
||||
|
packet.xLon = xLon; |
||||
|
packet.VarW = VarW; |
||||
|
packet.VarR = VarR; |
||||
|
packet.VarLat = VarLat; |
||||
|
packet.VarLon = VarLon; |
||||
|
packet.LoiterRadius = LoiterRadius; |
||||
|
packet.LoiterDirection = LoiterDirection; |
||||
|
packet.DistToSoarPoint = DistToSoarPoint; |
||||
|
packet.vSinkExp = vSinkExp; |
||||
|
packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed; |
||||
|
packet.z2_DeltaRoll = z2_DeltaRoll; |
||||
|
packet.z1_exp = z1_exp; |
||||
|
packet.z2_exp = z2_exp; |
||||
|
packet.ThermalGSNorth = ThermalGSNorth; |
||||
|
packet.ThermalGSEast = ThermalGSEast; |
||||
|
packet.TSE_dot = TSE_dot; |
||||
|
packet.DebugVar1 = DebugVar1; |
||||
|
packet.DebugVar2 = DebugVar2; |
||||
|
packet.ControlMode = ControlMode; |
||||
|
packet.valid = valid; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, (const char *)&packet, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a fw_soaring_data message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_fw_soaring_data_send_struct(mavlink_channel_t chan, const mavlink_fw_soaring_data_t* fw_soaring_data) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_fw_soaring_data_send(chan, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, (const char *)fw_soaring_data, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_FW_SOARING_DATA_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_fw_soaring_data_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint64_t(buf, 8, timestampModeChanged); |
||||
|
_mav_put_float(buf, 16, xW); |
||||
|
_mav_put_float(buf, 20, xR); |
||||
|
_mav_put_float(buf, 24, xLat); |
||||
|
_mav_put_float(buf, 28, xLon); |
||||
|
_mav_put_float(buf, 32, VarW); |
||||
|
_mav_put_float(buf, 36, VarR); |
||||
|
_mav_put_float(buf, 40, VarLat); |
||||
|
_mav_put_float(buf, 44, VarLon); |
||||
|
_mav_put_float(buf, 48, LoiterRadius); |
||||
|
_mav_put_float(buf, 52, LoiterDirection); |
||||
|
_mav_put_float(buf, 56, DistToSoarPoint); |
||||
|
_mav_put_float(buf, 60, vSinkExp); |
||||
|
_mav_put_float(buf, 64, z1_LocalUpdraftSpeed); |
||||
|
_mav_put_float(buf, 68, z2_DeltaRoll); |
||||
|
_mav_put_float(buf, 72, z1_exp); |
||||
|
_mav_put_float(buf, 76, z2_exp); |
||||
|
_mav_put_float(buf, 80, ThermalGSNorth); |
||||
|
_mav_put_float(buf, 84, ThermalGSEast); |
||||
|
_mav_put_float(buf, 88, TSE_dot); |
||||
|
_mav_put_float(buf, 92, DebugVar1); |
||||
|
_mav_put_float(buf, 96, DebugVar2); |
||||
|
_mav_put_uint8_t(buf, 100, ControlMode); |
||||
|
_mav_put_uint8_t(buf, 101, valid); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, buf, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
#else |
||||
|
mavlink_fw_soaring_data_t *packet = (mavlink_fw_soaring_data_t *)msgbuf; |
||||
|
packet->timestamp = timestamp; |
||||
|
packet->timestampModeChanged = timestampModeChanged; |
||||
|
packet->xW = xW; |
||||
|
packet->xR = xR; |
||||
|
packet->xLat = xLat; |
||||
|
packet->xLon = xLon; |
||||
|
packet->VarW = VarW; |
||||
|
packet->VarR = VarR; |
||||
|
packet->VarLat = VarLat; |
||||
|
packet->VarLon = VarLon; |
||||
|
packet->LoiterRadius = LoiterRadius; |
||||
|
packet->LoiterDirection = LoiterDirection; |
||||
|
packet->DistToSoarPoint = DistToSoarPoint; |
||||
|
packet->vSinkExp = vSinkExp; |
||||
|
packet->z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed; |
||||
|
packet->z2_DeltaRoll = z2_DeltaRoll; |
||||
|
packet->z1_exp = z1_exp; |
||||
|
packet->z2_exp = z2_exp; |
||||
|
packet->ThermalGSNorth = ThermalGSNorth; |
||||
|
packet->ThermalGSEast = ThermalGSEast; |
||||
|
packet->TSE_dot = TSE_dot; |
||||
|
packet->DebugVar1 = DebugVar1; |
||||
|
packet->DebugVar2 = DebugVar2; |
||||
|
packet->ControlMode = ControlMode; |
||||
|
packet->valid = valid; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FW_SOARING_DATA, (const char *)packet, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE FW_SOARING_DATA UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestamp from fw_soaring_data message |
||||
|
* |
||||
|
* @return [ms] Timestamp |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_fw_soaring_data_get_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestampModeChanged from fw_soaring_data message |
||||
|
* |
||||
|
* @return [ms] Timestamp since last mode change |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_fw_soaring_data_get_timestampModeChanged(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field xW from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m/s] Thermal core updraft strength |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_xW(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field xR from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m] Thermal radius |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_xR(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field xLat from fw_soaring_data message |
||||
|
* |
||||
|
* @return [deg] Thermal center latitude |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_xLat(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field xLon from fw_soaring_data message |
||||
|
* |
||||
|
* @return [deg] Thermal center longitude |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_xLon(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field VarW from fw_soaring_data message |
||||
|
* |
||||
|
* @return Variance W |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_VarW(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field VarR from fw_soaring_data message |
||||
|
* |
||||
|
* @return Variance R |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_VarR(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 36); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field VarLat from fw_soaring_data message |
||||
|
* |
||||
|
* @return Variance Lat |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_VarLat(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 40); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field VarLon from fw_soaring_data message |
||||
|
* |
||||
|
* @return Variance Lon |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_VarLon(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 44); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field LoiterRadius from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m] Suggested loiter radius |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_LoiterRadius(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 48); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field LoiterDirection from fw_soaring_data message |
||||
|
* |
||||
|
* @return Suggested loiter direction |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_LoiterDirection(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 52); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field DistToSoarPoint from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m] Distance to soar point |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_DistToSoarPoint(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 56); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field vSinkExp from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m/s] Expected sink rate at current airspeed, roll and throttle |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_vSinkExp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 60); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field z1_LocalUpdraftSpeed from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m/s] Measurement / updraft speed at current/local airplane position |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_z1_LocalUpdraftSpeed(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 64); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field z2_DeltaRoll from fw_soaring_data message |
||||
|
* |
||||
|
* @return [deg] Measurement / roll angle tracking error |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_z2_DeltaRoll(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 68); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field z1_exp from fw_soaring_data message |
||||
|
* |
||||
|
* @return Expected measurement 1 |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_z1_exp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 72); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field z2_exp from fw_soaring_data message |
||||
|
* |
||||
|
* @return Expected measurement 2 |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_z2_exp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 76); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field ThermalGSNorth from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m/s] Thermal drift (from estimator prediction step only) |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_ThermalGSNorth(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 80); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field ThermalGSEast from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m/s] Thermal drift (from estimator prediction step only) |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_ThermalGSEast(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 84); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field TSE_dot from fw_soaring_data message |
||||
|
* |
||||
|
* @return [m/s] Total specific energy change (filtered) |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_TSE_dot(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 88); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field DebugVar1 from fw_soaring_data message |
||||
|
* |
||||
|
* @return Debug variable 1 |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_DebugVar1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 92); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field DebugVar2 from fw_soaring_data message |
||||
|
* |
||||
|
* @return Debug variable 2 |
||||
|
*/ |
||||
|
static inline float mavlink_msg_fw_soaring_data_get_DebugVar2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 96); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field ControlMode from fw_soaring_data message |
||||
|
* |
||||
|
* @return Control Mode [-] |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_fw_soaring_data_get_ControlMode(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 100); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field valid from fw_soaring_data message |
||||
|
* |
||||
|
* @return Data valid [-] |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_fw_soaring_data_get_valid(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 101); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a fw_soaring_data message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param fw_soaring_data C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_fw_soaring_data_decode(const mavlink_message_t* msg, mavlink_fw_soaring_data_t* fw_soaring_data) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
fw_soaring_data->timestamp = mavlink_msg_fw_soaring_data_get_timestamp(msg); |
||||
|
fw_soaring_data->timestampModeChanged = mavlink_msg_fw_soaring_data_get_timestampModeChanged(msg); |
||||
|
fw_soaring_data->xW = mavlink_msg_fw_soaring_data_get_xW(msg); |
||||
|
fw_soaring_data->xR = mavlink_msg_fw_soaring_data_get_xR(msg); |
||||
|
fw_soaring_data->xLat = mavlink_msg_fw_soaring_data_get_xLat(msg); |
||||
|
fw_soaring_data->xLon = mavlink_msg_fw_soaring_data_get_xLon(msg); |
||||
|
fw_soaring_data->VarW = mavlink_msg_fw_soaring_data_get_VarW(msg); |
||||
|
fw_soaring_data->VarR = mavlink_msg_fw_soaring_data_get_VarR(msg); |
||||
|
fw_soaring_data->VarLat = mavlink_msg_fw_soaring_data_get_VarLat(msg); |
||||
|
fw_soaring_data->VarLon = mavlink_msg_fw_soaring_data_get_VarLon(msg); |
||||
|
fw_soaring_data->LoiterRadius = mavlink_msg_fw_soaring_data_get_LoiterRadius(msg); |
||||
|
fw_soaring_data->LoiterDirection = mavlink_msg_fw_soaring_data_get_LoiterDirection(msg); |
||||
|
fw_soaring_data->DistToSoarPoint = mavlink_msg_fw_soaring_data_get_DistToSoarPoint(msg); |
||||
|
fw_soaring_data->vSinkExp = mavlink_msg_fw_soaring_data_get_vSinkExp(msg); |
||||
|
fw_soaring_data->z1_LocalUpdraftSpeed = mavlink_msg_fw_soaring_data_get_z1_LocalUpdraftSpeed(msg); |
||||
|
fw_soaring_data->z2_DeltaRoll = mavlink_msg_fw_soaring_data_get_z2_DeltaRoll(msg); |
||||
|
fw_soaring_data->z1_exp = mavlink_msg_fw_soaring_data_get_z1_exp(msg); |
||||
|
fw_soaring_data->z2_exp = mavlink_msg_fw_soaring_data_get_z2_exp(msg); |
||||
|
fw_soaring_data->ThermalGSNorth = mavlink_msg_fw_soaring_data_get_ThermalGSNorth(msg); |
||||
|
fw_soaring_data->ThermalGSEast = mavlink_msg_fw_soaring_data_get_ThermalGSEast(msg); |
||||
|
fw_soaring_data->TSE_dot = mavlink_msg_fw_soaring_data_get_TSE_dot(msg); |
||||
|
fw_soaring_data->DebugVar1 = mavlink_msg_fw_soaring_data_get_DebugVar1(msg); |
||||
|
fw_soaring_data->DebugVar2 = mavlink_msg_fw_soaring_data_get_DebugVar2(msg); |
||||
|
fw_soaring_data->ControlMode = mavlink_msg_fw_soaring_data_get_ControlMode(msg); |
||||
|
fw_soaring_data->valid = mavlink_msg_fw_soaring_data_get_valid(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_FW_SOARING_DATA_LEN? msg->len : MAVLINK_MSG_ID_FW_SOARING_DATA_LEN; |
||||
|
memset(fw_soaring_data, 0, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN); |
||||
|
memcpy(fw_soaring_data, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,363 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE GSM_LINK_STATUS PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_GSM_LINK_STATUS 213 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_gsm_link_status_t { |
||||
|
uint64_t timestamp; /*< [us] Timestamp (of OBC)*/ |
||||
|
uint8_t gsm_modem_type; /*< GSM modem used*/ |
||||
|
uint8_t gsm_link_type; /*< GSM link type*/ |
||||
|
uint8_t rssi; /*< RSSI as reported by modem (unconverted)*/ |
||||
|
uint8_t rsrp_rscp; /*< RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)*/ |
||||
|
uint8_t sinr_ecio; /*< SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)*/ |
||||
|
uint8_t rsrq; /*< RSRQ (LTE only) as reported by modem (unconverted)*/ |
||||
|
}) mavlink_gsm_link_status_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN 14 |
||||
|
#define MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN 14 |
||||
|
#define MAVLINK_MSG_ID_213_LEN 14 |
||||
|
#define MAVLINK_MSG_ID_213_MIN_LEN 14 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC 200 |
||||
|
#define MAVLINK_MSG_ID_213_CRC 200 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_GSM_LINK_STATUS { \ |
||||
|
213, \ |
||||
|
"GSM_LINK_STATUS", \ |
||||
|
7, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gsm_link_status_t, timestamp) }, \ |
||||
|
{ "gsm_modem_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_gsm_link_status_t, gsm_modem_type) }, \ |
||||
|
{ "gsm_link_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_gsm_link_status_t, gsm_link_type) }, \ |
||||
|
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_gsm_link_status_t, rssi) }, \ |
||||
|
{ "rsrp_rscp", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_gsm_link_status_t, rsrp_rscp) }, \ |
||||
|
{ "sinr_ecio", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_gsm_link_status_t, sinr_ecio) }, \ |
||||
|
{ "rsrq", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_gsm_link_status_t, rsrq) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_GSM_LINK_STATUS { \ |
||||
|
"GSM_LINK_STATUS", \ |
||||
|
7, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_gsm_link_status_t, timestamp) }, \ |
||||
|
{ "gsm_modem_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_gsm_link_status_t, gsm_modem_type) }, \ |
||||
|
{ "gsm_link_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_gsm_link_status_t, gsm_link_type) }, \ |
||||
|
{ "rssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_gsm_link_status_t, rssi) }, \ |
||||
|
{ "rsrp_rscp", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_gsm_link_status_t, rsrp_rscp) }, \ |
||||
|
{ "sinr_ecio", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_gsm_link_status_t, sinr_ecio) }, \ |
||||
|
{ "rsrq", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_gsm_link_status_t, rsrq) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a gsm_link_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 timestamp [us] Timestamp (of OBC) |
||||
|
* @param gsm_modem_type GSM modem used |
||||
|
* @param gsm_link_type GSM link type |
||||
|
* @param rssi RSSI as reported by modem (unconverted) |
||||
|
* @param rsrp_rscp RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted) |
||||
|
* @param sinr_ecio SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted) |
||||
|
* @param rsrq RSRQ (LTE only) as reported by modem (unconverted) |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_gsm_link_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t timestamp, uint8_t gsm_modem_type, uint8_t gsm_link_type, uint8_t rssi, uint8_t rsrp_rscp, uint8_t sinr_ecio, uint8_t rsrq) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint8_t(buf, 8, gsm_modem_type); |
||||
|
_mav_put_uint8_t(buf, 9, gsm_link_type); |
||||
|
_mav_put_uint8_t(buf, 10, rssi); |
||||
|
_mav_put_uint8_t(buf, 11, rsrp_rscp); |
||||
|
_mav_put_uint8_t(buf, 12, sinr_ecio); |
||||
|
_mav_put_uint8_t(buf, 13, rsrq); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN); |
||||
|
#else |
||||
|
mavlink_gsm_link_status_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.gsm_modem_type = gsm_modem_type; |
||||
|
packet.gsm_link_type = gsm_link_type; |
||||
|
packet.rssi = rssi; |
||||
|
packet.rsrp_rscp = rsrp_rscp; |
||||
|
packet.sinr_ecio = sinr_ecio; |
||||
|
packet.rsrq = rsrq; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_GSM_LINK_STATUS; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a gsm_link_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 will be sent over |
||||
|
* @param msg The MAVLink message to compress the data into |
||||
|
* @param timestamp [us] Timestamp (of OBC) |
||||
|
* @param gsm_modem_type GSM modem used |
||||
|
* @param gsm_link_type GSM link type |
||||
|
* @param rssi RSSI as reported by modem (unconverted) |
||||
|
* @param rsrp_rscp RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted) |
||||
|
* @param sinr_ecio SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted) |
||||
|
* @param rsrq RSRQ (LTE only) as reported by modem (unconverted) |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_gsm_link_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t timestamp,uint8_t gsm_modem_type,uint8_t gsm_link_type,uint8_t rssi,uint8_t rsrp_rscp,uint8_t sinr_ecio,uint8_t rsrq) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint8_t(buf, 8, gsm_modem_type); |
||||
|
_mav_put_uint8_t(buf, 9, gsm_link_type); |
||||
|
_mav_put_uint8_t(buf, 10, rssi); |
||||
|
_mav_put_uint8_t(buf, 11, rsrp_rscp); |
||||
|
_mav_put_uint8_t(buf, 12, sinr_ecio); |
||||
|
_mav_put_uint8_t(buf, 13, rsrq); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN); |
||||
|
#else |
||||
|
mavlink_gsm_link_status_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.gsm_modem_type = gsm_modem_type; |
||||
|
packet.gsm_link_type = gsm_link_type; |
||||
|
packet.rssi = rssi; |
||||
|
packet.rsrp_rscp = rsrp_rscp; |
||||
|
packet.sinr_ecio = sinr_ecio; |
||||
|
packet.rsrq = rsrq; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_GSM_LINK_STATUS; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a gsm_link_status 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 gsm_link_status C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_gsm_link_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_gsm_link_status_t* gsm_link_status) |
||||
|
{ |
||||
|
return mavlink_msg_gsm_link_status_pack(system_id, component_id, msg, gsm_link_status->timestamp, gsm_link_status->gsm_modem_type, gsm_link_status->gsm_link_type, gsm_link_status->rssi, gsm_link_status->rsrp_rscp, gsm_link_status->sinr_ecio, gsm_link_status->rsrq); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a gsm_link_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 gsm_link_status C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_gsm_link_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_gsm_link_status_t* gsm_link_status) |
||||
|
{ |
||||
|
return mavlink_msg_gsm_link_status_pack_chan(system_id, component_id, chan, msg, gsm_link_status->timestamp, gsm_link_status->gsm_modem_type, gsm_link_status->gsm_link_type, gsm_link_status->rssi, gsm_link_status->rsrp_rscp, gsm_link_status->sinr_ecio, gsm_link_status->rsrq); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a gsm_link_status message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param timestamp [us] Timestamp (of OBC) |
||||
|
* @param gsm_modem_type GSM modem used |
||||
|
* @param gsm_link_type GSM link type |
||||
|
* @param rssi RSSI as reported by modem (unconverted) |
||||
|
* @param rsrp_rscp RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted) |
||||
|
* @param sinr_ecio SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted) |
||||
|
* @param rsrq RSRQ (LTE only) as reported by modem (unconverted) |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_gsm_link_status_send(mavlink_channel_t chan, uint64_t timestamp, uint8_t gsm_modem_type, uint8_t gsm_link_type, uint8_t rssi, uint8_t rsrp_rscp, uint8_t sinr_ecio, uint8_t rsrq) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint8_t(buf, 8, gsm_modem_type); |
||||
|
_mav_put_uint8_t(buf, 9, gsm_link_type); |
||||
|
_mav_put_uint8_t(buf, 10, rssi); |
||||
|
_mav_put_uint8_t(buf, 11, rsrp_rscp); |
||||
|
_mav_put_uint8_t(buf, 12, sinr_ecio); |
||||
|
_mav_put_uint8_t(buf, 13, rsrq); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GSM_LINK_STATUS, buf, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
#else |
||||
|
mavlink_gsm_link_status_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.gsm_modem_type = gsm_modem_type; |
||||
|
packet.gsm_link_type = gsm_link_type; |
||||
|
packet.rssi = rssi; |
||||
|
packet.rsrp_rscp = rsrp_rscp; |
||||
|
packet.sinr_ecio = sinr_ecio; |
||||
|
packet.rsrq = rsrq; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GSM_LINK_STATUS, (const char *)&packet, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a gsm_link_status message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_gsm_link_status_send_struct(mavlink_channel_t chan, const mavlink_gsm_link_status_t* gsm_link_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_gsm_link_status_send(chan, gsm_link_status->timestamp, gsm_link_status->gsm_modem_type, gsm_link_status->gsm_link_type, gsm_link_status->rssi, gsm_link_status->rsrp_rscp, gsm_link_status->sinr_ecio, gsm_link_status->rsrq); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GSM_LINK_STATUS, (const char *)gsm_link_status, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_gsm_link_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint8_t gsm_modem_type, uint8_t gsm_link_type, uint8_t rssi, uint8_t rsrp_rscp, uint8_t sinr_ecio, uint8_t rsrq) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_uint8_t(buf, 8, gsm_modem_type); |
||||
|
_mav_put_uint8_t(buf, 9, gsm_link_type); |
||||
|
_mav_put_uint8_t(buf, 10, rssi); |
||||
|
_mav_put_uint8_t(buf, 11, rsrp_rscp); |
||||
|
_mav_put_uint8_t(buf, 12, sinr_ecio); |
||||
|
_mav_put_uint8_t(buf, 13, rsrq); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GSM_LINK_STATUS, buf, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
#else |
||||
|
mavlink_gsm_link_status_t *packet = (mavlink_gsm_link_status_t *)msgbuf; |
||||
|
packet->timestamp = timestamp; |
||||
|
packet->gsm_modem_type = gsm_modem_type; |
||||
|
packet->gsm_link_type = gsm_link_type; |
||||
|
packet->rssi = rssi; |
||||
|
packet->rsrp_rscp = rsrp_rscp; |
||||
|
packet->sinr_ecio = sinr_ecio; |
||||
|
packet->rsrq = rsrq; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_GSM_LINK_STATUS, (const char *)packet, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE GSM_LINK_STATUS UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestamp from gsm_link_status message |
||||
|
* |
||||
|
* @return [us] Timestamp (of OBC) |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_gsm_link_status_get_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field gsm_modem_type from gsm_link_status message |
||||
|
* |
||||
|
* @return GSM modem used |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_gsm_link_status_get_gsm_modem_type(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field gsm_link_type from gsm_link_status message |
||||
|
* |
||||
|
* @return GSM link type |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_gsm_link_status_get_gsm_link_type(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 9); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field rssi from gsm_link_status message |
||||
|
* |
||||
|
* @return RSSI as reported by modem (unconverted) |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_gsm_link_status_get_rssi(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 10); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field rsrp_rscp from gsm_link_status message |
||||
|
* |
||||
|
* @return RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted) |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_gsm_link_status_get_rsrp_rscp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 11); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field sinr_ecio from gsm_link_status message |
||||
|
* |
||||
|
* @return SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted) |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_gsm_link_status_get_sinr_ecio(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field rsrq from gsm_link_status message |
||||
|
* |
||||
|
* @return RSRQ (LTE only) as reported by modem (unconverted) |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_gsm_link_status_get_rsrq(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 13); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a gsm_link_status message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param gsm_link_status C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_gsm_link_status_decode(const mavlink_message_t* msg, mavlink_gsm_link_status_t* gsm_link_status) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
gsm_link_status->timestamp = mavlink_msg_gsm_link_status_get_timestamp(msg); |
||||
|
gsm_link_status->gsm_modem_type = mavlink_msg_gsm_link_status_get_gsm_modem_type(msg); |
||||
|
gsm_link_status->gsm_link_type = mavlink_msg_gsm_link_status_get_gsm_link_type(msg); |
||||
|
gsm_link_status->rssi = mavlink_msg_gsm_link_status_get_rssi(msg); |
||||
|
gsm_link_status->rsrp_rscp = mavlink_msg_gsm_link_status_get_rsrp_rscp(msg); |
||||
|
gsm_link_status->sinr_ecio = mavlink_msg_gsm_link_status_get_sinr_ecio(msg); |
||||
|
gsm_link_status->rsrq = mavlink_msg_gsm_link_status_get_rsrq(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN? msg->len : MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN; |
||||
|
memset(gsm_link_status, 0, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN); |
||||
|
memcpy(gsm_link_status, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,263 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE SENS_ATMOS PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_SENS_ATMOS 208 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_sens_atmos_t { |
||||
|
uint64_t timestamp; /*< [us] Time since system boot*/ |
||||
|
float TempAmbient; /*< [degC] Ambient temperature*/ |
||||
|
float Humidity; /*< [%] Relative humidity*/ |
||||
|
}) mavlink_sens_atmos_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_SENS_ATMOS_LEN 16 |
||||
|
#define MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN 16 |
||||
|
#define MAVLINK_MSG_ID_208_LEN 16 |
||||
|
#define MAVLINK_MSG_ID_208_MIN_LEN 16 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_SENS_ATMOS_CRC 144 |
||||
|
#define MAVLINK_MSG_ID_208_CRC 144 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_SENS_ATMOS { \ |
||||
|
208, \ |
||||
|
"SENS_ATMOS", \ |
||||
|
3, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_sens_atmos_t, timestamp) }, \ |
||||
|
{ "TempAmbient", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sens_atmos_t, TempAmbient) }, \ |
||||
|
{ "Humidity", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sens_atmos_t, Humidity) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_SENS_ATMOS { \ |
||||
|
"SENS_ATMOS", \ |
||||
|
3, \ |
||||
|
{ { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_sens_atmos_t, timestamp) }, \ |
||||
|
{ "TempAmbient", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sens_atmos_t, TempAmbient) }, \ |
||||
|
{ "Humidity", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sens_atmos_t, Humidity) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a sens_atmos 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 timestamp [us] Time since system boot |
||||
|
* @param TempAmbient [degC] Ambient temperature |
||||
|
* @param Humidity [%] Relative humidity |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_atmos_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t timestamp, float TempAmbient, float Humidity) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_SENS_ATMOS_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, TempAmbient); |
||||
|
_mav_put_float(buf, 12, Humidity); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_ATMOS_LEN); |
||||
|
#else |
||||
|
mavlink_sens_atmos_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.TempAmbient = TempAmbient; |
||||
|
packet.Humidity = Humidity; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_ATMOS_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_SENS_ATMOS; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a sens_atmos 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 timestamp [us] Time since system boot |
||||
|
* @param TempAmbient [degC] Ambient temperature |
||||
|
* @param Humidity [%] Relative humidity |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_atmos_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t timestamp,float TempAmbient,float Humidity) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_SENS_ATMOS_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, TempAmbient); |
||||
|
_mav_put_float(buf, 12, Humidity); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_ATMOS_LEN); |
||||
|
#else |
||||
|
mavlink_sens_atmos_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.TempAmbient = TempAmbient; |
||||
|
packet.Humidity = Humidity; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_ATMOS_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_SENS_ATMOS; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a sens_atmos 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 sens_atmos C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_atmos_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sens_atmos_t* sens_atmos) |
||||
|
{ |
||||
|
return mavlink_msg_sens_atmos_pack(system_id, component_id, msg, sens_atmos->timestamp, sens_atmos->TempAmbient, sens_atmos->Humidity); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a sens_atmos 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 sens_atmos C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_atmos_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sens_atmos_t* sens_atmos) |
||||
|
{ |
||||
|
return mavlink_msg_sens_atmos_pack_chan(system_id, component_id, chan, msg, sens_atmos->timestamp, sens_atmos->TempAmbient, sens_atmos->Humidity); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a sens_atmos message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param timestamp [us] Time since system boot |
||||
|
* @param TempAmbient [degC] Ambient temperature |
||||
|
* @param Humidity [%] Relative humidity |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_sens_atmos_send(mavlink_channel_t chan, uint64_t timestamp, float TempAmbient, float Humidity) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_SENS_ATMOS_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, TempAmbient); |
||||
|
_mav_put_float(buf, 12, Humidity); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_ATMOS, buf, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
#else |
||||
|
mavlink_sens_atmos_t packet; |
||||
|
packet.timestamp = timestamp; |
||||
|
packet.TempAmbient = TempAmbient; |
||||
|
packet.Humidity = Humidity; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_ATMOS, (const char *)&packet, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a sens_atmos message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_sens_atmos_send_struct(mavlink_channel_t chan, const mavlink_sens_atmos_t* sens_atmos) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_sens_atmos_send(chan, sens_atmos->timestamp, sens_atmos->TempAmbient, sens_atmos->Humidity); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_ATMOS, (const char *)sens_atmos, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_SENS_ATMOS_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_sens_atmos_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, float TempAmbient, float Humidity) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, timestamp); |
||||
|
_mav_put_float(buf, 8, TempAmbient); |
||||
|
_mav_put_float(buf, 12, Humidity); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_ATMOS, buf, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
#else |
||||
|
mavlink_sens_atmos_t *packet = (mavlink_sens_atmos_t *)msgbuf; |
||||
|
packet->timestamp = timestamp; |
||||
|
packet->TempAmbient = TempAmbient; |
||||
|
packet->Humidity = Humidity; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_ATMOS, (const char *)packet, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE SENS_ATMOS UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field timestamp from sens_atmos message |
||||
|
* |
||||
|
* @return [us] Time since system boot |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_sens_atmos_get_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field TempAmbient from sens_atmos message |
||||
|
* |
||||
|
* @return [degC] Ambient temperature |
||||
|
*/ |
||||
|
static inline float mavlink_msg_sens_atmos_get_TempAmbient(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field Humidity from sens_atmos message |
||||
|
* |
||||
|
* @return [%] Relative humidity |
||||
|
*/ |
||||
|
static inline float mavlink_msg_sens_atmos_get_Humidity(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a sens_atmos message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param sens_atmos C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_sens_atmos_decode(const mavlink_message_t* msg, mavlink_sens_atmos_t* sens_atmos) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
sens_atmos->timestamp = mavlink_msg_sens_atmos_get_timestamp(msg); |
||||
|
sens_atmos->TempAmbient = mavlink_msg_sens_atmos_get_TempAmbient(msg); |
||||
|
sens_atmos->Humidity = mavlink_msg_sens_atmos_get_Humidity(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_SENS_ATMOS_LEN? msg->len : MAVLINK_MSG_ID_SENS_ATMOS_LEN; |
||||
|
memset(sens_atmos, 0, MAVLINK_MSG_ID_SENS_ATMOS_LEN); |
||||
|
memcpy(sens_atmos, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||
@ -0,0 +1,563 @@ |
|||||
|
#pragma once |
||||
|
// MESSAGE SENS_BATMON PACKING |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_SENS_BATMON 209 |
||||
|
|
||||
|
MAVPACKED( |
||||
|
typedef struct __mavlink_sens_batmon_t { |
||||
|
uint64_t batmon_timestamp; /*< [us] Time since system start*/ |
||||
|
float temperature; /*< [degC] Battery pack temperature*/ |
||||
|
uint32_t safetystatus; /*< Battery monitor safetystatus report bits in Hex*/ |
||||
|
uint32_t operationstatus; /*< Battery monitor operation status report bits in Hex*/ |
||||
|
uint16_t voltage; /*< [mV] Battery pack voltage*/ |
||||
|
int16_t current; /*< [mA] Battery pack current*/ |
||||
|
uint16_t batterystatus; /*< Battery monitor status report bits in Hex*/ |
||||
|
uint16_t serialnumber; /*< Battery monitor serial number in Hex*/ |
||||
|
uint16_t cellvoltage1; /*< [mV] Battery pack cell 1 voltage*/ |
||||
|
uint16_t cellvoltage2; /*< [mV] Battery pack cell 2 voltage*/ |
||||
|
uint16_t cellvoltage3; /*< [mV] Battery pack cell 3 voltage*/ |
||||
|
uint16_t cellvoltage4; /*< [mV] Battery pack cell 4 voltage*/ |
||||
|
uint16_t cellvoltage5; /*< [mV] Battery pack cell 5 voltage*/ |
||||
|
uint16_t cellvoltage6; /*< [mV] Battery pack cell 6 voltage*/ |
||||
|
uint8_t SoC; /*< Battery pack state-of-charge*/ |
||||
|
}) mavlink_sens_batmon_t; |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_SENS_BATMON_LEN 41 |
||||
|
#define MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN 41 |
||||
|
#define MAVLINK_MSG_ID_209_LEN 41 |
||||
|
#define MAVLINK_MSG_ID_209_MIN_LEN 41 |
||||
|
|
||||
|
#define MAVLINK_MSG_ID_SENS_BATMON_CRC 155 |
||||
|
#define MAVLINK_MSG_ID_209_CRC 155 |
||||
|
|
||||
|
|
||||
|
|
||||
|
#if MAVLINK_COMMAND_24BIT |
||||
|
#define MAVLINK_MESSAGE_INFO_SENS_BATMON { \ |
||||
|
209, \ |
||||
|
"SENS_BATMON", \ |
||||
|
15, \ |
||||
|
{ { "batmon_timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_sens_batmon_t, batmon_timestamp) }, \ |
||||
|
{ "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sens_batmon_t, temperature) }, \ |
||||
|
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_sens_batmon_t, voltage) }, \ |
||||
|
{ "current", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_sens_batmon_t, current) }, \ |
||||
|
{ "SoC", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_sens_batmon_t, SoC) }, \ |
||||
|
{ "batterystatus", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sens_batmon_t, batterystatus) }, \ |
||||
|
{ "serialnumber", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sens_batmon_t, serialnumber) }, \ |
||||
|
{ "safetystatus", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_sens_batmon_t, safetystatus) }, \ |
||||
|
{ "operationstatus", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_sens_batmon_t, operationstatus) }, \ |
||||
|
{ "cellvoltage1", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sens_batmon_t, cellvoltage1) }, \ |
||||
|
{ "cellvoltage2", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_sens_batmon_t, cellvoltage2) }, \ |
||||
|
{ "cellvoltage3", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_sens_batmon_t, cellvoltage3) }, \ |
||||
|
{ "cellvoltage4", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_sens_batmon_t, cellvoltage4) }, \ |
||||
|
{ "cellvoltage5", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_sens_batmon_t, cellvoltage5) }, \ |
||||
|
{ "cellvoltage6", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_sens_batmon_t, cellvoltage6) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#else |
||||
|
#define MAVLINK_MESSAGE_INFO_SENS_BATMON { \ |
||||
|
"SENS_BATMON", \ |
||||
|
15, \ |
||||
|
{ { "batmon_timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_sens_batmon_t, batmon_timestamp) }, \ |
||||
|
{ "temperature", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sens_batmon_t, temperature) }, \ |
||||
|
{ "voltage", NULL, MAVLINK_TYPE_UINT16_T, 0, 20, offsetof(mavlink_sens_batmon_t, voltage) }, \ |
||||
|
{ "current", NULL, MAVLINK_TYPE_INT16_T, 0, 22, offsetof(mavlink_sens_batmon_t, current) }, \ |
||||
|
{ "SoC", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_sens_batmon_t, SoC) }, \ |
||||
|
{ "batterystatus", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_sens_batmon_t, batterystatus) }, \ |
||||
|
{ "serialnumber", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_sens_batmon_t, serialnumber) }, \ |
||||
|
{ "safetystatus", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_sens_batmon_t, safetystatus) }, \ |
||||
|
{ "operationstatus", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_sens_batmon_t, operationstatus) }, \ |
||||
|
{ "cellvoltage1", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_sens_batmon_t, cellvoltage1) }, \ |
||||
|
{ "cellvoltage2", NULL, MAVLINK_TYPE_UINT16_T, 0, 30, offsetof(mavlink_sens_batmon_t, cellvoltage2) }, \ |
||||
|
{ "cellvoltage3", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_sens_batmon_t, cellvoltage3) }, \ |
||||
|
{ "cellvoltage4", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_sens_batmon_t, cellvoltage4) }, \ |
||||
|
{ "cellvoltage5", NULL, MAVLINK_TYPE_UINT16_T, 0, 36, offsetof(mavlink_sens_batmon_t, cellvoltage5) }, \ |
||||
|
{ "cellvoltage6", NULL, MAVLINK_TYPE_UINT16_T, 0, 38, offsetof(mavlink_sens_batmon_t, cellvoltage6) }, \ |
||||
|
} \ |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a sens_batmon 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 batmon_timestamp [us] Time since system start |
||||
|
* @param temperature [degC] Battery pack temperature |
||||
|
* @param voltage [mV] Battery pack voltage |
||||
|
* @param current [mA] Battery pack current |
||||
|
* @param SoC Battery pack state-of-charge |
||||
|
* @param batterystatus Battery monitor status report bits in Hex |
||||
|
* @param serialnumber Battery monitor serial number in Hex |
||||
|
* @param safetystatus Battery monitor safetystatus report bits in Hex |
||||
|
* @param operationstatus Battery monitor operation status report bits in Hex |
||||
|
* @param cellvoltage1 [mV] Battery pack cell 1 voltage |
||||
|
* @param cellvoltage2 [mV] Battery pack cell 2 voltage |
||||
|
* @param cellvoltage3 [mV] Battery pack cell 3 voltage |
||||
|
* @param cellvoltage4 [mV] Battery pack cell 4 voltage |
||||
|
* @param cellvoltage5 [mV] Battery pack cell 5 voltage |
||||
|
* @param cellvoltage6 [mV] Battery pack cell 6 voltage |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
|
uint64_t batmon_timestamp, float temperature, uint16_t voltage, int16_t current, uint8_t SoC, uint16_t batterystatus, uint16_t serialnumber, uint32_t safetystatus, uint32_t operationstatus, uint16_t cellvoltage1, uint16_t cellvoltage2, uint16_t cellvoltage3, uint16_t cellvoltage4, uint16_t cellvoltage5, uint16_t cellvoltage6) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_SENS_BATMON_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, batmon_timestamp); |
||||
|
_mav_put_float(buf, 8, temperature); |
||||
|
_mav_put_uint32_t(buf, 12, safetystatus); |
||||
|
_mav_put_uint32_t(buf, 16, operationstatus); |
||||
|
_mav_put_uint16_t(buf, 20, voltage); |
||||
|
_mav_put_int16_t(buf, 22, current); |
||||
|
_mav_put_uint16_t(buf, 24, batterystatus); |
||||
|
_mav_put_uint16_t(buf, 26, serialnumber); |
||||
|
_mav_put_uint16_t(buf, 28, cellvoltage1); |
||||
|
_mav_put_uint16_t(buf, 30, cellvoltage2); |
||||
|
_mav_put_uint16_t(buf, 32, cellvoltage3); |
||||
|
_mav_put_uint16_t(buf, 34, cellvoltage4); |
||||
|
_mav_put_uint16_t(buf, 36, cellvoltage5); |
||||
|
_mav_put_uint16_t(buf, 38, cellvoltage6); |
||||
|
_mav_put_uint8_t(buf, 40, SoC); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_BATMON_LEN); |
||||
|
#else |
||||
|
mavlink_sens_batmon_t packet; |
||||
|
packet.batmon_timestamp = batmon_timestamp; |
||||
|
packet.temperature = temperature; |
||||
|
packet.safetystatus = safetystatus; |
||||
|
packet.operationstatus = operationstatus; |
||||
|
packet.voltage = voltage; |
||||
|
packet.current = current; |
||||
|
packet.batterystatus = batterystatus; |
||||
|
packet.serialnumber = serialnumber; |
||||
|
packet.cellvoltage1 = cellvoltage1; |
||||
|
packet.cellvoltage2 = cellvoltage2; |
||||
|
packet.cellvoltage3 = cellvoltage3; |
||||
|
packet.cellvoltage4 = cellvoltage4; |
||||
|
packet.cellvoltage5 = cellvoltage5; |
||||
|
packet.cellvoltage6 = cellvoltage6; |
||||
|
packet.SoC = SoC; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_BATMON_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_SENS_BATMON; |
||||
|
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Pack a sens_batmon 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 batmon_timestamp [us] Time since system start |
||||
|
* @param temperature [degC] Battery pack temperature |
||||
|
* @param voltage [mV] Battery pack voltage |
||||
|
* @param current [mA] Battery pack current |
||||
|
* @param SoC Battery pack state-of-charge |
||||
|
* @param batterystatus Battery monitor status report bits in Hex |
||||
|
* @param serialnumber Battery monitor serial number in Hex |
||||
|
* @param safetystatus Battery monitor safetystatus report bits in Hex |
||||
|
* @param operationstatus Battery monitor operation status report bits in Hex |
||||
|
* @param cellvoltage1 [mV] Battery pack cell 1 voltage |
||||
|
* @param cellvoltage2 [mV] Battery pack cell 2 voltage |
||||
|
* @param cellvoltage3 [mV] Battery pack cell 3 voltage |
||||
|
* @param cellvoltage4 [mV] Battery pack cell 4 voltage |
||||
|
* @param cellvoltage5 [mV] Battery pack cell 5 voltage |
||||
|
* @param cellvoltage6 [mV] Battery pack cell 6 voltage |
||||
|
* @return length of the message in bytes (excluding serial stream start sign) |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
|
mavlink_message_t* msg, |
||||
|
uint64_t batmon_timestamp,float temperature,uint16_t voltage,int16_t current,uint8_t SoC,uint16_t batterystatus,uint16_t serialnumber,uint32_t safetystatus,uint32_t operationstatus,uint16_t cellvoltage1,uint16_t cellvoltage2,uint16_t cellvoltage3,uint16_t cellvoltage4,uint16_t cellvoltage5,uint16_t cellvoltage6) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_SENS_BATMON_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, batmon_timestamp); |
||||
|
_mav_put_float(buf, 8, temperature); |
||||
|
_mav_put_uint32_t(buf, 12, safetystatus); |
||||
|
_mav_put_uint32_t(buf, 16, operationstatus); |
||||
|
_mav_put_uint16_t(buf, 20, voltage); |
||||
|
_mav_put_int16_t(buf, 22, current); |
||||
|
_mav_put_uint16_t(buf, 24, batterystatus); |
||||
|
_mav_put_uint16_t(buf, 26, serialnumber); |
||||
|
_mav_put_uint16_t(buf, 28, cellvoltage1); |
||||
|
_mav_put_uint16_t(buf, 30, cellvoltage2); |
||||
|
_mav_put_uint16_t(buf, 32, cellvoltage3); |
||||
|
_mav_put_uint16_t(buf, 34, cellvoltage4); |
||||
|
_mav_put_uint16_t(buf, 36, cellvoltage5); |
||||
|
_mav_put_uint16_t(buf, 38, cellvoltage6); |
||||
|
_mav_put_uint8_t(buf, 40, SoC); |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_BATMON_LEN); |
||||
|
#else |
||||
|
mavlink_sens_batmon_t packet; |
||||
|
packet.batmon_timestamp = batmon_timestamp; |
||||
|
packet.temperature = temperature; |
||||
|
packet.safetystatus = safetystatus; |
||||
|
packet.operationstatus = operationstatus; |
||||
|
packet.voltage = voltage; |
||||
|
packet.current = current; |
||||
|
packet.batterystatus = batterystatus; |
||||
|
packet.serialnumber = serialnumber; |
||||
|
packet.cellvoltage1 = cellvoltage1; |
||||
|
packet.cellvoltage2 = cellvoltage2; |
||||
|
packet.cellvoltage3 = cellvoltage3; |
||||
|
packet.cellvoltage4 = cellvoltage4; |
||||
|
packet.cellvoltage5 = cellvoltage5; |
||||
|
packet.cellvoltage6 = cellvoltage6; |
||||
|
packet.SoC = SoC; |
||||
|
|
||||
|
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_BATMON_LEN); |
||||
|
#endif |
||||
|
|
||||
|
msg->msgid = MAVLINK_MSG_ID_SENS_BATMON; |
||||
|
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a sens_batmon 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 sens_batmon C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sens_batmon_t* sens_batmon) |
||||
|
{ |
||||
|
return mavlink_msg_sens_batmon_pack(system_id, component_id, msg, sens_batmon->batmon_timestamp, sens_batmon->temperature, sens_batmon->voltage, sens_batmon->current, sens_batmon->SoC, sens_batmon->batterystatus, sens_batmon->serialnumber, sens_batmon->safetystatus, sens_batmon->operationstatus, sens_batmon->cellvoltage1, sens_batmon->cellvoltage2, sens_batmon->cellvoltage3, sens_batmon->cellvoltage4, sens_batmon->cellvoltage5, sens_batmon->cellvoltage6); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Encode a sens_batmon 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 sens_batmon C-struct to read the message contents from |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sens_batmon_t* sens_batmon) |
||||
|
{ |
||||
|
return mavlink_msg_sens_batmon_pack_chan(system_id, component_id, chan, msg, sens_batmon->batmon_timestamp, sens_batmon->temperature, sens_batmon->voltage, sens_batmon->current, sens_batmon->SoC, sens_batmon->batterystatus, sens_batmon->serialnumber, sens_batmon->safetystatus, sens_batmon->operationstatus, sens_batmon->cellvoltage1, sens_batmon->cellvoltage2, sens_batmon->cellvoltage3, sens_batmon->cellvoltage4, sens_batmon->cellvoltage5, sens_batmon->cellvoltage6); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a sens_batmon message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* |
||||
|
* @param batmon_timestamp [us] Time since system start |
||||
|
* @param temperature [degC] Battery pack temperature |
||||
|
* @param voltage [mV] Battery pack voltage |
||||
|
* @param current [mA] Battery pack current |
||||
|
* @param SoC Battery pack state-of-charge |
||||
|
* @param batterystatus Battery monitor status report bits in Hex |
||||
|
* @param serialnumber Battery monitor serial number in Hex |
||||
|
* @param safetystatus Battery monitor safetystatus report bits in Hex |
||||
|
* @param operationstatus Battery monitor operation status report bits in Hex |
||||
|
* @param cellvoltage1 [mV] Battery pack cell 1 voltage |
||||
|
* @param cellvoltage2 [mV] Battery pack cell 2 voltage |
||||
|
* @param cellvoltage3 [mV] Battery pack cell 3 voltage |
||||
|
* @param cellvoltage4 [mV] Battery pack cell 4 voltage |
||||
|
* @param cellvoltage5 [mV] Battery pack cell 5 voltage |
||||
|
* @param cellvoltage6 [mV] Battery pack cell 6 voltage |
||||
|
*/ |
||||
|
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
|
||||
|
static inline void mavlink_msg_sens_batmon_send(mavlink_channel_t chan, uint64_t batmon_timestamp, float temperature, uint16_t voltage, int16_t current, uint8_t SoC, uint16_t batterystatus, uint16_t serialnumber, uint32_t safetystatus, uint32_t operationstatus, uint16_t cellvoltage1, uint16_t cellvoltage2, uint16_t cellvoltage3, uint16_t cellvoltage4, uint16_t cellvoltage5, uint16_t cellvoltage6) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char buf[MAVLINK_MSG_ID_SENS_BATMON_LEN]; |
||||
|
_mav_put_uint64_t(buf, 0, batmon_timestamp); |
||||
|
_mav_put_float(buf, 8, temperature); |
||||
|
_mav_put_uint32_t(buf, 12, safetystatus); |
||||
|
_mav_put_uint32_t(buf, 16, operationstatus); |
||||
|
_mav_put_uint16_t(buf, 20, voltage); |
||||
|
_mav_put_int16_t(buf, 22, current); |
||||
|
_mav_put_uint16_t(buf, 24, batterystatus); |
||||
|
_mav_put_uint16_t(buf, 26, serialnumber); |
||||
|
_mav_put_uint16_t(buf, 28, cellvoltage1); |
||||
|
_mav_put_uint16_t(buf, 30, cellvoltage2); |
||||
|
_mav_put_uint16_t(buf, 32, cellvoltage3); |
||||
|
_mav_put_uint16_t(buf, 34, cellvoltage4); |
||||
|
_mav_put_uint16_t(buf, 36, cellvoltage5); |
||||
|
_mav_put_uint16_t(buf, 38, cellvoltage6); |
||||
|
_mav_put_uint8_t(buf, 40, SoC); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_BATMON, buf, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
#else |
||||
|
mavlink_sens_batmon_t packet; |
||||
|
packet.batmon_timestamp = batmon_timestamp; |
||||
|
packet.temperature = temperature; |
||||
|
packet.safetystatus = safetystatus; |
||||
|
packet.operationstatus = operationstatus; |
||||
|
packet.voltage = voltage; |
||||
|
packet.current = current; |
||||
|
packet.batterystatus = batterystatus; |
||||
|
packet.serialnumber = serialnumber; |
||||
|
packet.cellvoltage1 = cellvoltage1; |
||||
|
packet.cellvoltage2 = cellvoltage2; |
||||
|
packet.cellvoltage3 = cellvoltage3; |
||||
|
packet.cellvoltage4 = cellvoltage4; |
||||
|
packet.cellvoltage5 = cellvoltage5; |
||||
|
packet.cellvoltage6 = cellvoltage6; |
||||
|
packet.SoC = SoC; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_BATMON, (const char *)&packet, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Send a sens_batmon message |
||||
|
* @param chan MAVLink channel to send the message |
||||
|
* @param struct The MAVLink struct to serialize |
||||
|
*/ |
||||
|
static inline void mavlink_msg_sens_batmon_send_struct(mavlink_channel_t chan, const mavlink_sens_batmon_t* sens_batmon) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
mavlink_msg_sens_batmon_send(chan, sens_batmon->batmon_timestamp, sens_batmon->temperature, sens_batmon->voltage, sens_batmon->current, sens_batmon->SoC, sens_batmon->batterystatus, sens_batmon->serialnumber, sens_batmon->safetystatus, sens_batmon->operationstatus, sens_batmon->cellvoltage1, sens_batmon->cellvoltage2, sens_batmon->cellvoltage3, sens_batmon->cellvoltage4, sens_batmon->cellvoltage5, sens_batmon->cellvoltage6); |
||||
|
#else |
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_BATMON, (const char *)sens_batmon, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
|
||||
|
#if MAVLINK_MSG_ID_SENS_BATMON_LEN <= MAVLINK_MAX_PAYLOAD_LEN |
||||
|
/* |
||||
|
This varient of _send() can be used to save stack space by re-using |
||||
|
memory from the receive buffer. The caller provides a |
||||
|
mavlink_message_t which is the size of a full mavlink message. This |
||||
|
is usually the receive buffer for the channel, and allows a reply to an |
||||
|
incoming message with minimum stack space usage. |
||||
|
*/ |
||||
|
static inline void mavlink_msg_sens_batmon_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t batmon_timestamp, float temperature, uint16_t voltage, int16_t current, uint8_t SoC, uint16_t batterystatus, uint16_t serialnumber, uint32_t safetystatus, uint32_t operationstatus, uint16_t cellvoltage1, uint16_t cellvoltage2, uint16_t cellvoltage3, uint16_t cellvoltage4, uint16_t cellvoltage5, uint16_t cellvoltage6) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
char *buf = (char *)msgbuf; |
||||
|
_mav_put_uint64_t(buf, 0, batmon_timestamp); |
||||
|
_mav_put_float(buf, 8, temperature); |
||||
|
_mav_put_uint32_t(buf, 12, safetystatus); |
||||
|
_mav_put_uint32_t(buf, 16, operationstatus); |
||||
|
_mav_put_uint16_t(buf, 20, voltage); |
||||
|
_mav_put_int16_t(buf, 22, current); |
||||
|
_mav_put_uint16_t(buf, 24, batterystatus); |
||||
|
_mav_put_uint16_t(buf, 26, serialnumber); |
||||
|
_mav_put_uint16_t(buf, 28, cellvoltage1); |
||||
|
_mav_put_uint16_t(buf, 30, cellvoltage2); |
||||
|
_mav_put_uint16_t(buf, 32, cellvoltage3); |
||||
|
_mav_put_uint16_t(buf, 34, cellvoltage4); |
||||
|
_mav_put_uint16_t(buf, 36, cellvoltage5); |
||||
|
_mav_put_uint16_t(buf, 38, cellvoltage6); |
||||
|
_mav_put_uint8_t(buf, 40, SoC); |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_BATMON, buf, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
#else |
||||
|
mavlink_sens_batmon_t *packet = (mavlink_sens_batmon_t *)msgbuf; |
||||
|
packet->batmon_timestamp = batmon_timestamp; |
||||
|
packet->temperature = temperature; |
||||
|
packet->safetystatus = safetystatus; |
||||
|
packet->operationstatus = operationstatus; |
||||
|
packet->voltage = voltage; |
||||
|
packet->current = current; |
||||
|
packet->batterystatus = batterystatus; |
||||
|
packet->serialnumber = serialnumber; |
||||
|
packet->cellvoltage1 = cellvoltage1; |
||||
|
packet->cellvoltage2 = cellvoltage2; |
||||
|
packet->cellvoltage3 = cellvoltage3; |
||||
|
packet->cellvoltage4 = cellvoltage4; |
||||
|
packet->cellvoltage5 = cellvoltage5; |
||||
|
packet->cellvoltage6 = cellvoltage6; |
||||
|
packet->SoC = SoC; |
||||
|
|
||||
|
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SENS_BATMON, (const char *)packet, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC); |
||||
|
#endif |
||||
|
} |
||||
|
#endif |
||||
|
|
||||
|
#endif |
||||
|
|
||||
|
// MESSAGE SENS_BATMON UNPACKING |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @brief Get field batmon_timestamp from sens_batmon message |
||||
|
* |
||||
|
* @return [us] Time since system start |
||||
|
*/ |
||||
|
static inline uint64_t mavlink_msg_sens_batmon_get_batmon_timestamp(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint64_t(msg, 0); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field temperature from sens_batmon message |
||||
|
* |
||||
|
* @return [degC] Battery pack temperature |
||||
|
*/ |
||||
|
static inline float mavlink_msg_sens_batmon_get_temperature(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_float(msg, 8); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field voltage from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_voltage(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 20); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field current from sens_batmon message |
||||
|
* |
||||
|
* @return [mA] Battery pack current |
||||
|
*/ |
||||
|
static inline int16_t mavlink_msg_sens_batmon_get_current(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_int16_t(msg, 22); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field SoC from sens_batmon message |
||||
|
* |
||||
|
* @return Battery pack state-of-charge |
||||
|
*/ |
||||
|
static inline uint8_t mavlink_msg_sens_batmon_get_SoC(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint8_t(msg, 40); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field batterystatus from sens_batmon message |
||||
|
* |
||||
|
* @return Battery monitor status report bits in Hex |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_batterystatus(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 24); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field serialnumber from sens_batmon message |
||||
|
* |
||||
|
* @return Battery monitor serial number in Hex |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_serialnumber(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 26); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field safetystatus from sens_batmon message |
||||
|
* |
||||
|
* @return Battery monitor safetystatus report bits in Hex |
||||
|
*/ |
||||
|
static inline uint32_t mavlink_msg_sens_batmon_get_safetystatus(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint32_t(msg, 12); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field operationstatus from sens_batmon message |
||||
|
* |
||||
|
* @return Battery monitor operation status report bits in Hex |
||||
|
*/ |
||||
|
static inline uint32_t mavlink_msg_sens_batmon_get_operationstatus(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint32_t(msg, 16); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field cellvoltage1 from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack cell 1 voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_cellvoltage1(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 28); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field cellvoltage2 from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack cell 2 voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_cellvoltage2(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 30); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field cellvoltage3 from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack cell 3 voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_cellvoltage3(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 32); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field cellvoltage4 from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack cell 4 voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_cellvoltage4(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 34); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field cellvoltage5 from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack cell 5 voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_cellvoltage5(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 36); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Get field cellvoltage6 from sens_batmon message |
||||
|
* |
||||
|
* @return [mV] Battery pack cell 6 voltage |
||||
|
*/ |
||||
|
static inline uint16_t mavlink_msg_sens_batmon_get_cellvoltage6(const mavlink_message_t* msg) |
||||
|
{ |
||||
|
return _MAV_RETURN_uint16_t(msg, 38); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @brief Decode a sens_batmon message into a struct |
||||
|
* |
||||
|
* @param msg The message to decode |
||||
|
* @param sens_batmon C-struct to decode the message contents into |
||||
|
*/ |
||||
|
static inline void mavlink_msg_sens_batmon_decode(const mavlink_message_t* msg, mavlink_sens_batmon_t* sens_batmon) |
||||
|
{ |
||||
|
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
|
sens_batmon->batmon_timestamp = mavlink_msg_sens_batmon_get_batmon_timestamp(msg); |
||||
|
sens_batmon->temperature = mavlink_msg_sens_batmon_get_temperature(msg); |
||||
|
sens_batmon->safetystatus = mavlink_msg_sens_batmon_get_safetystatus(msg); |
||||
|
sens_batmon->operationstatus = mavlink_msg_sens_batmon_get_operationstatus(msg); |
||||
|
sens_batmon->voltage = mavlink_msg_sens_batmon_get_voltage(msg); |
||||
|
sens_batmon->current = mavlink_msg_sens_batmon_get_current(msg); |
||||
|
sens_batmon->batterystatus = mavlink_msg_sens_batmon_get_batterystatus(msg); |
||||
|
sens_batmon->serialnumber = mavlink_msg_sens_batmon_get_serialnumber(msg); |
||||
|
sens_batmon->cellvoltage1 = mavlink_msg_sens_batmon_get_cellvoltage1(msg); |
||||
|
sens_batmon->cellvoltage2 = mavlink_msg_sens_batmon_get_cellvoltage2(msg); |
||||
|
sens_batmon->cellvoltage3 = mavlink_msg_sens_batmon_get_cellvoltage3(msg); |
||||
|
sens_batmon->cellvoltage4 = mavlink_msg_sens_batmon_get_cellvoltage4(msg); |
||||
|
sens_batmon->cellvoltage5 = mavlink_msg_sens_batmon_get_cellvoltage5(msg); |
||||
|
sens_batmon->cellvoltage6 = mavlink_msg_sens_batmon_get_cellvoltage6(msg); |
||||
|
sens_batmon->SoC = mavlink_msg_sens_batmon_get_SoC(msg); |
||||
|
#else |
||||
|
uint8_t len = msg->len < MAVLINK_MSG_ID_SENS_BATMON_LEN? msg->len : MAVLINK_MSG_ID_SENS_BATMON_LEN; |
||||
|
memset(sens_batmon, 0, MAVLINK_MSG_ID_SENS_BATMON_LEN); |
||||
|
memcpy(sens_batmon, _MAV_PAYLOAD(msg), len); |
||||
|
#endif |
||||
|
} |
||||