diff --git a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp index 0b41bc21f..9e9af7aeb 100644 --- a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp +++ b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.cpp @@ -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("

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.

" + "

The JumpDestination is the waypoint to jump to in unconditional or conditional jumps.

")); + + ui->descriptionErrorDestinationLabel->setText(tr("

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.

")); } + 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("

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.

")); + break; case MapDataDelegate::MODE_FOLLOWVECTOR: + ui->descriptionModeLabel->setText(tr("

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.

")); + break; case MapDataDelegate::MODE_CIRCLERIGHT: + ui->descriptionModeLabel->setText(tr("

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.

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.

")); + break; case MapDataDelegate::MODE_CIRCLELEFT: + ui->descriptionModeLabel->setText(tr("

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.

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.

")); + 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("

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, ...

" + "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.

")); 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("

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.

" + "

Vertical speed in meters/second, for multirotors. (Will be around 0.6m/s)

")); + 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("

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.

" + "

Vertical speed in meters/second, for multirotors. (Will be around 0.6m/s)

")); + break; + case MapDataDelegate::MODE_BRAKE: + ui->descriptionModeLabel->setText(tr("

This mode is used internally by assisted flight modes with multirotors to slow down the velocity.

")); + break; + case MapDataDelegate::MODE_VELOCITY: + ui->descriptionModeLabel->setText(tr("

This mode is used internally by assisted flight modes with multirotors to maintain a velocity in 3D space.

")); + 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("

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.

" + "

Roll(+-180°) and Pitch (+-90°) angles in degrees

" + "

Yaw rate in deg/s

" + "

Thrust from 0 to 1

")); + 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("

Not yet implemented.

")); + // ui->descriptionModeLabel->setText(tr("

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.

")); + 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("

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!)

")); + break; case MapDataDelegate::ENDCONDITION_IMMEDIATE: + ui->descriptionConditionLabel->setText(tr("

Opposite to the None condition, the immediate condition is always true.

")); + 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("

Not yet implemented.

")); 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("

The Timeout condition measures time this waypoint is active (in seconds).

")); 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("

The DistanceToTarget condition measures the distance to a waypoint, returns true if closer.

" + "

Flag: 0= 2D distance, 1= 3D distance

")); 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("

The LegRemaining condition measures how far the pathfollower got on a linear path segment, returns true " + "if closer to destination(path more complete).

" + "

0=complete, 1=just starting

")); 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("

The BelowError condition measures the error on a path segment, returns true if error is below margin in meters.

")); 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("

The AboveAltitude condition measures the flight altitude relative to home position, returns true if " + "above critical altitude.

WARNING! altitudes set here are always negative if above Home. (down coordinate)

")); 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("

The AboveSpeed measures the movement speed(3D), returns true if above critical speed

" + "

Speed in meters / second

" + "

Flag: 0= groundspeed 1= airspeed

")); 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("

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).

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.

")); 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; diff --git a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui index 597c3e6ac..4dfb28d2b 100644 --- a/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui +++ b/ground/gcs/src/plugins/opmap/opmap_edit_waypoint_dialog.ui @@ -83,7 +83,7 @@ - + @@ -99,10 +99,10 @@ - + - + @@ -121,7 +121,7 @@ - + 5 @@ -134,14 +134,14 @@ - + degrees - + degrees @@ -164,21 +164,21 @@ - + meters - + degrees - + Bearing @@ -188,7 +188,7 @@ - + 2 @@ -198,7 +198,7 @@ - + @@ -214,7 +214,7 @@ - + Qt::LeftToRight @@ -234,21 +234,28 @@ - + 0 - + + + + 999999999.000000000000000 + + + + - + Velocity @@ -258,13 +265,6 @@ - - - - 999999999.000000000000000 - - - @@ -281,14 +281,14 @@ - + meters - + Relative altitude @@ -298,7 +298,7 @@ - + -999999999.000000000000000 @@ -308,24 +308,7 @@ - - - - meters - - - - - - - 2 - - - 999999999.000000000000000 - - - - + -5000.000000000000000 @@ -335,7 +318,24 @@ - + + + + meters + + + + + + + 2 + + + 999999999.000000000000000 + + + + m/s @@ -344,6 +344,19 @@ + + + + Qt::Vertical + + + + 20 + 0 + + + + @@ -353,6 +366,48 @@ + + + + 6 + + + 0 + + + + + + 0 + 0 + + + + Description + + + Qt::AlignJustify|Qt::AlignTop + + + true + + + + + + + Qt::Vertical + + + + 20 + 5 + + + + + + @@ -363,7 +418,7 @@ - 100 + 120 0 @@ -379,7 +434,14 @@ - + + + + 120 + 0 + + + @@ -399,6 +461,12 @@ 0 + + + 100 + 0 + + Qt::LeftToRight @@ -427,6 +495,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -446,6 +517,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -465,6 +539,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -497,21 +574,34 @@ - - + + - Qt::Horizontal + Qt::Vertical - 40 - 20 + 20 + 5 + + + + Qt::Vertical + + + + 20 + 0 + + + + @@ -519,11 +609,37 @@ End condition + + + + Qt::Vertical + + + + 20 + 0 + + + + QLayout::SetDefaultConstraint + + + + Qt::Vertical + + + + 20 + 5 + + + + @@ -534,7 +650,7 @@ - 100 + 120 0 @@ -550,7 +666,14 @@ - + + + + 150 + 0 + + + @@ -579,6 +702,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -598,6 +724,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -617,6 +746,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -636,6 +768,9 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true + @@ -668,18 +803,47 @@ - - - - Qt::Horizontal + + + + 6 - - - 40 - 20 - + + 0 - + + + + + 0 + 0 + + + + Description + + + Qt::AlignJustify|Qt::AlignTop + + + true + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + @@ -690,12 +854,100 @@ Command + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + Qt::Horizontal + + + QLayout::SetDefaultConstraint - + + 0 + + + + + + 0 + 0 + + + + Description + + + Qt::AlignJustify|Qt::AlignVCenter + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 0 + + + + + + + + 0 + + + + + + 60 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 10 + + + + + + + @@ -705,7 +957,7 @@ - 100 + 130 0 @@ -720,10 +972,17 @@ - - + + + + + 210 + 0 + + + - + @@ -740,29 +999,29 @@ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 0 - 0 - - - - Qt::LeftToRight - - - Error Destination - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + true - - + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + + + Qt::Horizontal @@ -774,11 +1033,117 @@ - - + + + + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + - - + + + + + 0 + 0 + + + + Description + + + true + + + + + + + + 0 + 0 + + + + + 130 + 0 + + + + Qt::LeftToRight + + + Error Destination + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + + + + + + 60 + 0 + + + + + + + + Qt::Horizontal + + + + 10 + 20 + + + @@ -795,6 +1160,16 @@ + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + diff --git a/ground/gcs/src/plugins/opmap/widgetdelegates.cpp b/ground/gcs/src/plugins/opmap/widgetdelegates.cpp index b0ff8bed0..e69fb998f 100644 --- a/ground/gcs/src/plugins/opmap/widgetdelegates.cpp +++ b/ground/gcs/src/plugins/opmap/widgetdelegates.cpp @@ -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;