From 9c94db6dd79311ff250145ffd87ff40b9e38c523 Mon Sep 17 00:00:00 2001 From: pip Date: Wed, 15 Sep 2010 14:47:38 +0000 Subject: [PATCH] Added 115200 baud option to the UAVTalk telemetry. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1633 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../plugins/uavobjects/telemetrysettings.cpp | 17 +++++++++-------- .../src/plugins/uavobjects/telemetrysettings.h | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ground/src/plugins/uavobjects/telemetrysettings.cpp b/ground/src/plugins/uavobjects/telemetrysettings.cpp index b2089ca1f..de8ef9707 100644 --- a/ground/src/plugins/uavobjects/telemetrysettings.cpp +++ b/ground/src/plugins/uavobjects/telemetrysettings.cpp @@ -42,13 +42,14 @@ TelemetrySettings::TelemetrySettings(): UAVDataObject(OBJID, ISSINGLEINST, ISSET { // Create fields QList fields; - QStringList SpeedElemNames; - 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) ); + QStringList SpeedElemNames; + SpeedElemNames.append("0"); + QStringList SpeedEnumOptions; + SpeedEnumOptions.append("9600"); + SpeedEnumOptions.append("38400"); + SpeedEnumOptions.append("57600"); + SpeedEnumOptions.append("115200"); + fields.append( new UAVObjectField(QString("Speed"), QString(""), UAVObjectField::ENUM, SpeedElemNames, SpeedEnumOptions) ); // Initialize object initializeFields(fields, (quint8*)&data, NUMBYTES); @@ -82,7 +83,7 @@ UAVObject::Metadata TelemetrySettings::getDefaultMetadata() */ void TelemetrySettings::setDefaultFieldValues() { - data.Speed = 2; + data.Speed = 2; } diff --git a/ground/src/plugins/uavobjects/telemetrysettings.h b/ground/src/plugins/uavobjects/telemetrysettings.h index 5eedb3673..fb2d224d0 100644 --- a/ground/src/plugins/uavobjects/telemetrysettings.h +++ b/ground/src/plugins/uavobjects/telemetrysettings.h @@ -43,14 +43,14 @@ class UAVOBJECTS_EXPORT TelemetrySettings: public UAVDataObject public: // Field structure typedef struct { - quint8 Speed; + quint8 Speed; } __attribute__((packed)) DataFields; // Field information - // Field Speed information - /* Enumeration options for field Speed */ - typedef enum { SPEED_9600=0, SPEED_38400=1, SPEED_57600=2 } SpeedOptions; + // Field Speed information + /* Enumeration options for field Speed */ + typedef enum { SPEED_9600=0, SPEED_38400=1, SPEED_57600=2, SPEED_115200=3 } SpeedOptions; // Constants