mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
Added 115200 baud option to the UAVTalk telemetry.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1633 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
22b9b2512e
commit
9c94db6dd7
@ -42,13 +42,14 @@ TelemetrySettings::TelemetrySettings(): UAVDataObject(OBJID, ISSINGLEINST, ISSET
|
||||
{
|
||||
// Create fields
|
||||
QList<UAVObjectField*> 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;
|
||||
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user