mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-10 18:24:11 +01:00
ef36a79e12
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@517 ebee16cc-31ac-478f-84a7-5cbb03baadba
76 lines
3.0 KiB
C
76 lines
3.0 KiB
C
/**
|
|
******************************************************************************
|
|
*
|
|
* @file gpsobject.h
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
* @brief Implementation of the GpsObject object. This file has been
|
|
* automatically generated by the UAVObjectGenerator.
|
|
*
|
|
* @note Object definition file: gpsobject.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 GPSOBJECT_H
|
|
#define GPSOBJECT_H
|
|
|
|
#include "openpilot.h"
|
|
|
|
// Object constants
|
|
#define GPSOBJECT_OBJID 4042402288U
|
|
#define GPSOBJECT_NAME "GpsObject"
|
|
#define GPSOBJECT_ISSINGLEINST 1
|
|
#define GPSOBJECT_ISSETTINGS 0
|
|
#define GPSOBJECT_NUMBYTES sizeof(GpsObjectData)
|
|
|
|
// Object access macros
|
|
#define GpsObjectGet(dataOut) UAVObjGetData(GpsObjectHandle(), dataOut)
|
|
#define GpsObjectSet(dataIn) UAVObjSetData(GpsObjectHandle(), dataIn)
|
|
#define GpsObjectInstGet(instId, dataOut) UAVObjGetInstanceData(GpsObjectHandle(), instId, dataOut)
|
|
#define GpsObjectInstSet(instId, dataIn) UAVObjSetInstanceData(GpsObjectHandle(), instId, dataIn)
|
|
#define GpsObjectConnectQueue(queue) UAVObjConnectQueue(GpsObjectHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
#define GpsObjectConnectCallback(cb) UAVObjConnectCallback(GpsObjectHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
#define GpsObjectCreateInstance() UAVObjCreateInstance(GpsObjectHandle())
|
|
#define GpsObjectRequestUpdate() UAVObjRequestUpdate(GpsObjectHandle())
|
|
#define GpsObjectRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(GpsObjectHandle(), instId)
|
|
#define GpsObjectUpdated() UAVObjUpdated(GpsObjectHandle())
|
|
#define GpsObjectInstUpdated(instId) UAVObjUpdated(GpsObjectHandle(), instId)
|
|
#define GpsObjectGetMetadata(dataOut) UAVObjGetMetadata(GpsObjectHandle(), dataOut)
|
|
#define GpsObjectSetMetadata(dataIn) UAVObjSetMetadata(GpsObjectHandle(), dataIn)
|
|
|
|
// Object data
|
|
typedef struct {
|
|
float Latitude;
|
|
float Longitude;
|
|
float Altitude;
|
|
int8_t Satellites;
|
|
|
|
} __attribute__((packed)) GpsObjectData;
|
|
|
|
// Enumeration types
|
|
|
|
|
|
// Generic interface functions
|
|
int32_t GpsObjectInitialize();
|
|
UAVObjHandle GpsObjectHandle();
|
|
|
|
#endif // GPSOBJECT_H
|