From d04983a6a59840f5f3fd0bd579481f1492aa8b29 Mon Sep 17 00:00:00 2001 From: vassilis Date: Tue, 27 Apr 2010 01:52:30 +0000 Subject: [PATCH] GCS/Objects Updated systemalarms.xml git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@553 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/uavobjects/exampleobject1.h | 12 +++++++++++- ground/src/plugins/uavobjects/exampleobject2.h | 8 +++++++- ground/src/plugins/uavobjects/examplesettings.h | 5 ++++- .../src/plugins/uavobjects/flighttelemetrystats.h | 8 +++++++- ground/src/plugins/uavobjects/gcstelemetrystats.h | 8 +++++++- ground/src/plugins/uavobjects/gpsobject.h | 7 ++++++- ground/src/plugins/uavobjects/settingspersistence.h | 3 ++- ground/src/plugins/uavobjects/systemalarms.cpp | 4 +++- ground/src/plugins/uavobjects/systemalarms.h | 13 ++++++++----- ground/src/plugins/uavobjects/systemstats.h | 5 ++++- ground/src/plugins/uavobjects/uavobjecttemplate.h | 4 ++-- .../src/shared/uavobjectdefinition/systemalarms.xml | 4 ++-- 12 files changed, 63 insertions(+), 18 deletions(-) diff --git a/ground/src/plugins/uavobjects/exampleobject1.h b/ground/src/plugins/uavobjects/exampleobject1.h index 98068b570..355e60f06 100644 --- a/ground/src/plugins/uavobjects/exampleobject1.h +++ b/ground/src/plugins/uavobjects/exampleobject1.h @@ -51,7 +51,17 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Field1 information + // Field Field2 information + // Field Field3 information + // Field Field4 information + /* Number of elements for field Field4 */ + static const quint32 FIELD4_NUMELEM = 4; + // Field Field5 information + // Field Field6 information + // Field Field7 information + // Field Field8 information /* Enumeration options for field Field8 */ typedef enum { FIELD8_OPTION1=0, FIELD8_OPTION2=1, } Field8Options; diff --git a/ground/src/plugins/uavobjects/exampleobject2.h b/ground/src/plugins/uavobjects/exampleobject2.h index e7c1d7940..df7166703 100644 --- a/ground/src/plugins/uavobjects/exampleobject2.h +++ b/ground/src/plugins/uavobjects/exampleobject2.h @@ -47,7 +47,13 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Field1 information + // Field Field2 information + // Field Field3 information + // Field Field4 information + /* Number of elements for field Field4 */ + static const quint32 FIELD4_NUMELEM = 4; // Constants diff --git a/ground/src/plugins/uavobjects/examplesettings.h b/ground/src/plugins/uavobjects/examplesettings.h index 34bf9d85f..dba0a01d5 100644 --- a/ground/src/plugins/uavobjects/examplesettings.h +++ b/ground/src/plugins/uavobjects/examplesettings.h @@ -46,7 +46,10 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field UpdatePeriod information + // Field StepSize information + // Field StepDirection information /* Enumeration options for field StepDirection */ typedef enum { STEPDIRECTION_UP=0, STEPDIRECTION_DOWN=1, } StepDirectionOptions; diff --git a/ground/src/plugins/uavobjects/flighttelemetrystats.h b/ground/src/plugins/uavobjects/flighttelemetrystats.h index 13dac638c..b20ab2894 100644 --- a/ground/src/plugins/uavobjects/flighttelemetrystats.h +++ b/ground/src/plugins/uavobjects/flighttelemetrystats.h @@ -49,9 +49,15 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Connected information /* Enumeration options for field Connected */ typedef enum { CONNECTED_TRUE=0, CONNECTED_FALSE=1, } ConnectedOptions; + // Field TxDataRate information + // Field RxDataRate information + // Field TxFailures information + // Field RxFailures information + // Field TxRetries information // Constants diff --git a/ground/src/plugins/uavobjects/gcstelemetrystats.h b/ground/src/plugins/uavobjects/gcstelemetrystats.h index 6d6c5b4a3..ad6f1de0d 100644 --- a/ground/src/plugins/uavobjects/gcstelemetrystats.h +++ b/ground/src/plugins/uavobjects/gcstelemetrystats.h @@ -49,9 +49,15 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Connected information /* Enumeration options for field Connected */ typedef enum { CONNECTED_TRUE=0, CONNECTED_FALSE=1, } ConnectedOptions; + // Field TxDataRate information + // Field RxDataRate information + // Field TxFailures information + // Field RxFailures information + // Field TxRetries information // Constants diff --git a/ground/src/plugins/uavobjects/gpsobject.h b/ground/src/plugins/uavobjects/gpsobject.h index d4c5e13ed..a6c25c561 100644 --- a/ground/src/plugins/uavobjects/gpsobject.h +++ b/ground/src/plugins/uavobjects/gpsobject.h @@ -48,7 +48,12 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Latitude information + // Field Longitude information + // Field Altitude information + // Field Satellites information + // Field Updates information // Constants diff --git a/ground/src/plugins/uavobjects/settingspersistence.h b/ground/src/plugins/uavobjects/settingspersistence.h index 2c0ffc027..61a98daed 100644 --- a/ground/src/plugins/uavobjects/settingspersistence.h +++ b/ground/src/plugins/uavobjects/settingspersistence.h @@ -44,7 +44,8 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Operation information /* Enumeration options for field Operation */ typedef enum { OPERATION_LOAD=0, OPERATION_SAVE=1, } OperationOptions; diff --git a/ground/src/plugins/uavobjects/systemalarms.cpp b/ground/src/plugins/uavobjects/systemalarms.cpp index 4485728ea..286918a43 100644 --- a/ground/src/plugins/uavobjects/systemalarms.cpp +++ b/ground/src/plugins/uavobjects/systemalarms.cpp @@ -42,8 +42,10 @@ SystemAlarms::SystemAlarms(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAM AlarmElemNames.append("StackOverflow"); AlarmElemNames.append("CPUOverload"); AlarmElemNames.append("EventSystem"); + AlarmElemNames.append("SDCard"); + AlarmElemNames.append("Telemetry"); QStringList AlarmEnumOptions; - AlarmEnumOptions.append("None"); + AlarmEnumOptions.append("OK"); AlarmEnumOptions.append("Warning"); AlarmEnumOptions.append("Error"); AlarmEnumOptions.append("Critical"); diff --git a/ground/src/plugins/uavobjects/systemalarms.h b/ground/src/plugins/uavobjects/systemalarms.h index ace13b39f..5f0e09249 100644 --- a/ground/src/plugins/uavobjects/systemalarms.h +++ b/ground/src/plugins/uavobjects/systemalarms.h @@ -40,19 +40,22 @@ class UAVOBJECTS_EXPORT SystemAlarms: public UAVDataObject public: // Field structure typedef struct { - quint8 Alarm[4]; + quint8 Alarm[6]; } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field Alarm information /* Enumeration options for field Alarm */ - typedef enum { ALARM_NONE=0, ALARM_WARNING=1, ALARM_ERROR=2, ALARM_CRITICAL=3, } AlarmOptions; + typedef enum { ALARM_OK=0, ALARM_WARNING=1, ALARM_ERROR=2, ALARM_CRITICAL=3, } AlarmOptions; /* Array element names for field Alarm */ - typedef enum { ALARM_OUTOFMEMORY=0, ALARM_STACKOVERFLOW=1, ALARM_CPUOVERLOAD=2, ALARM_EVENTSYSTEM=3, } AlarmElem; + typedef enum { ALARM_OUTOFMEMORY=0, ALARM_STACKOVERFLOW=1, ALARM_CPUOVERLOAD=2, ALARM_EVENTSYSTEM=3, ALARM_SDCARD=4, ALARM_TELEMETRY=5, } AlarmElem; + /* Number of elements for field Alarm */ + static const quint32 ALARM_NUMELEM = 6; // Constants - static const quint32 OBJID = 2311311912U; + static const quint32 OBJID = 2311311458U; static const QString NAME; static const bool ISSINGLEINST = 1; static const bool ISSETTINGS = 0; diff --git a/ground/src/plugins/uavobjects/systemstats.h b/ground/src/plugins/uavobjects/systemstats.h index 9e6b886f8..92d817606 100644 --- a/ground/src/plugins/uavobjects/systemstats.h +++ b/ground/src/plugins/uavobjects/systemstats.h @@ -46,7 +46,10 @@ public: } __attribute__((packed)) DataFields; - // Enumeration types + // Field information + // Field FlightTime information + // Field HeapRemaining information + // Field CPULoad information // Constants diff --git a/ground/src/plugins/uavobjects/uavobjecttemplate.h b/ground/src/plugins/uavobjects/uavobjecttemplate.h index cda5978c8..f0670f83c 100644 --- a/ground/src/plugins/uavobjects/uavobjecttemplate.h +++ b/ground/src/plugins/uavobjects/uavobjecttemplate.h @@ -43,8 +43,8 @@ public: $(DATAFIELDS) } __attribute__((packed)) DataFields; - // Enumeration types -$(DATAENUM) + // Field information +$(DATAFIELDINFO) // Constants static const quint32 OBJID = $(OBJID)U; diff --git a/ground/src/shared/uavobjectdefinition/systemalarms.xml b/ground/src/shared/uavobjectdefinition/systemalarms.xml index 88a7fb70d..09bebbf1a 100644 --- a/ground/src/shared/uavobjectdefinition/systemalarms.xml +++ b/ground/src/shared/uavobjectdefinition/systemalarms.xml @@ -1,7 +1,7 @@ - +