From 9922df3524b747dc679d83296befe44ba32a8873 Mon Sep 17 00:00:00 2001 From: sambas Date: Sat, 8 May 2010 16:22:41 +0000 Subject: [PATCH] Added 38400 for my XBEE git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@613 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/OpenPilot/UAVObjects/inc/telemetrysettings.h | 2 +- flight/OpenPilot/UAVObjects/telemetrysettings.c | 2 +- ground/src/plugins/uavobjects/telemetrysettings.cpp | 3 ++- ground/src/plugins/uavobjects/telemetrysettings.h | 2 +- ground/src/shared/uavobjectdefinition/telemetrysettings.xml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flight/OpenPilot/UAVObjects/inc/telemetrysettings.h b/flight/OpenPilot/UAVObjects/inc/telemetrysettings.h index 068d19007..3170dee74 100644 --- a/flight/OpenPilot/UAVObjects/inc/telemetrysettings.h +++ b/flight/OpenPilot/UAVObjects/inc/telemetrysettings.h @@ -64,7 +64,7 @@ typedef struct { // Field information // Field Speed information /* Enumeration options for field Speed */ -typedef enum { TELEMETRYSETTINGS_SPEED_9600=0, TELEMETRYSETTINGS_SPEED_57600=1, } TelemetrySettingsSpeedOptions; +typedef enum { TELEMETRYSETTINGS_SPEED_9600=0, TELEMETRYSETTINGS_SPEED_38400=1, TELEMETRYSETTINGS_SPEED_57600=2, } TelemetrySettingsSpeedOptions; // Generic interface functions diff --git a/flight/OpenPilot/UAVObjects/telemetrysettings.c b/flight/OpenPilot/UAVObjects/telemetrysettings.c index 1ecd935b3..9284b3a5a 100644 --- a/flight/OpenPilot/UAVObjects/telemetrysettings.c +++ b/flight/OpenPilot/UAVObjects/telemetrysettings.c @@ -73,7 +73,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) // Initialize object fields to their default values UAVObjGetInstanceData(obj, instId, &data); memset(&data, 0, sizeof(TelemetrySettingsData)); - data.Speed = 1; + data.Speed = 2; UAVObjSetInstanceData(obj, instId, &data); diff --git a/ground/src/plugins/uavobjects/telemetrysettings.cpp b/ground/src/plugins/uavobjects/telemetrysettings.cpp index 7f3dff06d..010fc4906 100644 --- a/ground/src/plugins/uavobjects/telemetrysettings.cpp +++ b/ground/src/plugins/uavobjects/telemetrysettings.cpp @@ -44,6 +44,7 @@ TelemetrySettings::TelemetrySettings(): UAVDataObject(OBJID, ISSINGLEINST, ISSET SpeedElemNames.append("0"); QStringList SpeedEnumOptions; SpeedEnumOptions.append("9600"); + SpeedEnumOptions.append("38400"); SpeedEnumOptions.append("57600"); fields.append( new UAVObjectField(QString("Speed"), QString(""), UAVObjectField::ENUM, SpeedElemNames, SpeedEnumOptions) ); @@ -77,7 +78,7 @@ UAVObject::Metadata TelemetrySettings::getDefaultMetadata() */ void TelemetrySettings::setDefaultFieldValues() { - data.Speed = 1; + data.Speed = 2; } diff --git a/ground/src/plugins/uavobjects/telemetrysettings.h b/ground/src/plugins/uavobjects/telemetrysettings.h index 7e47ac09f..866dfac0f 100644 --- a/ground/src/plugins/uavobjects/telemetrysettings.h +++ b/ground/src/plugins/uavobjects/telemetrysettings.h @@ -48,7 +48,7 @@ public: // Field information // Field Speed information /* Enumeration options for field Speed */ - typedef enum { SPEED_9600=0, SPEED_57600=1, } SpeedOptions; + typedef enum { SPEED_9600=0, SPEED_38400=1, SPEED_57600=2, } SpeedOptions; // Constants diff --git a/ground/src/shared/uavobjectdefinition/telemetrysettings.xml b/ground/src/shared/uavobjectdefinition/telemetrysettings.xml index 74641d718..92a060916 100644 --- a/ground/src/shared/uavobjectdefinition/telemetrysettings.xml +++ b/ground/src/shared/uavobjectdefinition/telemetrysettings.xml @@ -1,6 +1,6 @@ - +