1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/manualcontrolcommand.h
vassilis 6b6740109e OP-32 Flight Initial release of Actuator (ServoOut) and ManualControl (ServoIn) modules, still work in progress (not fully tested).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@632 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-05-17 01:58:38 +00:00

91 lines
4.3 KiB
C

/**
******************************************************************************
*
* @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 990495372U
#define MANUALCONTROLCOMMAND_NAME "ManualControlCommand"
#define MANUALCONTROLCOMMAND_METANAME "ManualControlCommandMeta"
#define MANUALCONTROLCOMMAND_ISSINGLEINST 1
#define MANUALCONTROLCOMMAND_ISSETTINGS 0
#define MANUALCONTROLCOMMAND_NUMBYTES sizeof(ManualControlCommandData)
// Object access macros
#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)
// Object data
typedef struct {
uint8_t Connected;
float Roll;
float Pitch;
float Yaw;
float Throttle;
uint8_t FlightMode;
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 Channel information
/* Number of elements for field Channel */
#define MANUALCONTROLCOMMAND_CHANNEL_NUMELEM 8
// Generic interface functions
int32_t ManualControlCommandInitialize();
UAVObjHandle ManualControlCommandHandle();
#endif // MANUALCONTROLCOMMAND_H