1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-572 WP Editor: Add online help. Fixes + display WPnumber while browsing between tabs.

This commit is contained in:
Laurent Lalanne 2017-12-28 20:10:09 +01:00
parent c3d840ad63
commit c8f81b9956
3 changed files with 656 additions and 220 deletions

View File

@ -38,6 +38,8 @@ opmap_edit_waypoint_dialog::opmap_edit_waypoint_dialog(QWidget *parent, QAbstrac
ui(new Ui::opmap_edit_waypoint_dialog)
{
ui->setupUi(this);
ui->pushButtonPrevious->setEnabled(false);
ui->pushButtonNext->setEnabled(false);
connect(ui->checkBoxLocked, SIGNAL(toggled(bool)), this, SLOT(enableEditWidgets(bool)));
connect(ui->cbMode, SIGNAL(currentIndexChanged(int)), this, SLOT(setupModeWidgets()));
connect(ui->cbCondition, SIGNAL(currentIndexChanged(int)), this, SLOT(setupConditionWidgets()));
@ -77,10 +79,27 @@ opmap_edit_waypoint_dialog::opmap_edit_waypoint_dialog(QWidget *parent, QAbstrac
mapper->addMapping(ui->sbJump, flightDataModel::JUMPDESTINATION);
mapper->addMapping(ui->sbError, flightDataModel::ERRORDESTINATION);
connect(itemSelection, SIGNAL(currentRowChanged(QModelIndex, QModelIndex)), this, SLOT(currentRowChanged(QModelIndex, QModelIndex)));
ui->descriptionCommandLabel->setText(tr("<p>The Command specifies the transition to the next state (aka waypoint), as well as when it "
"is to be executed. This command will always switch to another waypoint instantly, but which waypoint depends on the Condition.</p>"
"<p>The JumpDestination is the waypoint to jump to in unconditional or conditional jumps.</p>"));
ui->descriptionErrorDestinationLabel->setText(tr("<p>The ErrorDestination is special; it allows exception handling based on the PathFollower. "
"If the PathFollower indicates that it is unable to execute Mode, it indicates this error in the PathStatus UAVObject. "
"If that happens, then the sequence of waypoints is interrupted and the waypoint in ErrorDestination becomes the Active Waypoint. "
"A thinkable use case for this functionality would be to steer towards a safe emergency landing site if the engine fails.</p>"));
}
void opmap_edit_waypoint_dialog::currentIndexChanged(int index)
{
ui->lbNumber->setText(QString::number(index + 1));
ui->wpNumberSpinBox->setValue(index + 1);
bool isMin = (index == 0);
bool isMax = ((index + 1) == mapper->model()->rowCount());
ui->pushButtonPrevious->setEnabled(!isMin);
ui->pushButtonNext->setEnabled(!isMax);
QModelIndex idx = mapper->model()->index(index, 0);
if (index == itemSelection->currentIndex().row()) {
return;
@ -98,162 +117,205 @@ void opmap_edit_waypoint_dialog::setupModeWidgets()
{
MapDataDelegate::ModeOptions mode = (MapDataDelegate::ModeOptions)ui->cbMode->itemData(ui->cbMode->currentIndex()).toInt();
ui->modeParam1->setText("");
ui->modeParam2->setText("");
ui->modeParam3->setText("");
ui->modeParam4->setText("");
ui->modeParam1->setEnabled(false);
ui->modeParam2->setEnabled(false);
ui->modeParam3->setEnabled(false);
ui->modeParam4->setEnabled(false);
ui->dsb_modeParam1->setEnabled(false);
ui->dsb_modeParam2->setEnabled(false);
ui->dsb_modeParam3->setEnabled(false);
ui->dsb_modeParam4->setEnabled(false);
switch (mode) {
case MapDataDelegate::MODE_GOTOENDPOINT:
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will try to hold position at a fixed end-coordinate. "
"If elsewhere, the craft will steer towards the coordinate but not "
"necessarily in a straight line as drift will not be compensated.</p>"));
break;
case MapDataDelegate::MODE_FOLLOWVECTOR:
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will attempt to stay on a defined trajectory from the previous waypoint "
"to the current one. Any deviation from this path, for example by wind, will be corrected. "
"This is the best and obvious choice for direct straight-line (rhumb line) navigation in any vehicle.</p>"));
break;
case MapDataDelegate::MODE_CIRCLERIGHT:
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will attempt to fly a circular trajectory around a waypoint. "
"The curve radius is defined by the distance from the previous waypoint, therefore setting the coordinate "
"of the waypoint perpendicular to the previous flight path leg (and on the side the vehicle is supposed to turn toward!) "
"will lead to the smoothest possible transition.</p><p>Staying in FlyCircle for a prolonged time will lead to a circular "
"loiter trajectory around a waypoint, but this mode can be used in combination with the PointingTowardsNext-EndCondition "
"to stay on the curved trajectory until the vehicle is moving towards the next waypoint, which allows for very controlled "
"turns in flight paths.</p>"));
break;
case MapDataDelegate::MODE_CIRCLELEFT:
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will attempt to fly a circular trajectory around a waypoint. "
"The curve radius is defined by the distance from the previous waypoint, therefore setting the coordinate "
"of the waypoint perpendicular to the previous flight path leg (and on the side the vehicle is supposed to turn toward!) "
"will lead to the smoothest possible transition.</p><p>Staying in FlyCircle for a prolonged time will lead to a circular "
"loiter trajectory around a waypoint, but this mode can be used in combination with the PointingTowardsNext-EndCondition "
"to stay on the curved trajectory until the vehicle is moving towards the next waypoint, which allows for very controlled "
"turns in flight paths.</p>"));
break;
case MapDataDelegate::MODE_DISARMALARM:
case MapDataDelegate::MODE_LAND:
case MapDataDelegate::MODE_BRAKE:
ui->modeParam1->setVisible(false);
ui->modeParam2->setVisible(false);
ui->modeParam3->setVisible(false);
ui->modeParam4->setVisible(false);
ui->dsb_modeParam1->setVisible(false);
ui->dsb_modeParam2->setVisible(false);
ui->dsb_modeParam3->setVisible(false);
ui->dsb_modeParam4->setVisible(false);
break;
case MapDataDelegate::MODE_VELOCITY:
ui->modeParam1->setVisible(true);
ui->modeParam2->setVisible(true);
ui->modeParam3->setVisible(true);
ui->modeParam4->setVisible(false);
ui->dsb_modeParam1->setVisible(true);
ui->dsb_modeParam2->setVisible(true);
ui->dsb_modeParam3->setVisible(true);
ui->dsb_modeParam4->setVisible(false);
break;
case MapDataDelegate::MODE_FIXEDATTITUDE:
ui->modeParam1->setText("pitch");
ui->modeParam2->setText("roll");
ui->modeParam3->setText("yaw");
ui->modeParam4->setText("thrust");
ui->modeParam1->setVisible(true);
ui->modeParam2->setVisible(true);
ui->modeParam3->setVisible(true);
ui->modeParam4->setVisible(true);
ui->dsb_modeParam1->setVisible(true);
ui->dsb_modeParam2->setVisible(true);
ui->dsb_modeParam3->setVisible(true);
ui->dsb_modeParam4->setVisible(true);
break;
case MapDataDelegate::MODE_SETACCESSORY:
ui->modeParam1->setText("Acc.channel");
ui->modeParam2->setText("Value");
ui->modeParam1->setVisible(true);
ui->modeParam2->setVisible(true);
ui->modeParam3->setVisible(false);
ui->modeParam4->setVisible(false);
ui->dsb_modeParam1->setVisible(true);
ui->dsb_modeParam2->setVisible(true);
ui->dsb_modeParam3->setVisible(false);
ui->dsb_modeParam4->setVisible(false);
ui->descriptionModeLabel->setText(tr("<p>The Autopilot is instructed to force a CRITICAL PathFollower alarm. A PathFollower alarm of type CRITICAL "
"is supposed to automatically set the vehicle to DISARMED and thus disable the engines, cut fuel supply, ...</p><p>"
"The PathFollower can do this during any mode in case of emergency, but through this mode the PathPlanner "
"can force this behavior, for example after a landing.</p>"));
break;
case MapDataDelegate::MODE_AUTOTAKEOFF:
// FIXME: Do nothing?
// FixedWing do not use parameters, vertical velocity can be set for multirotors as param0
ui->modeParam1->setText("Speed (m/s):");
ui->modeParam1->setEnabled(true);
ui->dsb_modeParam1->setEnabled(true);
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will engage a hardcoded, fully automated takeoff sequence. "
"Using a fixed attitude, heading towards the destination waypoint for a fixed wing or "
"a vertical climb for a multirotor.</p>"
"<p>Vertical speed in meters/second, for multirotors. (Will be around 0.6m/s)</p>"));
break;
case MapDataDelegate::MODE_LAND:
// FixedWing do not use parameters, vertical velocity can be set for multirotors as param0 (0.1/0.6m/s range)
ui->modeParam1->setText("Speed (m/s):");
ui->modeParam1->setEnabled(true);
ui->dsb_modeParam1->setEnabled(true);
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will engage a hardcoded, fully automated landing sequence. "
"Using a fixed attitude, heading towards the destination waypoint for a fixed wing or "
"a vertical descent for a multirotor.</p>"
"<p>Vertical speed in meters/second, for multirotors. (Will be around 0.6m/s)</p>"));
break;
case MapDataDelegate::MODE_BRAKE:
ui->descriptionModeLabel->setText(tr("<p>This mode is used internally by assisted flight modes with multirotors to slow down the velocity.</p>"));
break;
case MapDataDelegate::MODE_VELOCITY:
ui->descriptionModeLabel->setText(tr("<p>This mode is used internally by assisted flight modes with multirotors to maintain a velocity in 3D space.</p>"));
break;
case MapDataDelegate::MODE_FIXEDATTITUDE:
ui->modeParam1->setText("Roll:");
ui->modeParam2->setText("Pitch:");
ui->modeParam3->setText("Yaw:");
ui->modeParam4->setText("Thrust:");
ui->modeParam1->setEnabled(true);
ui->modeParam2->setEnabled(true);
ui->modeParam3->setEnabled(true);
ui->modeParam4->setEnabled(true);
ui->dsb_modeParam1->setEnabled(true);
ui->dsb_modeParam2->setEnabled(true);
ui->dsb_modeParam3->setEnabled(true);
ui->dsb_modeParam4->setEnabled(true);
ui->descriptionModeLabel->setText(tr("<p>The Autopilot will play dumb and simply instruct the Stabilization Module to assume a certain Roll, Pitch angle "
"and optionally a Yaw rotation rate and Thrust setting. This allows for very simple auto-takeoff and "
"auto-landing maneuvers.</p>"
"<p>Roll(+-180°) and Pitch (+-90°) angles in degrees</p>"
"<p>Yaw rate in deg/s</p>"
"<p>Thrust from 0 to 1</p>"));
break;
case MapDataDelegate::MODE_SETACCESSORY:
ui->modeParam1->setText("Acc.channel:");
ui->modeParam2->setText("Value:");
ui->modeParam1->setEnabled(true);
ui->modeParam2->setEnabled(true);
ui->dsb_modeParam1->setEnabled(true);
ui->dsb_modeParam2->setEnabled(true);
ui->descriptionModeLabel->setText(tr("<p>Not yet implemented.</p>"));
// ui->descriptionModeLabel->setText(tr("<p>In this mode, the PathFollower is supposed to inject a specific value (-1|0|+1 range) into an AccessoryDesired channel. "
// "This would allow one to control arbitrary auxilliary components from the PathPlanner like flaps and landing gear.</p>"));
break;
default:
ui->descriptionModeLabel->setText(tr(""));
break;
}
}
void opmap_edit_waypoint_dialog::setupConditionWidgets()
{
MapDataDelegate::EndConditionOptions mode = (MapDataDelegate::EndConditionOptions)ui->cbCondition->itemData(ui->cbCondition->currentIndex()).toInt();
ui->condParam1->setText("");
ui->condParam2->setText("");
ui->condParam3->setText("");
ui->condParam4->setText("");
ui->condParam1->setEnabled(false);
ui->condParam2->setEnabled(false);
ui->condParam3->setEnabled(false);
ui->condParam4->setEnabled(false);
ui->dsb_condParam1->setEnabled(false);
ui->dsb_condParam2->setEnabled(false);
ui->dsb_condParam3->setEnabled(false);
ui->dsb_condParam4->setEnabled(false);
switch (mode) {
case MapDataDelegate::ENDCONDITION_NONE:
ui->descriptionConditionLabel->setText(tr("<p>This condition is always false. A WaypointAction with EndCondition to None will stay in "
"its mode until forever, or until an Error in the PathFollower triggers the ErrorJump. (For example out of fuel!)</p>"));
break;
case MapDataDelegate::ENDCONDITION_IMMEDIATE:
ui->descriptionConditionLabel->setText(tr("<p>Opposite to the None condition, the immediate condition is always true.</p>"));
break;
case MapDataDelegate::ENDCONDITION_PYTHONSCRIPT:
ui->condParam1->setVisible(false);
ui->condParam2->setVisible(false);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(false);
ui->dsb_condParam2->setVisible(false);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->descriptionConditionLabel->setText(tr("<p>Not yet implemented.</p>"));
break;
case MapDataDelegate::ENDCONDITION_TIMEOUT:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(false);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(false);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("Timeout(s)");
ui->condParam1->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->condParam1->setText("Timeout (s)");
ui->descriptionConditionLabel->setText(tr("<p>The Timeout condition measures time this waypoint is active (in seconds).</p>"));
break;
case MapDataDelegate::ENDCONDITION_DISTANCETOTARGET:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(true);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(true);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("Distance(m)");
ui->condParam2->setText("Flag(0=2D,1=3D)"); // FIXME
ui->condParam1->setEnabled(true);
ui->condParam2->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->dsb_condParam2->setEnabled(true);
ui->condParam1->setText("Distance (m):");
ui->condParam2->setText("Flag:");
ui->descriptionConditionLabel->setText(tr("<p>The DistanceToTarget condition measures the distance to a waypoint, returns true if closer.</p>"
"<p>Flag: <b>0</b>= 2D distance, <b>1</b>= 3D distance</p>"));
break;
case MapDataDelegate::ENDCONDITION_LEGREMAINING:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(false);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(false);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("Relative Distance(0=complete,1=just starting)");
ui->condParam1->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->condParam1->setText("Relative Distance:");
ui->descriptionConditionLabel->setText(tr("<p>The LegRemaining condition measures how far the pathfollower got on a linear path segment, returns true "
"if closer to destination(path more complete).</p>"
"<p><b>0</b>=complete, <b>1</b>=just starting</p>"));
break;
case MapDataDelegate::ENDCONDITION_BELOWERROR:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(false);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(false);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("error margin (in m)");
ui->condParam1->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->condParam1->setText("Error margin (m):");
ui->descriptionConditionLabel->setText(tr("<p>The BelowError condition measures the error on a path segment, returns true if error is below margin in meters.</p>"));
break;
case MapDataDelegate::ENDCONDITION_ABOVEALTITUDE:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(false);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(false);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("Altitude in meters (negative)");
ui->condParam1->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->condParam1->setText("Altitude (m):");
ui->descriptionConditionLabel->setText(tr("<p>The AboveAltitude condition measures the flight altitude relative to home position, returns true if "
"above critical altitude.</p><p><b>WARNING!</b> altitudes set here are always <b>negative</b> if above Home. (down coordinate)</p>"));
break;
case MapDataDelegate::ENDCONDITION_ABOVESPEED:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(true);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(true);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("Speed in meters/second");
ui->condParam2->setText("flag: 0=groundspeed 1=airspeed");
ui->condParam1->setEnabled(true);
ui->condParam2->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->dsb_condParam2->setEnabled(true);
ui->condParam1->setText("Speed (m/s):");
ui->condParam2->setText("Flag:");
ui->descriptionConditionLabel->setText(tr("<p>The AboveSpeed measures the movement speed(3D), returns true if above critical speed</p>"
"<p>Speed in meters / second</p>"
"<p>Flag: <b>0</b>= groundspeed <b>1</b>= airspeed</p>"));
break;
case MapDataDelegate::ENDCONDITION_POINTINGTOWARDSNEXT:
ui->condParam1->setVisible(true);
ui->condParam2->setVisible(false);
ui->condParam3->setVisible(false);
ui->condParam4->setVisible(false);
ui->dsb_condParam1->setVisible(true);
ui->dsb_condParam2->setVisible(false);
ui->dsb_condParam3->setVisible(false);
ui->dsb_condParam4->setVisible(false);
ui->condParam1->setText("Degrees variation allowed");
ui->condParam1->setEnabled(true);
ui->dsb_condParam1->setEnabled(true);
ui->condParam1->setText("Degrees:");
ui->descriptionConditionLabel->setText(tr("<p>The PointingTowardsNext condition measures the horizontal movement vector direction relative "
"to the next waypoint regardless whether this waypoint will ever be active "
"(Command could jump to a different waypoint on true).</p><p>This is useful for curve segments where "
"the craft should stop circling when facing a certain way(usually the next waypoint), "
"returns true if within a certain angular margin in degrees.</p>"));
break;
default:
ui->descriptionConditionLabel->setText(tr(""));
break;
}
}
@ -304,7 +366,6 @@ void opmap_edit_waypoint_dialog::on_pushButtonApply_clicked()
mapper->submit();
}
void opmap_edit_waypoint_dialog::enableEditWidgets(bool value)
{
QWidget *w;

View File

@ -83,7 +83,7 @@
</property>
</widget>
</item>
<item row="11" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@ -99,10 +99,10 @@
</property>
</widget>
</item>
<item row="11" column="2" colspan="2">
<item row="9" column="1" colspan="2">
<widget class="QLineEdit" name="lineEditDescription"/>
</item>
<item row="2" column="2">
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxLatitude">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -121,7 +121,7 @@
</property>
</widget>
</item>
<item row="3" column="2">
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxLongitude">
<property name="decimals">
<number>5</number>
@ -134,14 +134,14 @@
</property>
</widget>
</item>
<item row="3" column="3">
<item row="3" column="2">
<widget class="QLabel" name="lbDegLong">
<property name="text">
<string>degrees</string>
</property>
</widget>
</item>
<item row="2" column="3">
<item row="2" column="2">
<widget class="QLabel" name="lbDegLat">
<property name="text">
<string>degrees</string>
@ -164,21 +164,21 @@
</property>
</widget>
</item>
<item row="6" column="3">
<item row="5" column="2">
<widget class="QLabel" name="lbDistanceMeters">
<property name="text">
<string>meters</string>
</property>
</widget>
</item>
<item row="7" column="3">
<item row="6" column="2">
<widget class="QLabel" name="lbBearingDeg">
<property name="text">
<string>degrees</string>
</property>
</widget>
</item>
<item row="7" column="0">
<item row="6" column="0">
<widget class="QLabel" name="lbBearing">
<property name="text">
<string>Bearing </string>
@ -188,7 +188,7 @@
</property>
</widget>
</item>
<item row="7" column="2">
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxBearing">
<property name="decimals">
<number>2</number>
@ -198,7 +198,7 @@
</property>
</widget>
</item>
<item row="6" column="0">
<item row="5" column="0">
<widget class="QLabel" name="lbDistance">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@ -214,7 +214,7 @@
</property>
</widget>
</item>
<item row="0" column="3">
<item row="0" column="2">
<widget class="QCheckBox" name="checkBoxLocked">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
@ -234,21 +234,28 @@
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="1">
<widget class="QLabel" name="lbNumber">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="2">
<item row="8" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxVelocity">
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="checkBoxRelative">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="10" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Velocity </string>
@ -258,13 +265,6 @@
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxVelocity">
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
@ -281,14 +281,14 @@
</property>
</widget>
</item>
<item row="4" column="3">
<item row="4" column="2">
<widget class="QLabel" name="label_6">
<property name="text">
<string>meters</string>
</property>
</widget>
</item>
<item row="8" column="0">
<item row="7" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Relative altitude </string>
@ -298,7 +298,7 @@
</property>
</widget>
</item>
<item row="8" column="2">
<item row="7" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxRelativeAltitude">
<property name="minimum">
<double>-999999999.000000000000000</double>
@ -308,24 +308,7 @@
</property>
</widget>
</item>
<item row="8" column="3">
<widget class="QLabel" name="label_9">
<property name="text">
<string>meters</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QDoubleSpinBox" name="doubleSpinBoxDistance">
<property name="decimals">
<number>2</number>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="2">
<item row="4" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxAltitude">
<property name="minimum">
<double>-5000.000000000000000</double>
@ -335,7 +318,24 @@
</property>
</widget>
</item>
<item row="10" column="3">
<item row="7" column="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>meters</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxDistance">
<property name="decimals">
<number>2</number>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="8" column="2">
<widget class="QLabel" name="label_10">
<property name="text">
<string>m/s</string>
@ -344,6 +344,19 @@
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
@ -353,6 +366,48 @@
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="2" rowspan="6">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="descriptionModeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Description</string>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
@ -363,7 +418,7 @@
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>120</width>
<height>0</height>
</size>
</property>
@ -379,7 +434,14 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cbMode"/>
<widget class="QComboBox" name="cbMode">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="dsb_modeParam1">
@ -399,6 +461,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
@ -427,6 +495,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
@ -446,6 +517,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
@ -465,6 +539,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
@ -497,21 +574,34 @@
</property>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_2">
<item row="5" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
@ -519,11 +609,37 @@
<string>End condition</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="5" column="1">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="Condition">
<property name="sizePolicy">
@ -534,7 +650,7 @@
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>120</width>
<height>0</height>
</size>
</property>
@ -550,7 +666,14 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cbCondition"/>
<widget class="QComboBox" name="cbCondition">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="dsb_condParam1">
@ -579,6 +702,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
@ -598,6 +724,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0">
@ -617,6 +746,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
@ -636,6 +768,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
@ -668,15 +803,42 @@
</property>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_3">
<item row="0" column="2" rowspan="6">
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="descriptionConditionLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Description</string>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
@ -684,18 +846,108 @@
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Command</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="4" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_5">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="0" column="0">
<property name="rightMargin">
<number>0</number>
</property>
<item row="2" column="1" colspan="4">
<widget class="QLabel" name="descriptionCommandLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Description</string>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<item>
<widget class="QSpinBox" name="sbJump">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@ -705,7 +957,7 @@
</property>
<property name="minimumSize">
<size>
<width>100</width>
<width>130</width>
<height>0</height>
</size>
</property>
@ -720,10 +972,17 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cbCommand"/>
<item row="0" column="2" colspan="2">
<widget class="QComboBox" name="cbCommand">
<property name="minimumSize">
<size>
<width>210</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="jumpDest">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@ -740,29 +999,29 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="condParam2_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Error Destination</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer_4">
<item row="2" column="5">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="4">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -774,11 +1033,117 @@
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="sbJump"/>
</layout>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="sbError"/>
<item row="2" column="0">
<layout class="QGridLayout" name="gridLayout_9">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item row="1" column="0">
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" colspan="3">
<widget class="QLabel" name="descriptionErrorDestinationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Description</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="condParam2_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>130</width>
<height>0</height>
</size>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Error Destination</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="4">
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QSpinBox" name="sbError">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
@ -795,6 +1160,16 @@
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="wpNumberSpinBox">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonNext">
<property name="text">

View File

@ -122,7 +122,7 @@ void MapDataDelegate::loadComboBox(QComboBox *combo, flightDataModel::pathPlanDa
case flightDataModel::CONDITION:
combo->addItem("None", ENDCONDITION_NONE);
combo->addItem("Timeout", ENDCONDITION_TIMEOUT);
combo->addItem("Distance to tgt", ENDCONDITION_DISTANCETOTARGET);
combo->addItem("Distance to target", ENDCONDITION_DISTANCETOTARGET);
combo->addItem("Leg remaining", ENDCONDITION_LEGREMAINING);
combo->addItem("Below Error", ENDCONDITION_BELOWERROR);
combo->addItem("Above Altitude", ENDCONDITION_ABOVEALTITUDE);
@ -132,11 +132,11 @@ void MapDataDelegate::loadComboBox(QComboBox *combo, flightDataModel::pathPlanDa
combo->addItem("Immediate", ENDCONDITION_IMMEDIATE);
break;
case flightDataModel::COMMAND:
combo->addItem("On conditon next wp", COMMAND_ONCONDITIONNEXTWAYPOINT);
combo->addItem("On NOT conditon next wp", COMMAND_ONNOTCONDITIONNEXTWAYPOINT);
combo->addItem("On conditon jump wp", COMMAND_ONCONDITIONJUMPWAYPOINT);
combo->addItem("On NOT conditon jump wp", COMMAND_ONNOTCONDITIONJUMPWAYPOINT);
combo->addItem("On conditon jump wp else next wp", COMMAND_IFCONDITIONJUMPWAYPOINTELSENEXTWAYPOINT);
combo->addItem("On condition next wp", COMMAND_ONCONDITIONNEXTWAYPOINT);
combo->addItem("On NOT condition next wp", COMMAND_ONNOTCONDITIONNEXTWAYPOINT);
combo->addItem("On condition jump wp", COMMAND_ONCONDITIONJUMPWAYPOINT);
combo->addItem("On NOT condition jump wp", COMMAND_ONNOTCONDITIONJUMPWAYPOINT);
combo->addItem("On condition jump wp else next wp", COMMAND_IFCONDITIONJUMPWAYPOINTELSENEXTWAYPOINT);
break;
default:
break;