mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
GCS: BITFIELD: Set lists of options hardcoded in uavobjectfield.cpp (can only be "0" or "1" )
This commit is contained in:
parent
aa7788d04c
commit
80f53b185c
@ -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<UAVObjectField*> 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()) );
|
||||
|
@ -88,6 +88,7 @@ void UAVObjectField::constructorInitialize(const QString& name, const QString& u
|
||||
break;
|
||||
case BITFIELD:
|
||||
numBytesPerElement = sizeof(quint8);
|
||||
this->options = QStringList()<<tr("0")<<tr("1");
|
||||
break;
|
||||
case STRING:
|
||||
numBytesPerElement = sizeof(quint8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user