mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-11 19:24:10 +01:00
0ec2156f4a
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@521 ebee16cc-31ac-478f-84a7-5cbb03baadba
77 lines
3.1 KiB
C
77 lines
3.1 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 4217926642U
|
|
#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;
|
|
uint16_t Updates;
|
|
|
|
} __attribute__((packed)) GpsObjectData;
|
|
|
|
// Enumeration types
|
|
|
|
|
|
// Generic interface functions
|
|
int32_t GpsObjectInitialize();
|
|
UAVObjHandle GpsObjectHandle();
|
|
|
|
#endif // GPSOBJECT_H
|