/** ****************************************************************************** * @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 * @{ * * @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 #define MANUALCONTROLCOMMAND_OBJID 1289277596U #define MANUALCONTROLCOMMAND_NAME "ManualControlCommand" #define MANUALCONTROLCOMMAND_METANAME "ManualControlCommandMeta" #define MANUALCONTROLCOMMAND_ISSINGLEINST 1 #define MANUALCONTROLCOMMAND_ISSETTINGS 0 #define MANUALCONTROLCOMMAND_NUMBYTES sizeof(ManualControlCommandData) // Object access macros /** * @function ManualControlCommandGet(dataOut) * @brief Populate a ManualControlCommandData object * @param[out] dataOut */ #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) #define ManualControlCommandReadOnly(dataIn) UAVObjReadOnly(ManualControlCommandHandle()) // Object data typedef struct { uint8_t Connected; float Roll; float Pitch; float Yaw; float Throttle; uint8_t FlightMode; float Accessory1; float Accessory2; float Accessory3; int16_t Channel[8]; } __attribute__((packed)) ManualControlCommandData; // Field information // Field Connected information /* Enumeration options for field Connected */ typedef enum { MANUALCONTROLCOMMAND_CONNECTED_FALSE=0, MANUALCONTROLCOMMAND_CONNECTED_TRUE=1 } ManualControlCommandConnectedOptions; // Field Roll information // Field Pitch information // Field Yaw information // Field Throttle information // Field FlightMode information /* Enumeration options for field FlightMode */ typedef enum { MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL=0, MANUALCONTROLCOMMAND_FLIGHTMODE_STABILIZED=1, MANUALCONTROLCOMMAND_FLIGHTMODE_AUTO=2 } ManualControlCommandFlightModeOptions; // Field Accessory1 information // Field Accessory2 information // Field Accessory3 information // 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 /** * @} * @} */