From c22804e90a7dd26c53b6a47b28700c19d51b0c2e Mon Sep 17 00:00:00 2001 From: vassilis Date: Sun, 30 May 2010 01:56:43 +0000 Subject: [PATCH] Flight/UAVObjects Modify update rate and acked flag of periodic objects, added new gpsobject fields git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@684 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/OpenPilot/UAVObjects/actuatorcommand.c | 4 ++-- flight/OpenPilot/UAVObjects/actuatordesired.c | 4 ++-- flight/OpenPilot/UAVObjects/altitudeactual.c | 4 ++-- flight/OpenPilot/UAVObjects/attitudedesired.c | 4 ++-- flight/OpenPilot/UAVObjects/exampleobject1.c | 2 +- flight/OpenPilot/UAVObjects/exampleobject2.c | 2 +- flight/OpenPilot/UAVObjects/gpsobject.c | 4 ++-- flight/OpenPilot/UAVObjects/inc/gpsobject.h | 6 +++++- flight/OpenPilot/UAVObjects/manualcontrolcommand.c | 6 +++--- flight/OpenPilot/UAVObjects/systemstats.c | 4 ++-- 10 files changed, 22 insertions(+), 18 deletions(-) diff --git a/flight/OpenPilot/UAVObjects/actuatorcommand.c b/flight/OpenPilot/UAVObjects/actuatorcommand.c index 60ee96e6f..0b3abb9ab 100644 --- a/flight/OpenPilot/UAVObjects/actuatorcommand.c +++ b/flight/OpenPilot/UAVObjects/actuatorcommand.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.telemetryUpdatePeriod = 1000; - metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_NEVER; diff --git a/flight/OpenPilot/UAVObjects/actuatordesired.c b/flight/OpenPilot/UAVObjects/actuatordesired.c index c7167f879..b5bec47dd 100644 --- a/flight/OpenPilot/UAVObjects/actuatordesired.c +++ b/flight/OpenPilot/UAVObjects/actuatordesired.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.telemetryUpdatePeriod = 1000; - metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_NEVER; diff --git a/flight/OpenPilot/UAVObjects/altitudeactual.c b/flight/OpenPilot/UAVObjects/altitudeactual.c index d7b2529d9..8952734a8 100644 --- a/flight/OpenPilot/UAVObjects/altitudeactual.c +++ b/flight/OpenPilot/UAVObjects/altitudeactual.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.telemetryUpdatePeriod = 1000; - metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_NEVER; diff --git a/flight/OpenPilot/UAVObjects/attitudedesired.c b/flight/OpenPilot/UAVObjects/attitudedesired.c index 8e8787176..6a3329406 100644 --- a/flight/OpenPilot/UAVObjects/attitudedesired.c +++ b/flight/OpenPilot/UAVObjects/attitudedesired.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.telemetryUpdatePeriod = 1000; - metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_NEVER; diff --git a/flight/OpenPilot/UAVObjects/exampleobject1.c b/flight/OpenPilot/UAVObjects/exampleobject1.c index a2b75fc3c..aa8ac5ef7 100644 --- a/flight/OpenPilot/UAVObjects/exampleobject1.c +++ b/flight/OpenPilot/UAVObjects/exampleobject1.c @@ -84,7 +84,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) metadata.telemetryUpdatePeriod = 0; metadata.gcsTelemetryAcked = 1; metadata.gcsTelemetryUpdateMode = UPDATEMODE_PERIODIC; - metadata.gcsTelemetryUpdatePeriod = 200; + metadata.gcsTelemetryUpdatePeriod = 500; metadata.loggingUpdateMode = UPDATEMODE_NEVER; metadata.loggingUpdatePeriod = 0; UAVObjSetMetadata(obj, &metadata); diff --git a/flight/OpenPilot/UAVObjects/exampleobject2.c b/flight/OpenPilot/UAVObjects/exampleobject2.c index d50f1ee0b..eebfd369f 100644 --- a/flight/OpenPilot/UAVObjects/exampleobject2.c +++ b/flight/OpenPilot/UAVObjects/exampleobject2.c @@ -81,7 +81,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) metadata.gcsAccess = ACCESS_READWRITE; metadata.telemetryAcked = 1; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; - metadata.telemetryUpdatePeriod = 100; + metadata.telemetryUpdatePeriod = 500; metadata.gcsTelemetryAcked = 1; metadata.gcsTelemetryUpdateMode = UPDATEMODE_ONCHANGE; metadata.gcsTelemetryUpdatePeriod = 0; diff --git a/flight/OpenPilot/UAVObjects/gpsobject.c b/flight/OpenPilot/UAVObjects/gpsobject.c index 26115c278..cd6d8f0f5 100644 --- a/flight/OpenPilot/UAVObjects/gpsobject.c +++ b/flight/OpenPilot/UAVObjects/gpsobject.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.telemetryUpdatePeriod = 1000; - metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_PERIODIC; diff --git a/flight/OpenPilot/UAVObjects/inc/gpsobject.h b/flight/OpenPilot/UAVObjects/inc/gpsobject.h index edb92312f..a1335455e 100644 --- a/flight/OpenPilot/UAVObjects/inc/gpsobject.h +++ b/flight/OpenPilot/UAVObjects/inc/gpsobject.h @@ -33,7 +33,7 @@ #define GPSOBJECT_H // Object constants -#define GPSOBJECT_OBJID 2363300180U +#define GPSOBJECT_OBJID 3887395742U #define GPSOBJECT_NAME "GpsObject" #define GPSOBJECT_METANAME "GpsObjectMeta" #define GPSOBJECT_ISSINGLEINST 1 @@ -60,6 +60,8 @@ typedef struct { float Latitude; float Longitude; float Altitude; + float Heading; + float GroundSpeed; int8_t Satellites; uint16_t Updates; uint16_t Failures; @@ -73,6 +75,8 @@ typedef struct { // Field Latitude information // Field Longitude information // Field Altitude information +// Field Heading information +// Field GroundSpeed information // Field Satellites information // Field Updates information // Field Failures information diff --git a/flight/OpenPilot/UAVObjects/manualcontrolcommand.c b/flight/OpenPilot/UAVObjects/manualcontrolcommand.c index a84deae3b..4e3b7f424 100644 --- a/flight/OpenPilot/UAVObjects/manualcontrolcommand.c +++ b/flight/OpenPilot/UAVObjects/manualcontrolcommand.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; - metadata.telemetryUpdatePeriod = 3000; - metadata.gcsTelemetryAcked = 1; + metadata.telemetryUpdatePeriod = 2000; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_NEVER; diff --git a/flight/OpenPilot/UAVObjects/systemstats.c b/flight/OpenPilot/UAVObjects/systemstats.c index a092dfdba..7c60bcfd3 100644 --- a/flight/OpenPilot/UAVObjects/systemstats.c +++ b/flight/OpenPilot/UAVObjects/systemstats.c @@ -79,10 +79,10 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object metadata to their default values metadata.access = ACCESS_READWRITE; metadata.gcsAccess = ACCESS_READWRITE; - metadata.telemetryAcked = 1; + metadata.telemetryAcked = 0; metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC; metadata.telemetryUpdatePeriod = 1000; - metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryAcked = 0; metadata.gcsTelemetryUpdateMode = UPDATEMODE_MANUAL; metadata.gcsTelemetryUpdatePeriod = 0; metadata.loggingUpdateMode = UPDATEMODE_PERIODIC;