2010-05-17 03:58:38 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
2010-08-27 02:15:42 +02:00
|
|
|
* @addtogroup UAVObjects OpenPilot UAVObjects
|
|
|
|
* @{
|
|
|
|
* @addtogroup ManualControlCommand ManualControlCommand
|
|
|
|
* @brief The output from the @ref ManualControlModule which descodes the receiver inputs. Overriden by GCS for fly-by-wire control.
|
|
|
|
*
|
|
|
|
* Autogenerated files and functions for ManualControlCommand Object
|
|
|
|
|
|
|
|
* @{
|
2010-05-17 03:58:38 +02:00
|
|
|
*
|
|
|
|
* @file manualcontrolcommand.h
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
|
|
* @brief Implementation of the ManualControlCommand object. This file has been
|
|
|
|
* automatically generated by the UAVObjectGenerator.
|
|
|
|
*
|
|
|
|
* @note Object definition file: manualcontrolcommand.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 MANUALCONTROLCOMMAND_H
|
|
|
|
#define MANUALCONTROLCOMMAND_H
|
|
|
|
|
|
|
|
// Object constants
|
2010-10-04 21:48:09 +02:00
|
|
|
#define MANUALCONTROLCOMMAND_OBJID 2841592332U
|
2010-05-17 03:58:38 +02:00
|
|
|
#define MANUALCONTROLCOMMAND_NAME "ManualControlCommand"
|
|
|
|
#define MANUALCONTROLCOMMAND_METANAME "ManualControlCommandMeta"
|
|
|
|
#define MANUALCONTROLCOMMAND_ISSINGLEINST 1
|
|
|
|
#define MANUALCONTROLCOMMAND_ISSETTINGS 0
|
|
|
|
#define MANUALCONTROLCOMMAND_NUMBYTES sizeof(ManualControlCommandData)
|
|
|
|
|
|
|
|
// Object access macros
|
2010-08-27 02:15:42 +02:00
|
|
|
/**
|
|
|
|
* @function ManualControlCommandGet(dataOut)
|
|
|
|
* @brief Populate a ManualControlCommandData object
|
|
|
|
* @param[out] dataOut
|
|
|
|
*/
|
2010-05-17 03:58:38 +02:00
|
|
|
#define ManualControlCommandGet(dataOut) UAVObjGetData(ManualControlCommandHandle(), dataOut)
|
|
|
|
#define ManualControlCommandSet(dataIn) UAVObjSetData(ManualControlCommandHandle(), dataIn)
|
|
|
|
#define ManualControlCommandInstGet(instId, dataOut) UAVObjGetInstanceData(ManualControlCommandHandle(), instId, dataOut)
|
|
|
|
#define ManualControlCommandInstSet(instId, dataIn) UAVObjSetInstanceData(ManualControlCommandHandle(), instId, dataIn)
|
|
|
|
#define ManualControlCommandConnectQueue(queue) UAVObjConnectQueue(ManualControlCommandHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
|
|
#define ManualControlCommandConnectCallback(cb) UAVObjConnectCallback(ManualControlCommandHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
|
|
#define ManualControlCommandCreateInstance() UAVObjCreateInstance(ManualControlCommandHandle())
|
|
|
|
#define ManualControlCommandRequestUpdate() UAVObjRequestUpdate(ManualControlCommandHandle())
|
|
|
|
#define ManualControlCommandRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(ManualControlCommandHandle(), instId)
|
|
|
|
#define ManualControlCommandUpdated() UAVObjUpdated(ManualControlCommandHandle())
|
|
|
|
#define ManualControlCommandInstUpdated(instId) UAVObjUpdated(ManualControlCommandHandle(), instId)
|
|
|
|
#define ManualControlCommandGetMetadata(dataOut) UAVObjGetMetadata(ManualControlCommandHandle(), dataOut)
|
|
|
|
#define ManualControlCommandSetMetadata(dataIn) UAVObjSetMetadata(ManualControlCommandHandle(), dataIn)
|
2010-08-27 02:15:48 +02:00
|
|
|
#define ManualControlCommandReadOnly(dataIn) UAVObjReadOnly(ManualControlCommandHandle())
|
2010-05-17 03:58:38 +02:00
|
|
|
|
|
|
|
// Object data
|
|
|
|
typedef struct {
|
|
|
|
uint8_t Connected;
|
2010-09-16 17:41:11 +02:00
|
|
|
uint8_t Armed;
|
2010-05-17 03:58:38 +02:00
|
|
|
float Roll;
|
|
|
|
float Pitch;
|
|
|
|
float Yaw;
|
|
|
|
float Throttle;
|
|
|
|
uint8_t FlightMode;
|
2010-10-04 21:48:09 +02:00
|
|
|
uint8_t StabilizationSettings[3];
|
2010-09-04 19:07:59 +02:00
|
|
|
float Accessory1;
|
|
|
|
float Accessory2;
|
2010-09-04 19:08:02 +02:00
|
|
|
float Accessory3;
|
2010-05-17 03:58:38 +02:00
|
|
|
int16_t Channel[8];
|
|
|
|
|
|
|
|
} __attribute__((packed)) ManualControlCommandData;
|
|
|
|
|
|
|
|
// Field information
|
|
|
|
// Field Connected information
|
|
|
|
/* Enumeration options for field Connected */
|
2010-08-15 01:42:07 +02:00
|
|
|
typedef enum { MANUALCONTROLCOMMAND_CONNECTED_FALSE=0, MANUALCONTROLCOMMAND_CONNECTED_TRUE=1 } ManualControlCommandConnectedOptions;
|
2010-09-16 17:41:11 +02:00
|
|
|
// Field Armed information
|
|
|
|
/* Enumeration options for field Armed */
|
|
|
|
typedef enum { MANUALCONTROLCOMMAND_ARMED_FALSE=0, MANUALCONTROLCOMMAND_ARMED_TRUE=1 } ManualControlCommandArmedOptions;
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field Roll information
|
|
|
|
// Field Pitch information
|
|
|
|
// Field Yaw information
|
|
|
|
// Field Throttle information
|
|
|
|
// Field FlightMode information
|
|
|
|
/* Enumeration options for field FlightMode */
|
2010-08-15 01:42:07 +02:00
|
|
|
typedef enum { MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL=0, MANUALCONTROLCOMMAND_FLIGHTMODE_STABILIZED=1, MANUALCONTROLCOMMAND_FLIGHTMODE_AUTO=2 } ManualControlCommandFlightModeOptions;
|
2010-10-04 21:48:09 +02:00
|
|
|
// Field StabilizationSettings information
|
|
|
|
/* Enumeration options for field StabilizationSettings */
|
2010-10-11 19:58:11 +02:00
|
|
|
typedef enum { MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlCommandStabilizationSettingsOptions;
|
2010-10-04 21:48:09 +02:00
|
|
|
/* Array element names for field StabilizationSettings */
|
|
|
|
typedef enum { MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_YAW=2 } ManualControlCommandStabilizationSettingsElem;
|
|
|
|
/* Number of elements for field StabilizationSettings */
|
|
|
|
#define MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NUMELEM 3
|
2010-09-04 19:07:59 +02:00
|
|
|
// Field Accessory1 information
|
|
|
|
// Field Accessory2 information
|
2010-09-04 19:08:02 +02:00
|
|
|
// Field Accessory3 information
|
2010-05-17 03:58:38 +02:00
|
|
|
// Field Channel information
|
|
|
|
/* Number of elements for field Channel */
|
|
|
|
#define MANUALCONTROLCOMMAND_CHANNEL_NUMELEM 8
|
|
|
|
|
|
|
|
|
|
|
|
// Generic interface functions
|
|
|
|
int32_t ManualControlCommandInitialize();
|
|
|
|
UAVObjHandle ManualControlCommandHandle();
|
|
|
|
|
|
|
|
#endif // MANUALCONTROLCOMMAND_H
|
2010-08-27 02:15:42 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
2010-09-03 01:55:24 +02:00
|
|
|
*/
|