2010-04-17 09:38:28 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @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
|
|
|
|
|
|
|
|
// Object constants
|
2010-04-18 09:14:00 +02:00
|
|
|
#define GPSOBJECT_OBJID 4217926642U
|
2010-04-17 09:38:28 +02:00
|
|
|
#define GPSOBJECT_NAME "GpsObject"
|
2010-04-28 03:54:24 +02:00
|
|
|
#define GPSOBJECT_METANAME "GpsObjectMeta"
|
2010-04-18 00:28:19 +02:00
|
|
|
#define GPSOBJECT_ISSINGLEINST 1
|
2010-04-17 09:38:28 +02:00
|
|
|
#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;
|
2010-04-17 10:12:05 +02:00
|
|
|
int8_t Satellites;
|
2010-04-18 09:14:00 +02:00
|
|
|
uint16_t Updates;
|
2010-04-17 09:38:28 +02:00
|
|
|
|
|
|
|
} __attribute__((packed)) GpsObjectData;
|
|
|
|
|
2010-04-27 03:55:28 +02:00
|
|
|
// Field information
|
|
|
|
// Field Latitude information
|
|
|
|
// Field Longitude information
|
|
|
|
// Field Altitude information
|
|
|
|
// Field Satellites information
|
|
|
|
// Field Updates information
|
2010-04-17 09:38:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Generic interface functions
|
|
|
|
int32_t GpsObjectInitialize();
|
|
|
|
UAVObjHandle GpsObjectHandle();
|
|
|
|
|
|
|
|
#endif // GPSOBJECT_H
|