mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Added more telemetry baudrate options
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2196 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
49e99ea180
commit
4c08a4c2c7
@ -42,14 +42,17 @@ 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");
|
||||
SpeedEnumOptions.append("115200");
|
||||
fields.append( new UAVObjectField(QString("Speed"), QString(""), UAVObjectField::ENUM, SpeedElemNames, SpeedEnumOptions) );
|
||||
QStringList SpeedElemNames;
|
||||
SpeedElemNames.append("0");
|
||||
QStringList SpeedEnumOptions;
|
||||
SpeedEnumOptions.append("2400");
|
||||
SpeedEnumOptions.append("4800");
|
||||
SpeedEnumOptions.append("9600");
|
||||
SpeedEnumOptions.append("19200");
|
||||
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);
|
||||
@ -83,7 +86,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, SPEED_115200=3 } SpeedOptions;
|
||||
// Field Speed information
|
||||
/* Enumeration options for field Speed */
|
||||
typedef enum { SPEED_2400=0, SPEED_4800=1, SPEED_9600=2, SPEED_19200=3, SPEED_38400=4, SPEED_57600=5, SPEED_115200=6 } SpeedOptions;
|
||||
|
||||
|
||||
// Constants
|
||||
|
@ -1,7 +1,7 @@
|
||||
<xml>
|
||||
<object name="TelemetrySettings" singleinstance="true" settings="true">
|
||||
<description>Select baud rate of telemetry. Warning - this must match your modem.</description>
|
||||
<field name="Speed" units="" type="enum" elements="1" options="9600,38400,57600,115200" defaultvalue="57600"/>
|
||||
<field name="Speed" units="" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user