1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-25: More fields for GPS Objects, preparing gpsinfo remove

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@521 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
sambas 2010-04-18 07:14:00 +00:00 committed by sambas
parent b92cf530a5
commit 0ec2156f4a
4 changed files with 6 additions and 2 deletions

View File

@ -35,7 +35,7 @@
#include "openpilot.h"
// Object constants
#define GPSOBJECT_OBJID 4042402288U
#define GPSOBJECT_OBJID 4217926642U
#define GPSOBJECT_NAME "GpsObject"
#define GPSOBJECT_ISSINGLEINST 1
#define GPSOBJECT_ISSETTINGS 0
@ -62,6 +62,7 @@ typedef struct {
float Longitude;
float Altitude;
int8_t Satellites;
uint16_t Updates;
} __attribute__((packed)) GpsObjectData;

View File

@ -41,6 +41,7 @@ GpsObject::GpsObject(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME)
fields.append(new UAVObjectFieldFloat(QString("Longitude"), QString("degrees"), 1));
fields.append(new UAVObjectFieldFloat(QString("Altitude"), QString("meters"), 1));
fields.append(new UAVObjectFieldInt8(QString("Satellites"), QString(""), 1));
fields.append(new UAVObjectFieldUInt16(QString("Updates"), QString(""), 1));
// Initialize object
initializeFields(fields, (quint8*)&data, NUMBYTES);

View File

@ -44,6 +44,7 @@ public:
float Longitude;
float Altitude;
qint8 Satellites;
quint16 Updates;
} __attribute__((packed)) DataFields;
@ -51,7 +52,7 @@ public:
// Constants
static const quint32 OBJID = 4042402288U;
static const quint32 OBJID = 4217926642U;
static const QString NAME;
static const bool ISSINGLEINST = 1;
static const bool ISSETTINGS = 0;

View File

@ -4,6 +4,7 @@
<field name="Longitude" units="degrees" type="float" elements="1"/>
<field name="Altitude" units="meters" type="float" elements="1"/>
<field name="Satellites" units="" type="int8" elements="1"/>
<field name="Updates" units="" type="uint16" elements="1"/>
<telemetrygcs acked="true" updatemode="never" period="0"/>
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
<logging updatemode="periodic" period="1000"/>