2010-05-17 03:58:38 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
2010-08-27 02:15:42 +02:00
|
|
|
* @addtogroup UAVObjects OpenPilot UAVObjects
|
|
|
|
* @{
|
|
|
|
* @addtogroup ManualControlSettings ManualControlSettings
|
|
|
|
* @brief Settings to indicate how to decode receiver input by @ref ManualControlModule.
|
|
|
|
*
|
|
|
|
* Autogenerated files and functions for ManualControlSettings Object
|
|
|
|
|
|
|
|
* @{
|
2010-05-17 03:58:38 +02:00
|
|
|
*
|
|
|
|
* @file manualcontrolsettings.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
|
|
* @brief Implementation of the ManualControlSettings object. This file has been
|
|
|
|
* automatically generated by the UAVObjectGenerator.
|
|
|
|
*
|
|
|
|
* @note Object definition file: manualcontrolsettings.xml.
|
|
|
|
* This is an automatically generated file.
|
|
|
|
* DO NOT modify manually.
|
|
|
|
*
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MANUALCONTROLSETTINGS_H
|
|
|
|
#define MANUALCONTROLSETTINGS_H
|
|
|
|
|
|
|
|
// Object constants
|
2010-12-04 18:34:16 +01:00
|
|
|
#define MANUALCONTROLSETTINGS_OBJID 157988682U
|
2010-05-17 03:58:38 +02:00
|
|
|
#define MANUALCONTROLSETTINGS_NAME "ManualControlSettings"
|
|
|
|
#define MANUALCONTROLSETTINGS_METANAME "ManualControlSettingsMeta"
|
|
|
|
#define MANUALCONTROLSETTINGS_ISSINGLEINST 1
|
|
|
|
#define MANUALCONTROLSETTINGS_ISSETTINGS 1
|
|
|
|
#define MANUALCONTROLSETTINGS_NUMBYTES sizeof(ManualControlSettingsData)
|
|
|
|
|
|
|
|
// Object access macros
|
2010-08-27 02:15:42 +02:00
|
|
|
/**
|
|
|
|
* @function ManualControlSettingsGet(dataOut)
|
|
|
|
* @brief Populate a ManualControlSettingsData object
|
|
|
|
* @param[out] dataOut
|
|
|
|
*/
|
2010-05-17 03:58:38 +02:00
|
|
|
#define ManualControlSettingsGet(dataOut) UAVObjGetData(ManualControlSettingsHandle(), dataOut)
|
|
|
|
#define ManualControlSettingsSet(dataIn) UAVObjSetData(ManualControlSettingsHandle(), dataIn)
|
|
|
|
#define ManualControlSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(ManualControlSettingsHandle(), instId, dataOut)
|
|
|
|
#define ManualControlSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(ManualControlSettingsHandle(), instId, dataIn)
|
|
|
|
#define ManualControlSettingsConnectQueue(queue) UAVObjConnectQueue(ManualControlSettingsHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
|
|
#define ManualControlSettingsConnectCallback(cb) UAVObjConnectCallback(ManualControlSettingsHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
|
|
#define ManualControlSettingsCreateInstance() UAVObjCreateInstance(ManualControlSettingsHandle())
|
|
|
|
#define ManualControlSettingsRequestUpdate() UAVObjRequestUpdate(ManualControlSettingsHandle())
|
|
|
|
#define ManualControlSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(ManualControlSettingsHandle(), instId)
|
|
|
|
#define ManualControlSettingsUpdated() UAVObjUpdated(ManualControlSettingsHandle())
|
|
|
|
#define ManualControlSettingsInstUpdated(instId) UAVObjUpdated(ManualControlSettingsHandle(), instId)
|
|
|
|
#define ManualControlSettingsGetMetadata(dataOut) UAVObjGetMetadata(ManualControlSettingsHandle(), dataOut)
|
|
|
|
#define ManualControlSettingsSetMetadata(dataIn) UAVObjSetMetadata(ManualControlSettingsHandle(), dataIn)
|
2010-08-27 02:15:48 +02:00
|
|
|
#define ManualControlSettingsReadOnly(dataIn) UAVObjReadOnly(ManualControlSettingsHandle())
|
2010-05-17 03:58:38 +02:00
|
|
|
|
|
|
|
// Object data
|
|
|
|
typedef struct {
|
|
|
|
uint8_t InputMode;
|
|
|
|
uint8_t Roll;
|
|
|
|
uint8_t Pitch;
|
|
|
|
uint8_t Yaw;
|
|
|
|
uint8_t Throttle;
|
|
|
|
uint8_t FlightMode;
|
2010-09-04 19:07:59 +02:00
|
|
|
uint8_t Accessory1;
|
|
|
|
uint8_t Accessory2;
|
2010-09-04 19:08:02 +02:00
|
|
|
uint8_t Accessory3;
|
2010-10-04 21:48:09 +02:00
|
|
|
uint8_t Pos1StabilizationSettings[3];
|
|
|
|
uint8_t Pos2StabilizationSettings[3];
|
|
|
|
uint8_t Pos3StabilizationSettings[3];
|
|
|
|
uint8_t Pos1FlightMode;
|
|
|
|
uint8_t Pos2FlightMode;
|
|
|
|
uint8_t Pos3FlightMode;
|
2010-05-17 03:58:38 +02:00
|
|
|
int16_t ChannelMax[8];
|
|
|
|
int16_t ChannelNeutral[8];
|
|
|
|
int16_t ChannelMin[8];
|
2010-12-04 18:34:16 +01:00
|
|
|
uint16_t ArmedTimeout;
|
2010-05-17 03:58:38 +02:00
|
|
|
|
|
|
|
} __attribute__((packed)) ManualControlSettingsData;
|
|
|
|
|
|
|
|
// Field information
|
|
|
|
// Field InputMode information
|
|
|
|
/* Enumeration options for field InputMode */
|
2010-08-15 01:42:07 +02:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_INPUTMODE_PWM=0, MANUALCONTROLSETTINGS_INPUTMODE_PPM=1, MANUALCONTROLSETTINGS_INPUTMODE_SPEKTRUM=2 } ManualControlSettingsInputModeOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field Roll information
|
|
|
|
/* Enumeration options for field Roll */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_ROLL_CHANNEL1=0, MANUALCONTROLSETTINGS_ROLL_CHANNEL2=1, MANUALCONTROLSETTINGS_ROLL_CHANNEL3=2, MANUALCONTROLSETTINGS_ROLL_CHANNEL4=3, MANUALCONTROLSETTINGS_ROLL_CHANNEL5=4, MANUALCONTROLSETTINGS_ROLL_CHANNEL6=5, MANUALCONTROLSETTINGS_ROLL_CHANNEL7=6, MANUALCONTROLSETTINGS_ROLL_CHANNEL8=7, MANUALCONTROLSETTINGS_ROLL_NONE=8 } ManualControlSettingsRollOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field Pitch information
|
|
|
|
/* Enumeration options for field Pitch */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_PITCH_CHANNEL1=0, MANUALCONTROLSETTINGS_PITCH_CHANNEL2=1, MANUALCONTROLSETTINGS_PITCH_CHANNEL3=2, MANUALCONTROLSETTINGS_PITCH_CHANNEL4=3, MANUALCONTROLSETTINGS_PITCH_CHANNEL5=4, MANUALCONTROLSETTINGS_PITCH_CHANNEL6=5, MANUALCONTROLSETTINGS_PITCH_CHANNEL7=6, MANUALCONTROLSETTINGS_PITCH_CHANNEL8=7, MANUALCONTROLSETTINGS_PITCH_NONE=8 } ManualControlSettingsPitchOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field Yaw information
|
|
|
|
/* Enumeration options for field Yaw */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_YAW_CHANNEL1=0, MANUALCONTROLSETTINGS_YAW_CHANNEL2=1, MANUALCONTROLSETTINGS_YAW_CHANNEL3=2, MANUALCONTROLSETTINGS_YAW_CHANNEL4=3, MANUALCONTROLSETTINGS_YAW_CHANNEL5=4, MANUALCONTROLSETTINGS_YAW_CHANNEL6=5, MANUALCONTROLSETTINGS_YAW_CHANNEL7=6, MANUALCONTROLSETTINGS_YAW_CHANNEL8=7, MANUALCONTROLSETTINGS_YAW_NONE=8 } ManualControlSettingsYawOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field Throttle information
|
|
|
|
/* Enumeration options for field Throttle */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_THROTTLE_CHANNEL1=0, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL2=1, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL3=2, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL4=3, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL5=4, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL6=5, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL7=6, MANUALCONTROLSETTINGS_THROTTLE_CHANNEL8=7, MANUALCONTROLSETTINGS_THROTTLE_NONE=8 } ManualControlSettingsThrottleOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field FlightMode information
|
|
|
|
/* Enumeration options for field FlightMode */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL1=0, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL2=1, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL3=2, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL4=3, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL5=4, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL6=5, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL7=6, MANUALCONTROLSETTINGS_FLIGHTMODE_CHANNEL8=7, MANUALCONTROLSETTINGS_FLIGHTMODE_NONE=8 } ManualControlSettingsFlightModeOptions;
|
2010-09-04 19:07:59 +02:00
|
|
|
// Field Accessory1 information
|
|
|
|
/* Enumeration options for field Accessory1 */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL1=0, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL2=1, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL3=2, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL4=3, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL5=4, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL6=5, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL7=6, MANUALCONTROLSETTINGS_ACCESSORY1_CHANNEL8=7, MANUALCONTROLSETTINGS_ACCESSORY1_NONE=8 } ManualControlSettingsAccessory1Options;
|
2010-09-04 19:07:59 +02:00
|
|
|
// Field Accessory2 information
|
|
|
|
/* Enumeration options for field Accessory2 */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL1=0, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL2=1, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL3=2, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL4=3, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL5=4, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL6=5, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL7=6, MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL8=7, MANUALCONTROLSETTINGS_ACCESSORY2_NONE=8 } ManualControlSettingsAccessory2Options;
|
2010-09-04 19:08:02 +02:00
|
|
|
// Field Accessory3 information
|
|
|
|
/* Enumeration options for field Accessory3 */
|
2010-12-14 00:54:30 +01:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL1=0, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL2=1, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL3=2, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL4=3, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL5=4, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL6=5, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL7=6, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL8=7, MANUALCONTROLSETTINGS_ACCESSORY3_NONE=8 } ManualControlSettingsAccessory3Options;
|
2010-10-04 21:48:09 +02:00
|
|
|
// Field Pos1StabilizationSettings information
|
|
|
|
/* Enumeration options for field Pos1StabilizationSettings */
|
2010-10-11 19:58:11 +02:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlSettingsPos1StabilizationSettingsOptions;
|
2010-10-04 21:48:09 +02:00
|
|
|
/* Array element names for field Pos1StabilizationSettings */
|
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos1StabilizationSettingsElem;
|
|
|
|
/* Number of elements for field Pos1StabilizationSettings */
|
|
|
|
#define MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_NUMELEM 3
|
|
|
|
// Field Pos2StabilizationSettings information
|
|
|
|
/* Enumeration options for field Pos2StabilizationSettings */
|
2010-10-11 19:58:11 +02:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlSettingsPos2StabilizationSettingsOptions;
|
2010-10-04 21:48:09 +02:00
|
|
|
/* Array element names for field Pos2StabilizationSettings */
|
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos2StabilizationSettingsElem;
|
|
|
|
/* Number of elements for field Pos2StabilizationSettings */
|
|
|
|
#define MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_NUMELEM 3
|
|
|
|
// Field Pos3StabilizationSettings information
|
|
|
|
/* Enumeration options for field Pos3StabilizationSettings */
|
2010-10-11 19:58:11 +02:00
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlSettingsPos3StabilizationSettingsOptions;
|
2010-10-04 21:48:09 +02:00
|
|
|
/* Array element names for field Pos3StabilizationSettings */
|
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos3StabilizationSettingsElem;
|
|
|
|
/* Number of elements for field Pos3StabilizationSettings */
|
|
|
|
#define MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_NUMELEM 3
|
|
|
|
// Field Pos1FlightMode information
|
|
|
|
/* Enumeration options for field Pos1FlightMode */
|
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS1FLIGHTMODE_MANUAL=0, MANUALCONTROLSETTINGS_POS1FLIGHTMODE_STABILIZED=1, MANUALCONTROLSETTINGS_POS1FLIGHTMODE_AUTO=2 } ManualControlSettingsPos1FlightModeOptions;
|
|
|
|
// Field Pos2FlightMode information
|
|
|
|
/* Enumeration options for field Pos2FlightMode */
|
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS2FLIGHTMODE_MANUAL=0, MANUALCONTROLSETTINGS_POS2FLIGHTMODE_STABILIZED=1, MANUALCONTROLSETTINGS_POS2FLIGHTMODE_AUTO=2 } ManualControlSettingsPos2FlightModeOptions;
|
|
|
|
// Field Pos3FlightMode information
|
|
|
|
/* Enumeration options for field Pos3FlightMode */
|
|
|
|
typedef enum { MANUALCONTROLSETTINGS_POS3FLIGHTMODE_MANUAL=0, MANUALCONTROLSETTINGS_POS3FLIGHTMODE_STABILIZED=1, MANUALCONTROLSETTINGS_POS3FLIGHTMODE_AUTO=2 } ManualControlSettingsPos3FlightModeOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field ChannelMax information
|
|
|
|
/* Number of elements for field ChannelMax */
|
|
|
|
#define MANUALCONTROLSETTINGS_CHANNELMAX_NUMELEM 8
|
|
|
|
// Field ChannelNeutral information
|
|
|
|
/* Number of elements for field ChannelNeutral */
|
|
|
|
#define MANUALCONTROLSETTINGS_CHANNELNEUTRAL_NUMELEM 8
|
|
|
|
// Field ChannelMin information
|
|
|
|
/* Number of elements for field ChannelMin */
|
|
|
|
#define MANUALCONTROLSETTINGS_CHANNELMIN_NUMELEM 8
|
2010-12-04 18:34:16 +01:00
|
|
|
// Field ArmedTimeout information
|
2010-05-17 03:58:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Generic interface functions
|
|
|
|
int32_t ManualControlSettingsInitialize();
|
|
|
|
UAVObjHandle ManualControlSettingsHandle();
|
|
|
|
|
|
|
|
#endif // MANUALCONTROLSETTINGS_H
|
2010-08-27 02:15:42 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
2010-09-03 01:55:24 +02:00
|
|
|
*/
|