1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-10 18:24:11 +01:00
LibrePilot/flight/OpenPilot/UAVObjects/inc/telemetrysettings.h
peabody124 a8df6e2c4d OP-128 Flight Documentation: Added description to all the UAVObject (now mandatory) and changed the parser to populate this information into the autogenerated files. Also added a function to test if an object is read only for flight.
Since there are a lot of autogenerated changes the important ones are:

  flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h - added description and define to make the ObjectReadOnly query
  flight/OpenPilot/UAVObjects/uavobjecttemplate.c

  flight/OpenPilot/UAVObjects/uavobjectmanager.c - added the UAVObjReadOnly query

  ground/src/libs/uavobjgenerator/uavobjectparser.cpp - added parsing of description field

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1425 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-08-27 00:15:42 +00:00

93 lines
4.0 KiB
C

/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup TelemetrySettings TelemetrySettings
* @brief Select baud rate of telemetry. Warning - this must match your modem.
*
* Autogenerated files and functions for TelemetrySettings Object
* @{
*
* @file telemetrysettings.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the TelemetrySettings object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: telemetrysettings.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 TELEMETRYSETTINGS_H
#define TELEMETRYSETTINGS_H
// Object constants
#define TELEMETRYSETTINGS_OBJID 2785592614U
#define TELEMETRYSETTINGS_NAME "TelemetrySettings"
#define TELEMETRYSETTINGS_METANAME "TelemetrySettingsMeta"
#define TELEMETRYSETTINGS_ISSINGLEINST 1
#define TELEMETRYSETTINGS_ISSETTINGS 1
#define TELEMETRYSETTINGS_NUMBYTES sizeof(TelemetrySettingsData)
// Object access macros
/**
* @function TelemetrySettingsGet(dataOut)
* @brief Populate a TelemetrySettingsData object
* @param[out] dataOut
*/
#define TelemetrySettingsGet(dataOut) UAVObjGetData(TelemetrySettingsHandle(), dataOut)
#define TelemetrySettingsSet(dataIn) UAVObjSetData(TelemetrySettingsHandle(), dataIn)
#define TelemetrySettingsInstGet(instId, dataOut) UAVObjGetInstanceData(TelemetrySettingsHandle(), instId, dataOut)
#define TelemetrySettingsInstSet(instId, dataIn) UAVObjSetInstanceData(TelemetrySettingsHandle(), instId, dataIn)
#define TelemetrySettingsConnectQueue(queue) UAVObjConnectQueue(TelemetrySettingsHandle(), queue, EV_MASK_ALL_UPDATES)
#define TelemetrySettingsConnectCallback(cb) UAVObjConnectCallback(TelemetrySettingsHandle(), cb, EV_MASK_ALL_UPDATES)
#define TelemetrySettingsCreateInstance() UAVObjCreateInstance(TelemetrySettingsHandle())
#define TelemetrySettingsRequestUpdate() UAVObjRequestUpdate(TelemetrySettingsHandle())
#define TelemetrySettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(TelemetrySettingsHandle(), instId)
#define TelemetrySettingsUpdated() UAVObjUpdated(TelemetrySettingsHandle())
#define TelemetrySettingsInstUpdated(instId) UAVObjUpdated(TelemetrySettingsHandle(), instId)
#define TelemetrySettingsGetMetadata(dataOut) UAVObjGetMetadata(TelemetrySettingsHandle(), dataOut)
#define TelemetrySettingsSetMetadata(dataIn) UAVObjSetMetadata(TelemetrySettingsHandle(), dataIn)
#define TelemetrySettingsReadOnly(dataIn) UAVObjReadOnly(TelemetrySettingsHandle(), dataIn)
// Object data
typedef struct {
uint8_t Speed;
} __attribute__((packed)) TelemetrySettingsData;
// Field information
// Field Speed information
/* Enumeration options for field Speed */
typedef enum { TELEMETRYSETTINGS_SPEED_9600=0, TELEMETRYSETTINGS_SPEED_38400=1, TELEMETRYSETTINGS_SPEED_57600=2 } TelemetrySettingsSpeedOptions;
// Generic interface functions
int32_t TelemetrySettingsInitialize();
UAVObjHandle TelemetrySettingsHandle();
#endif // TELEMETRYSETTINGS_H
/**
* @}
* @}
*/