From 80f53b185c67d475ead43df97c4a62bcc36d7d90 Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Tue, 15 May 2012 19:40:58 +0200 Subject: [PATCH] GCS: BITFIELD: Set lists of options hardcoded in uavobjectfield.cpp (can only be "0" or "1" ) --- ground/openpilotgcs/src/plugins/uavobjects/uavmetaobject.cpp | 4 +--- ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavmetaobject.cpp b/ground/openpilotgcs/src/plugins/uavobjects/uavmetaobject.cpp index 3a526377c..e190b4f27 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavmetaobject.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavmetaobject.cpp @@ -38,12 +38,10 @@ UAVMetaObject::UAVMetaObject(quint32 objID, const QString& name, UAVObject* pare // Setup default metadata of metaobject (can not be changed) UAVObject::MetadataInitialize(ownMetadata); // Setup fields - QStringList boolEnum; - boolEnum << tr("0") << tr("1"); QStringList modesBitField; modesBitField << tr("FlightReadOnly") << tr("GCSReadOnly") << tr("FlightTelemetryAcked") << tr("GCSTelemetryAcked") << tr("FlightUpdatePeriodic") << tr("FlightUpdateOnChange") << tr("GCSUpdatePeriodic") << tr("GCSUpdateOnChange"); QList fields; - fields.append( new UAVObjectField(tr("Modes"), tr("boolean"), UAVObjectField::BITFIELD, modesBitField, boolEnum) ); + fields.append( new UAVObjectField(tr("Modes"), tr("boolean"), UAVObjectField::BITFIELD, modesBitField, QStringList()) ); fields.append( new UAVObjectField(tr("Flight Telemetry Update Period"), tr("ms"), UAVObjectField::UINT16, 1, QStringList()) ); fields.append( new UAVObjectField(tr("GCS Telemetry Update Period"), tr("ms"), UAVObjectField::UINT16, 1, QStringList()) ); fields.append( new UAVObjectField(tr("Logging Update Period"), tr("ms"), UAVObjectField::UINT16, 1, QStringList()) ); diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp b/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp index 4281682e0..79590fad8 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjectfield.cpp @@ -88,6 +88,7 @@ void UAVObjectField::constructorInitialize(const QString& name, const QString& u break; case BITFIELD: numBytesPerElement = sizeof(quint8); + this->options = QStringList()<