Commit 61bdd7f2 authored by Don Gagne's avatar Don Gagne

parent efd77cee
......@@ -9,6 +9,14 @@
"decimalPlaces": 0,
"defaultValue": 0
},
{
"name": "EntranceAltitude",
"shortDescription": "Vehicle will fly to/from the structure at this altitude.",
"type": "double",
"units": "m",
"decimalPlaces": 1,
"defaultValue": 50
},
{
"name": "Altitude",
"shortDescription": "Altitude for the bottom layer of the structure scan.",
......
......@@ -31,7 +31,8 @@ public:
StructureScanComplexItem(Vehicle* vehicle, bool flyView, const QString& kmlOrSHPFile, QObject* parent);
Q_PROPERTY(CameraCalc* cameraCalc READ cameraCalc CONSTANT)
Q_PROPERTY(Fact* altitude READ altitude CONSTANT)
Q_PROPERTY(Fact* entranceAlt READ entranceAlt CONSTANT)
Q_PROPERTY(Fact* scanBottomAlt READ scanBottomAlt CONSTANT)
Q_PROPERTY(Fact* structureHeight READ structureHeight CONSTANT)
Q_PROPERTY(Fact* layers READ layers CONSTANT)
Q_PROPERTY(Fact* gimbalPitch READ gimbalPitch CONSTANT)
......@@ -43,7 +44,8 @@ public:
Q_PROPERTY(QGCMapPolygon* flightPolygon READ flightPolygon CONSTANT)
CameraCalc* cameraCalc (void) { return &_cameraCalc; }
Fact* altitude (void) { return &_altitudeFact; }
Fact* entranceAlt (void) { return &_entranceAltFact; }
Fact* scanBottomAlt (void) { return &_scanBottomAltFact; }
Fact* structureHeight (void) { return &_structureHeightFact; }
Fact* layers (void) { return &_layersFact; }
Fact* gimbalPitch (void) { return &_gimbalPitchFact; }
......@@ -100,7 +102,7 @@ public:
static const char* jsonComplexItemTypeValue;
static const char* settingsGroup;
static const char* altitudeName;
static const char* scanBottomAltName;
static const char* structureHeightName;
static const char* layersName;
static const char* gimbalPitchName;
......@@ -122,6 +124,7 @@ private slots:
void _recalcLayerInfo (void);
void _updateLastSequenceNumber (void);
void _updateGimbalPitch (void);
void _validateEntryVertex (void);
private:
void _setExitCoordinate(const QGeoCoordinate& coordinate);
......@@ -146,15 +149,18 @@ private:
CameraCalc _cameraCalc;
SettingsFact _altitudeFact;
SettingsFact _scanBottomAltFact;
SettingsFact _structureHeightFact;
SettingsFact _layersFact;
SettingsFact _gimbalPitchFact;
SettingsFact _startFromTopFact;
SettingsFact _entranceAltFact;
static const char* _jsonCameraCalcKey;
static const char* _jsonAltitudeRelativeKey;
static const char* _entranceAltName; // This value cannot be overriden
friend class StructureScanComplexItemTest;
};
......
......@@ -59,7 +59,7 @@ void StructureScanComplexItemTest::_testDirty(void)
// These facts should set dirty when changed
QList<Fact*> rgFacts;
rgFacts << _structureScanItem->altitude() << _structureScanItem->layers();
rgFacts << _structureScanItem->entranceAlt() << _structureScanItem->layers();
for(Fact* fact: rgFacts) {
qDebug() << fact->name();
QVERIFY(!_structureScanItem->dirty());
......
......@@ -128,9 +128,15 @@ Rectangle {
visible: missionItem.cameraCalc.isManualCamera
}
QGCLabel { text: qsTr("Bottom layer alt") }
QGCLabel { text: qsTr("Scan bottom alt") }
FactTextField {
fact: missionItem.altitude
fact: missionItem.scanBottomAlt
Layout.fillWidth: true
}
QGCLabel { text: qsTr("Entrance/Exit alt") }
FactTextField {
fact: missionItem.entranceAlt
Layout.fillWidth: true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment