mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
GCS/UAVObjects Modify update rate and acked flag of periodic objects, added new gpsobject fields
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@683 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
7bc37e891d
commit
30a127ebad
@ -65,10 +65,10 @@ UAVObject::Metadata ActuatorCommand::getDefaultMetadata()
|
||||
UAVObject::Metadata metadata;
|
||||
metadata.flightAccess = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryAcked = 0;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryAcked = 0;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER;
|
||||
|
@ -67,10 +67,10 @@ UAVObject::Metadata ActuatorDesired::getDefaultMetadata()
|
||||
UAVObject::Metadata metadata;
|
||||
metadata.flightAccess = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryAcked = 0;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryAcked = 0;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER;
|
||||
|
@ -64,10 +64,10 @@ UAVObject::Metadata AltitudeActual::getDefaultMetadata()
|
||||
UAVObject::Metadata metadata;
|
||||
metadata.flightAccess = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryAcked = 0;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryAcked = 0;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER;
|
||||
|
@ -87,7 +87,7 @@ UAVObject::Metadata ExampleObject1::getDefaultMetadata()
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.gcsTelemetryUpdatePeriod = 200;
|
||||
metadata.gcsTelemetryUpdatePeriod = 500;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE;
|
||||
metadata.flightTelemetryUpdatePeriod = 0;
|
||||
|
@ -75,7 +75,7 @@ UAVObject::Metadata ExampleObject2::getDefaultMetadata()
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 100;
|
||||
metadata.flightTelemetryUpdatePeriod = 500;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER;
|
||||
metadata.loggingUpdatePeriod = 0;
|
||||
return metadata;
|
||||
|
@ -49,6 +49,12 @@ GpsObject::GpsObject(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME)
|
||||
QStringList AltitudeElemNames;
|
||||
AltitudeElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("Altitude"), QString("meters"), UAVObjectField::FLOAT32, AltitudeElemNames, QStringList()) );
|
||||
QStringList HeadingElemNames;
|
||||
HeadingElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("Heading"), QString("degrees"), UAVObjectField::FLOAT32, HeadingElemNames, QStringList()) );
|
||||
QStringList GroundSpeedElemNames;
|
||||
GroundSpeedElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("GroundSpeed"), QString("m/s"), UAVObjectField::FLOAT32, GroundSpeedElemNames, QStringList()) );
|
||||
QStringList SatellitesElemNames;
|
||||
SatellitesElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("Satellites"), QString(""), UAVObjectField::INT8, SatellitesElemNames, QStringList()) );
|
||||
@ -82,10 +88,10 @@ UAVObject::Metadata GpsObject::getDefaultMetadata()
|
||||
UAVObject::Metadata metadata;
|
||||
metadata.flightAccess = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryAcked = 0;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryAcked = 0;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
float Latitude;
|
||||
float Longitude;
|
||||
float Altitude;
|
||||
float Heading;
|
||||
float GroundSpeed;
|
||||
qint8 Satellites;
|
||||
quint16 Updates;
|
||||
quint16 Failures;
|
||||
@ -57,6 +59,8 @@ public:
|
||||
// Field Latitude information
|
||||
// Field Longitude information
|
||||
// Field Altitude information
|
||||
// Field Heading information
|
||||
// Field GroundSpeed information
|
||||
// Field Satellites information
|
||||
// Field Updates information
|
||||
// Field Failures information
|
||||
@ -66,7 +70,7 @@ public:
|
||||
|
||||
|
||||
// Constants
|
||||
static const quint32 OBJID = 2363300180U;
|
||||
static const quint32 OBJID = 3887395742U;
|
||||
static const QString NAME;
|
||||
static const bool ISSINGLEINST = 1;
|
||||
static const bool ISSETTINGS = 0;
|
||||
|
@ -67,6 +67,26 @@ _fields = [ \
|
||||
{
|
||||
}
|
||||
),
|
||||
uavobject.UAVObjectField(
|
||||
'Heading',
|
||||
'f',
|
||||
1,
|
||||
[
|
||||
'0',
|
||||
],
|
||||
{
|
||||
}
|
||||
),
|
||||
uavobject.UAVObjectField(
|
||||
'GroundSpeed',
|
||||
'f',
|
||||
1,
|
||||
[
|
||||
'0',
|
||||
],
|
||||
{
|
||||
}
|
||||
),
|
||||
uavobject.UAVObjectField(
|
||||
'Satellites',
|
||||
'b',
|
||||
@ -132,7 +152,7 @@ _fields = [ \
|
||||
|
||||
class GpsObject(uavobject.UAVObject):
|
||||
## Object constants
|
||||
OBJID = 2363300180
|
||||
OBJID = 3887395742
|
||||
NAME = "GpsObject"
|
||||
METANAME = "GpsObjectMeta"
|
||||
ISSINGLEINST = 1
|
||||
|
@ -90,12 +90,12 @@ UAVObject::Metadata ManualControlCommand::getDefaultMetadata()
|
||||
UAVObject::Metadata metadata;
|
||||
metadata.flightAccess = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryAcked = 0;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryAcked = 0;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 3000;
|
||||
metadata.flightTelemetryUpdatePeriod = 2000;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER;
|
||||
metadata.loggingUpdatePeriod = 0;
|
||||
return metadata;
|
||||
|
@ -64,10 +64,10 @@ UAVObject::Metadata SystemStats::getDefaultMetadata()
|
||||
UAVObject::Metadata metadata;
|
||||
metadata.flightAccess = ACCESS_READWRITE;
|
||||
metadata.gcsAccess = ACCESS_READWRITE;
|
||||
metadata.gcsTelemetryAcked = 1;
|
||||
metadata.gcsTelemetryAcked = 0;
|
||||
metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL;
|
||||
metadata.gcsTelemetryUpdatePeriod = 0;
|
||||
metadata.flightTelemetryAcked = 1;
|
||||
metadata.flightTelemetryAcked = 0;
|
||||
metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
metadata.flightTelemetryUpdatePeriod = 1000;
|
||||
metadata.loggingUpdateMode = UAVObject::UPDATEMODE_PERIODIC;
|
||||
|
@ -2,8 +2,8 @@
|
||||
<object name="ActuatorCommand" singleinstance="true" settings="false">
|
||||
<field name="Channel" units="us" type="int16" elements="8"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<field name="Yaw" units="%" type="float" elements="1"/>
|
||||
<field name="Throttle" units="%" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<field name="Temperature" units="C" type="float" elements="1"/>
|
||||
<field name="Pressure" units="kPa" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -5,8 +5,8 @@
|
||||
<field name="Yaw" units="degrees" type="float" elements="1"/>
|
||||
<field name="Throttle" units="%" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<field name="Field7" units="unit7" type="uint32" elements="1"/>
|
||||
<field name="Field8" units="unit8" type="enum" elements="1" options="Option1, Option2"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="periodic" period="200"/>
|
||||
<telemetrygcs acked="true" updatemode="periodic" period="500"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<field name="Field4" units="unit4" type="float" elements="4"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="100"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="500"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -3,6 +3,8 @@
|
||||
<field name="Latitude" units="degrees" type="float" elements="1"/>
|
||||
<field name="Longitude" units="degrees" type="float" elements="1"/>
|
||||
<field name="Altitude" units="meters" type="float" elements="1"/>
|
||||
<field name="Heading" units="degrees" type="float" elements="1"/>
|
||||
<field name="GroundSpeed" units="m/s" type="float" elements="1"/>
|
||||
<field name="Satellites" units="" type="int8" elements="1"/>
|
||||
<field name="Updates" units="" type="uint16" elements="1"/>
|
||||
<field name="Failures" units="" type="uint16" elements="1"/>
|
||||
@ -10,8 +12,8 @@
|
||||
<field name="HDOP" units="" type="float" elements="1"/>
|
||||
<field name="VDOP" units="" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="periodic" period="1000"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -8,8 +8,8 @@
|
||||
<field name="FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto"/>
|
||||
<field name="Channel" units="us" type="int16" elements="8"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="3000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="2000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
@ -4,8 +4,8 @@
|
||||
<field name="HeapRemaining" units="bytes" type="uint16" elements="1"/>
|
||||
<field name="CPULoad" units="%" type="uint8" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="periodic" period="1000"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="periodic" period="1000"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
Loading…
Reference in New Issue
Block a user