Commit 36018f72 authored by Lorenz Meier's avatar Lorenz Meier

Merged Trofs WP improvements

parents 9afab6b5 8aa52859
......@@ -226,12 +226,9 @@ FORMS += src/ui/MainWindow.ui \
src/ui/designer/QGCCommandButton.ui \
src/ui/QGCMAVLinkLogPlayer.ui \
src/ui/QGCWaypointListMulti.ui \
src/ui/mission/QGCCustomWaypointAction.ui \
src/ui/QGCUDPLinkConfiguration.ui \
src/ui/QGCSettingsWidget.ui \
src/ui/UASControlParameters.ui \
src/ui/mission/QGCMissionDoWidget.ui \
src/ui/mission/QGCMissionConditionWidget.ui \
src/ui/map/QGCMapTool.ui \
src/ui/map/QGCMapToolBar.ui \
src/ui/QGCMAVLinkInspector.ui \
......@@ -241,7 +238,20 @@ FORMS += src/ui/MainWindow.ui \
src/ui/mavlink/QGCMAVLinkMessageSender.ui \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.ui \
src/ui/QGCPluginHost.ui \
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.ui
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.ui \
src/ui/mission/QGCMissionOther.ui \
src/ui/mission/QGCMissionNavWaypoint.ui \
src/ui/mission/QGCMissionDoJump.ui \
src/ui/mission/QGCMissionConditionDelay.ui \
src/ui/mission/QGCMissionNavLoiterUnlim.ui \
src/ui/mission/QGCMissionNavLoiterTurns.ui \
src/ui/mission/QGCMissionNavLoiterTime.ui \
src/ui/mission/QGCMissionNavReturnToLaunch.ui \
src/ui/mission/QGCMissionNavLand.ui \
src/ui/mission/QGCMissionNavTakeoff.ui \
src/ui/mission/QGCMissionNavSweep.ui \
src/ui/mission/QGCMissionDoStartSearch.ui \
src/ui/mission/QGCMissionDoFinishSearch.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
......@@ -256,6 +266,7 @@ INCLUDEPATH += src \
src/ui/param \
src/ui/watchdog \
src/ui/map3D \
src/ui/mission \
src/ui/designer
HEADERS += src/MG.h \
src/QGCCore.h \
......@@ -342,8 +353,6 @@ HEADERS += src/MG.h \
src/ui/QGCUDPLinkConfiguration.h \
src/ui/QGCSettingsWidget.h \
src/ui/uas/UASControlParameters.h \
src/ui/mission/QGCMissionDoWidget.h \
src/ui/mission/QGCMissionConditionWidget.h \
src/uas/QGCUASParamManager.h \
src/ui/map/QGCMapWidget.h \
src/ui/map/MAV2DIcon.h \
......@@ -363,7 +372,21 @@ HEADERS += src/MG.h \
src/ui/mavlink/QGCMAVLinkMessageSender.h \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.h \
src/ui/QGCPluginHost.h \
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.h
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.h \
src/ui/map3D/gpl.h\
src/ui/mission/QGCMissionOther.h \
src/ui/mission/QGCMissionNavWaypoint.h \
src/ui/mission/QGCMissionDoJump.h \
src/ui/mission/QGCMissionConditionDelay.h \
src/ui/mission/QGCMissionNavLoiterUnlim.h \
src/ui/mission/QGCMissionNavLoiterTurns.h \
src/ui/mission/QGCMissionNavLoiterTime.h \
src/ui/mission/QGCMissionNavReturnToLaunch.h \
src/ui/mission/QGCMissionNavLand.h \
src/ui/mission/QGCMissionNavTakeoff.h \
src/ui/mission/QGCMissionNavSweep.h \
src/ui/mission/QGCMissionDoStartSearch.h \
src/ui/mission/QGCMissionDoFinishSearch.h
# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::HEADERS += src/ui/map3D/QGCGoogleEarthView.h
......@@ -488,8 +511,6 @@ SOURCES += src/main.cc \
src/ui/QGCUDPLinkConfiguration.cc \
src/ui/QGCSettingsWidget.cc \
src/ui/uas/UASControlParameters.cpp \
src/ui/mission/QGCMissionDoWidget.cc \
src/ui/mission/QGCMissionConditionWidget.cc \
src/uas/QGCUASParamManager.cc \
src/ui/map/QGCMapWidget.cc \
src/ui/map/MAV2DIcon.cc \
......@@ -506,7 +527,21 @@ SOURCES += src/main.cc \
src/ui/mavlink/QGCMAVLinkMessageSender.cc \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.cc \
src/ui/QGCPluginHost.cc \
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.cc
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.cc \
src/ui/map3D/gpl.cc \
src/ui/mission/QGCMissionOther.cc \
src/ui/mission/QGCMissionNavWaypoint.cc \
src/ui/mission/QGCMissionDoJump.cc \
src/ui/mission/QGCMissionConditionDelay.cc \
src/ui/mission/QGCMissionNavLoiterUnlim.cc \
src/ui/mission/QGCMissionNavLoiterTurns.cc \
src/ui/mission/QGCMissionNavLoiterTime.cc \
src/ui/mission/QGCMissionNavReturnToLaunch.cc \
src/ui/mission/QGCMissionNavLand.cc \
src/ui/mission/QGCMissionNavTakeoff.cc \
src/ui/mission/QGCMissionNavSweep.cc \
src/ui/mission/QGCMissionDoStartSearch.cc \
src/ui/mission/QGCMissionDoFinishSearch.cc
# Enable Google Earth only on Mac OS and Windows with Visual Studio compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
......
......@@ -871,8 +871,10 @@ void UASWaypointManager::writeWaypoints()
//send the waypoint count to UAS (this starts the send transaction)
sendWaypointCount();
}
} else if (waypointsEditable.count() == 0) {
sendWaypointClearAll();
else if (waypointsEditable.count() == 0)
{
sendWaypointClearAll();
}
} else {
//we're in another transaction, ignore command
qDebug() << "UASWaypointManager::sendWaypoints() doing something else ignoring command";
......
This diff is collapsed.
......@@ -27,7 +27,7 @@ This file is part of the QGROUNDCONTROL project
* @author Lorenz Meier <mavteam@student.ethz.ch>
* @author Benjamin Knecht <mavteam@student.ethz.ch>
* @author Petri Tanskanen <mavteam@student.ethz.ch>
*
* @author Alex Trofimov <talex@student.ethz.ch>
*/
#ifndef WAYPOINTEDITABLEVIEW_H
......@@ -38,9 +38,7 @@ This file is part of the QGROUNDCONTROL project
#include <iostream>
enum QGC_WAYPOINTEDITABLEVIEW_MODE {
QGC_WAYPOINTEDITABLEVIEW_MODE_NAV,
QGC_WAYPOINTEDITABLEVIEW_MODE_CONDITION,
QGC_WAYPOINTEDITABLEVIEW_MODE_DO,
QGC_WAYPOINTEDITABLEVIEW_MODE_DEFAULT,
QGC_WAYPOINTEDITABLEVIEW_MODE_DIRECT_EDITING
};
......@@ -48,8 +46,20 @@ namespace Ui
{
class WaypointEditableView;
}
class Ui_QGCCustomWaypointAction;
class Ui_QGCMissionDoWidget;
class QGCMissionNavWaypoint;
class QGCMissionNavLoiterUnlim;
class QGCMissionNavLoiterTurns;
class QGCMissionNavLoiterTime;
class QGCMissionNavReturnToLaunch;
class QGCMissionNavLand;
class QGCMissionNavTakeoff;
class QGCMissionNavSweep;
class QGCMissionDoJump;
class QGCMissionDoStartSearch;
class QGCMissionDoFinishSearch;
class QGCMissionConditionDelay;
class QGCMissionOther;
class WaypointEditableView : public QWidget
{
Q_OBJECT
......@@ -67,25 +77,44 @@ public slots:
void remove();
/** @brief Waypoint matching this widget has been deleted */
void deleted(QObject* waypoint);
void changedAutoContinue(int);
void updateFrameView(int frame);
void changedAutoContinue(int);
void changedFrame(int state);
void updateActionView(int action);
void changedAction(int state);
void initializeActionView(int action);
void changedCurrent(int);
void updateValues(void);
void changedAction(int state); //change commandID, including the view
void changedCommand(int mav_cmd_id); //only update WP->command, but do not change the view. Should only be used for "other" waypoint-type.
void changedParam1(double value);
void changedParam2(double value);
void changedParam3(double value);
void changedParam4(double value);
void changedParam5(double value);
void changedParam6(double value);
void changedParam7(double value);
protected slots:
void changeViewMode(QGC_WAYPOINTEDITABLEVIEW_MODE mode);
protected:
virtual void changeEvent(QEvent *e);
Waypoint* wp;
// Special widgets extendending the
// waypoint view to mission capabilities
Ui_QGCCustomWaypointAction* customCommand;
Ui_QGCMissionDoWidget* doCommand;
QGC_WAYPOINTEDITABLEVIEW_MODE viewMode;
// Widgets for every mission element
QGCMissionNavWaypoint* MissionNavWaypointWidget;
QGCMissionNavLoiterUnlim* MissionNavLoiterUnlimWidget;
QGCMissionNavLoiterTurns* MissionNavLoiterTurnsWidget;
QGCMissionNavLoiterTime* MissionNavLoiterTimeWidget;
QGCMissionNavReturnToLaunch* MissionNavReturnToLaunchWidget;
QGCMissionNavLand* MissionNavLandWidget;
QGCMissionNavTakeoff* MissionNavTakeoffWidget;
QGCMissionNavSweep* MissionNavSweepWidget;
QGCMissionDoJump* MissionDoJumpWidget;
QGCMissionDoStartSearch* MissionDoStartSearchWidget;
QGCMissionDoFinishSearch* MissionDoFinishSearchWidget;
QGCMissionConditionDelay* MissionConditionDelayWidget;
QGCMissionOther* MissionOtherWidget;
private:
Ui::WaypointEditableView *m_ui;
......@@ -93,10 +122,19 @@ private:
signals:
void moveUpWaypoint(Waypoint*);
void moveDownWaypoint(Waypoint*);
void removeWaypoint(Waypoint*);
//void currentWaypointChanged(quint16); //unused
void removeWaypoint(Waypoint*);
void changeCurrentWaypoint(quint16);
void setYaw(double);
void commandBroadcast(int mav_cmd_id);
void frameBroadcast(MAV_FRAME frame);
void param1Broadcast(double value);
void param2Broadcast(double value);
void param3Broadcast(double value);
void param4Broadcast(double value);
void param5Broadcast(double value);
void param6Broadcast(double value);
void param7Broadcast(double value);
};
#endif // WAYPOINTEDITABLEVIEW_H
This diff is collapsed.
......@@ -248,7 +248,12 @@ void WaypointList::addEditable()
// Create first waypoint at current MAV position
if (uas->localPositionKnown() || uas->globalPositionKnown())
{
addCurrentPositionWaypoint();
if(addCurrentPositionWaypoint())
{
updateStatusLabel(tr("Added default LOCAL (NED) waypoint."));
wp = new Waypoint(0, 0, 0, -0.50, 0, 0.20, 0, 0,true, true, MAV_FRAME_LOCAL_NED, MAV_CMD_NAV_WAYPOINT);
WPM->addWaypointEditable(wp);
}
}
else
{
......@@ -282,7 +287,7 @@ void WaypointList::addEditable()
}
void WaypointList::addCurrentPositionWaypoint()
int WaypointList::addCurrentPositionWaypoint()
{
if (uas)
{
......@@ -309,6 +314,7 @@ void WaypointList::addCurrentPositionWaypoint()
wp = new Waypoint(0, uas->getLatitude(), uas->getLongitude(), uas->getAltitude(), 0, acceptanceRadiusGlobal, holdTime, yawGlobal, true, false, MAV_FRAME_GLOBAL_RELATIVE_ALT, MAV_CMD_NAV_WAYPOINT);
WPM->addWaypointEditable(wp);
updateStatusLabel(tr("Added GLOBAL, ALTITUDE OVER GROUND waypoint"));
return 0;
}
else if (uas->localPositionKnown())
{
......@@ -323,11 +329,13 @@ void WaypointList::addCurrentPositionWaypoint()
wp = new Waypoint(0, uas->getLocalX(), uas->getLocalY(), uas->getLocalZ(), uas->getYaw(), acceptanceRadiusLocal, holdTime, 0.0, true, false, MAV_FRAME_LOCAL_NED, MAV_CMD_NAV_WAYPOINT);
WPM->addWaypointEditable(wp);
updateStatusLabel(tr("Added LOCAL (NED) waypoint"));
return 0;
}
else
{
// Do nothing
updateStatusLabel(tr("Not adding waypoint, no position of MAV known yet."));
return 1;
}
}
}
......
This diff is collapsed.
......@@ -77,11 +77,9 @@ public slots:
/** @brief Read the remote waypoint list to "view"-tab only*/
void refresh();
/** @brief Add a waypoint to "edit"-tab */
void addEditable();
/** @brief Add a waypoint to "view"-tab */
// void addViewOnly();
void addEditable();
/** @brief Add a waypoint at the current MAV position */
void addCurrentPositionWaypoint();
int addCurrentPositionWaypoint();
/** @brief Add a waypoint by mouse click over the map */
//Update events
......
......@@ -28,7 +28,7 @@ void WaypointViewOnlyView::changedAutoContinue(int state)
void WaypointViewOnlyView::changedCurrent(int state)
//This is a slot receiving signals from QCheckBox m_ui->current. The state given here is whatever the user has clicked and not the true "current" value onboard.
{
qDebug() << "Trof: WaypointViewOnlyView::changedCurrent(" << state << ") ID:" << wp->getId();
//qDebug() << "Trof: WaypointViewOnlyView::changedCurrent(" << state << ") ID:" << wp->getId();
m_ui->current->blockSignals(true);
if (m_ui->current->isChecked() == false)
......@@ -36,19 +36,19 @@ void WaypointViewOnlyView::changedCurrent(int state)
if (wp->getCurrent() == true) //User clicked on the waypoint, that is already current. Box stays checked
{
m_ui->current->setCheckState(Qt::Checked);
qDebug() << "Trof: WaypointViewOnlyView::changedCurrent. Rechecked true. stay true " << m_ui->current->isChecked();
//qDebug() << "Trof: WaypointViewOnlyView::changedCurrent. Rechecked true. stay true " << m_ui->current->isChecked();
}
else // Strange case, unchecking the box which was not checked to start with
{
m_ui->current->setCheckState(Qt::Unchecked);
qDebug() << "Trof: WaypointViewOnlyView::changedCurrent. Unchecked false. set false " << m_ui->current->isChecked();
//qDebug() << "Trof: WaypointViewOnlyView::changedCurrent. Unchecked false. set false " << m_ui->current->isChecked();
}
}
else
{
hightlightDesiredCurrent(true);
m_ui->current->setCheckState(Qt::Unchecked);
qDebug() << "Trof: WaypointViewOnlyView::changedCurrent. Checked new. Sending set_current request to Manager " << m_ui->current->isChecked();
//qDebug() << "Trof: WaypointViewOnlyView::changedCurrent. Checked new. Sending set_current request to Manager " << m_ui->current->isChecked();
emit changeCurrentWaypoint(wp->getId()); //the slot changeCurrentWaypoint() in WaypointList sets all other current flags to false
}
......@@ -365,17 +365,18 @@ void WaypointViewOnlyView::updateValues()
m_ui->displayBar->setText(QString("Delay: %1 sec").arg(wp->getParam1()));
break;
}
case 237: //MAV_CMD_DO_START_SEARCH
#ifdef MAVLINK_ENABLED_PIXHAWK
case MAV_CMD_DO_START_SEARCH:
{
m_ui->displayBar->setText(QString("Start searching for pattern. Success when got more than %2 detections with confidence %1").arg(wp->getParam1()).arg(wp->getParam2()));
break;
}
case 238: //MAV_CMD_DO_FINISH_SEARCH
case MAV_CMD_DO_FINISH_SEARCH:
{
m_ui->displayBar->setText(QString("Check if search was successful. yes -> jump to %1, no -> jump to %2. Jumps left: %3").arg(wp->getParam1()).arg(wp->getParam2()).arg(wp->getParam3()));
break;
}
case 240: //MAV_CMD_DO_SWEEP
case MAV_CMD_NAV_SWEEP:
{
switch (wp->getFrame())
{
......@@ -394,6 +395,7 @@ void WaypointViewOnlyView::updateValues()
} //end Frame switch
break;
}
#endif
default:
{
m_ui->displayBar->setText(QString("Unknown Command ID (%1) : %2, %3, %4, %5, %6, %7, %8").arg(wp->getAction()).arg(wp->getParam1()).arg(wp->getParam2()).arg(wp->getParam3()).arg(wp->getParam4()).arg(wp->getParam5()).arg(wp->getParam6()).arg(wp->getParam7()));
......
......@@ -606,6 +606,9 @@ margin-top: 1ex; /* leave space at the top for the title */
</item>
<item>
<widget class="QCheckBox" name="autoContinue">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -621,6 +624,9 @@ margin-top: 1ex; /* leave space at the top for the title */
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......
#include "QGCMissionConditionDelay.h"
#include "ui_QGCMissionConditionDelay.h"
#include "WaypointEditableView.h"
QGCMissionConditionDelay::QGCMissionConditionDelay(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionConditionDelay)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->param1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->param1SpinBox,SLOT(setValue(double)));
}
QGCMissionConditionDelay::~QGCMissionConditionDelay()
{
delete ui;
}
#ifndef QGCMISSIONCONDITIONDELAY_H
#define QGCMISSIONCONDITIONDELAY_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionConditionDelay;
}
class QGCMissionConditionDelay : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionConditionDelay(WaypointEditableView* WEV);
~QGCMissionConditionDelay();
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionConditionDelay *ui;
};
#endif // QGCMISSIONCONDITIONDELAY_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionConditionDelay</class>
<widget class="QWidget" name="QGCMissionConditionDelay">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>448</width>
<height>37</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QDoubleSpinBox" name="param1SpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Delay duration</string>
</property>
<property name="statusTip">
<string>Delay duration</string>
</property>
<property name="wrapping">
<bool>false</bool>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>Duration: </string>
</property>
<property name="suffix">
<string>s</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCMissionConditionWidget.h"
#include "ui_QGCMissionConditionWidget.h"
QGCMissionConditionWidget::QGCMissionConditionWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCMissionConditionWidget)
{
ui->setupUi(this);
}
QGCMissionConditionWidget::~QGCMissionConditionWidget()
{
delete ui;
}
#ifndef QGCMISSIONCONDITIONWIDGET_H
#define QGCMISSIONCONDITIONWIDGET_H
#include <QWidget>
namespace Ui
{
class QGCMissionConditionWidget;
}
class QGCMissionConditionWidget : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionConditionWidget(QWidget *parent = 0);
~QGCMissionConditionWidget();
private:
Ui::QGCMissionConditionWidget *ui;
};
#endif // QGCMISSIONCONDITIONWIDGET_H
#include "QGCMissionDoFinishSearch.h"
#include "ui_QGCMissionDoFinishSearch.h"
#include "WaypointEditableView.h"
QGCMissionDoFinishSearch::QGCMissionDoFinishSearch(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionDoFinishSearch)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->param1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
connect(this->ui->param2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
connect(this->ui->param3SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
//connect(this->ui->param4SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
//connect(this->ui->param5SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));
//connect(this->ui->param6SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
//connect(this->ui->param7SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->param1SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->param2SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->param3SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->param4SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->param5SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->param6SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->param7SpinBox,SLOT(setValue(double)));
}
QGCMissionDoFinishSearch::~QGCMissionDoFinishSearch()
{
delete ui;
}
#ifndef QGCMISSIONDOFINISHSEARCH_H
#define QGCMISSIONDOFINISHSEARCH_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionDoFinishSearch;
}
class QGCMissionDoFinishSearch : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionDoFinishSearch(WaypointEditableView* WEV);
~QGCMissionDoFinishSearch();
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionDoFinishSearch *ui;
};
#endif // QGCMISSIONDOFINISHSEARCH_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionConditionWidget</class>
<widget class="QWidget" name="QGCMissionConditionWidget">
<class>QGCMissionDoFinishSearch</class>
<widget class="QWidget" name="QGCMissionDoFinishSearch">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1260</width>
<height>31</height>
<width>499</width>
<height>27</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="10,10,10">
<property name="spacing">
<number>4</number>
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QDoubleSpinBox" name="conditionDelayTimeSpinBox">
<property name="prefix">
<string>delay: </string>
<widget class="QDoubleSpinBox" name="param1SpinBox">
<property name="toolTip">
<string>Jump to this index, if search successful</string>
</property>
<property name="suffix">
<string> s</string>
<property name="statusTip">
<string>Jump to this index, if search successful</string>
</property>
<property name="maximum">
<double>50000.000000000000000</double>
<property name="whatsThis">
<string/>
</property>
<property name="value">
<double>5.000000000000000</double>
<property name="keyboardTracking">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="conditionChangeAltRateSpinBox">
<property name="prefix">
<string>rate: </string>
<string>Jump to index: </string>
</property>
<property name="suffix">
<string> m/s</string>
<string/>
</property>
<property name="maximum">
<double>200.000000000000000</double>
<property name="decimals">
<number>0</number>
</property>
<property name="value">
<double>0.500000000000000</double>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="conditionChangeAltFinishAltitudeSpinBox">
<widget class="QDoubleSpinBox" name="param2SpinBox">
<property name="toolTip">
<string>Jump to this index, if search unsuccessful</string>
</property>
<property name="statusTip">
<string>Jump to this index, if search unsuccessful</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>finish altitude: </string>
<string>Jump to index: </string>
</property>
<property name="suffix">
<string> m</string>
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>-100.000000000000000</double>
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1000000.000000000000000</double>
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="conditionDistanceSpinBox">
<property name="prefix">
<string>distance to next wp: </string>
<widget class="QDoubleSpinBox" name="param3SpinBox">
<property name="toolTip">
<string>Remaining number of jumps. Terminate search if jumps == 0.</string>
</property>
<property name="suffix">
<string> m/s</string>
<property name="statusTip">
<string>Remaining number of jumps. Terminate search if jumps == 0.</string>
</property>
<property name="maximum">
<double>50000.000000000000000</double>
<property name="whatsThis">
<string/>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="conditionYawAngleSpinBox">
<property name="prefix">
<string>heading: </string>
<string/>
</property>
<property name="suffix">
<string>°</string>
<string> time(s)</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="conditionYawRateSpinBox">
<property name="prefix">
<string>turn rate: </string>
<property name="decimals">
<number>0</number>
</property>
<property name="suffix">
<string>°/s</string>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>1000.000000000000000</double>
</property>
<property name="value">
<double>15.000000000000000</double>
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="conditionYawDirectionComboBox">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>left/counter-clockwise</string>
</property>
</item>
<item>
<property name="text">
<string>right/clockwise</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="conditionYawOffsetComboBox">
<item>
<property name="text">
<string>compass direction</string>
</property>
</item>
<item>
<property name="text">
<string>offset from current heading</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<resources/>
......
#include "QGCMissionDoJump.h"
#include "ui_QGCMissionDoJump.h"
#include "WaypointEditableView.h"
QGCMissionDoJump::QGCMissionDoJump(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionDoJump)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->param1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
connect(this->ui->param2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->param1SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->param2SpinBox,SLOT(setValue(double)));
}
QGCMissionDoJump::~QGCMissionDoJump()
{
delete ui;
}
#ifndef QGCMISSIONDOJUMP_H
#define QGCMISSIONDOJUMP_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionDoJump;
}
class QGCMissionDoJump : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionDoJump(WaypointEditableView* WEV);
~QGCMissionDoJump();
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionDoJump *ui;
};
#endif // QGCMISSIONDOJUMP_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionDoJump</class>
<widget class="QWidget" name="QGCMissionDoJump">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>448</width>
<height>37</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QDoubleSpinBox" name="param1SpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Mission element ID to jump to</string>
</property>
<property name="statusTip">
<string>Mission element ID to jump to</string>
</property>
<property name="wrapping">
<bool>false</bool>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>Jump to index </string>
</property>
<property name="suffix">
<string/>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="param2SpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Maximal number of jumps</string>
</property>
<property name="statusTip">
<string>Maximal number of jumps</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> time(s)</string>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCMissionDoStartSearch.h"
#include "ui_QGCMissionDoStartSearch.h"
#include "WaypointEditableView.h"
QGCMissionDoStartSearch::QGCMissionDoStartSearch(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionDoStartSearch)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->param1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
connect(this->ui->param2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
//connect(this->ui->param3SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
//connect(this->ui->param4SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
//connect(this->ui->param5SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));
//connect(this->ui->param6SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
//connect(this->ui->param7SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->param1SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->param2SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->param3SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->param4SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->param5SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->param6SpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->param7SpinBox,SLOT(setValue(double)));
}
QGCMissionDoStartSearch::~QGCMissionDoStartSearch()
{
delete ui;
}
#ifndef QGCMISSIONDOSTARTSEARCH_H
#define QGCMISSIONDOSTARTSEARCH_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionDoStartSearch;
}
class QGCMissionDoStartSearch : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionDoStartSearch(WaypointEditableView* WEV);
~QGCMissionDoStartSearch();
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionDoStartSearch *ui;
};
#endif // QGCMISSIONDOSTARTSEARCH_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionDoStartSearch</class>
<widget class="QWidget" name="QGCMissionDoStartSearch">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>482</width>
<height>27</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="10,10">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QDoubleSpinBox" name="param1SpinBox">
<property name="toolTip">
<string>Minimal required detection confidence</string>
</property>
<property name="statusTip">
<string>Minimal required detection confidence</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>Conf: </string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>100.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="param2SpinBox">
<property name="toolTip">
<string>Required number of detections</string>
</property>
<property name="statusTip">
<string>Required number of detections</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>#det: </string>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>2147483647.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCMissionDoWidget.h"
#include "ui_QGCMissionDoWidget.h"
QGCMissionDoWidget::QGCMissionDoWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCMissionDoWidget)
{
ui->setupUi(this);
}
QGCMissionDoWidget::~QGCMissionDoWidget()
{
delete ui;
}
#ifndef QGCMISSIONDOWIDGET_H
#define QGCMISSIONDOWIDGET_H
#include <QWidget>
namespace Ui
{
class QGCMissionDoWidget;
}
class QGCMissionDoWidget : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionDoWidget(QWidget *parent = 0);
~QGCMissionDoWidget();
private:
Ui::QGCMissionDoWidget *ui;
};
#endif // QGCMISSIONDOWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionDoWidget</class>
<widget class="QWidget" name="QGCMissionDoWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>632</width>
<height>40</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QSpinBox" name="doJumpIndexSpinBox">
<property name="geometry">
<rect>
<x>170</x>
<y>10</y>
<width>201</width>
<height>25</height>
</rect>
</property>
<property name="suffix">
<string/>
</property>
<property name="prefix">
<string>list index to jump to: </string>
</property>
<property name="maximum">
<number>5000</number>
</property>
</widget>
<widget class="QSpinBox" name="doJumpRepeatSpinBox">
<property name="geometry">
<rect>
<x>380</x>
<y>10</y>
<width>121</width>
<height>25</height>
</rect>
</property>
<property name="suffix">
<string> times</string>
</property>
<property name="prefix">
<string>repeat </string>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
<widget class="QComboBox" name="doSetModeComboBox">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>111</width>
<height>26</height>
</rect>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCMissionNavLand.h"
#include "ui_QGCMissionNavLand.h"
#include "WaypointEditableView.h"
QGCMissionNavLand::QGCMissionNavLand(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavLand)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
//connect(this->ui->holdTimeSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//connect(this->ui->acceptanceSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
//connect(this->ui->param3SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
connect(this->ui->yawSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->posNSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//NED
connect(this->ui->posESpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->posDSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
connect(this->ui->latSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//Global
connect(this->ui->lonSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->altSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(frameBroadcast(MAV_FRAME)),this,SLOT(updateFrame(MAV_FRAME)));
//connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->holdTimeSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->acceptanceSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->param3SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->yawSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->posNSpinBox,SLOT(setValue(double)));//NED
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->posESpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->posDSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->latSpinBox,SLOT(setValue(double)));//Global
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->lonSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->altSpinBox,SLOT(setValue(double)));
}
void QGCMissionNavLand::updateFrame(MAV_FRAME frame)
{
switch(frame)
{
case MAV_FRAME_LOCAL_ENU:
case MAV_FRAME_LOCAL_NED:
this->ui->posNSpinBox->show();
this->ui->posESpinBox->show();
this->ui->posDSpinBox->show();
this->ui->latSpinBox->hide();
this->ui->lonSpinBox->hide();
this->ui->altSpinBox->hide();
break;
case MAV_FRAME_GLOBAL:
case MAV_FRAME_GLOBAL_RELATIVE_ALT:
this->ui->posNSpinBox->hide();
this->ui->posESpinBox->hide();
this->ui->posDSpinBox->hide();
this->ui->latSpinBox->show();
this->ui->lonSpinBox->show();
this->ui->altSpinBox->show();
break;
default:
break;
}
}
QGCMissionNavLand::~QGCMissionNavLand()
{
delete ui;
}
#ifndef QGCMISSIONNAVLAND_H
#define QGCMISSIONNAVLAND_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionNavLand;
}
class QGCMissionNavLand : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionNavLand(WaypointEditableView* WEV);
~QGCMissionNavLand();
public slots:
void updateFrame(MAV_FRAME);
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionNavLand *ui;
};
#endif // QGCMISSIONNAVLAND_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionNavLand</class>
<widget class="QWidget" name="QGCMissionNavLand">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>2208</width>
<height>37</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QDoubleSpinBox" name="posNSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Position X coordinate</string>
</property>
<property name="statusTip">
<string>Position X corrdinate</string>
</property>
<property name="wrapping">
<bool>false</bool>
</property>
<property name="frame">
<bool>true</bool>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>N </string>
</property>
<property name="suffix">
<string> m</string>
</property>
<property name="minimum">
<double>-10000.000000000000000</double>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="posESpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Position Y/Longitude coordinate</string>
</property>
<property name="statusTip">
<string>Position Y/Longitude coordinate</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>E </string>
</property>
<property name="suffix">
<string> m</string>
</property>
<property name="minimum">
<double>-10000.000000000000000</double>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="posDSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Position Z coordinate (local frame, negative)</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>D </string>
</property>
<property name="suffix">
<string> m</string>
</property>
<property name="minimum">
<double>-10000.000000000000000</double>
</property>
<property name="maximum">
<double>10000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="latSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Latitude in degrees</string>
</property>
<property name="statusTip">
<string>Latitude in degrees</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>lat </string>
</property>
<property name="suffix">
<string>°</string>
</property>
<property name="decimals">
<number>7</number>
</property>
<property name="minimum">
<double>-90.000000000000000</double>
</property>
<property name="maximum">
<double>90.000000000000000</double>
</property>
<property name="singleStep">
<double>0.000010000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="lonSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="toolTip">
<string>Longitude in degrees</string>
</property>
<property name="statusTip">
<string>Longitude in degrees</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>lon </string>
</property>
<property name="suffix">
<string>°</string>
</property>
<property name="decimals">
<number>7</number>
</property>
<property name="minimum">
<double>-180.000000000000000</double>
</property>
<property name="maximum">
<double>180.000000000000000</double>
</property>
<property name="singleStep">
<double>0.000010000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="altSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Altitude in meters</string>
</property>
<property name="statusTip">
<string>Altitude in meters</string>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string>alt </string>
</property>
<property name="suffix">
<string>m</string>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="yawSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Rotary wing only: Desired yaw angle at waypoint</string>
</property>
<property name="statusTip">
<string>Rotary wing only: Desired yaw angle at waypoint</string>
</property>
<property name="wrapping">
<bool>true</bool>
</property>
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string>°</string>
</property>
<property name="decimals">
<number>0</number>
</property>
<property name="minimum">
<double>-180.000000000000000</double>
</property>
<property name="maximum">
<double>180.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCMissionNavLoiterTime.h"
#include "ui_QGCMissionNavLoiterTime.h"
#include "WaypointEditableView.h"
QGCMissionNavLoiterTime::QGCMissionNavLoiterTime(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavLoiterTime)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->timeSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//connect(this->ui->acceptanceSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
connect(this->ui->radSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
connect(this->ui->yawSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->posNSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//NED
connect(this->ui->posESpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->posDSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
connect(this->ui->latSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//Global
connect(this->ui->lonSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->altSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(frameBroadcast(MAV_FRAME)),this,SLOT(updateFrame(MAV_FRAME)));
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->timeSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->acceptanceSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->radSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->yawSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->posNSpinBox,SLOT(setValue(double)));//NED
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->posESpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->posDSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->latSpinBox,SLOT(setValue(double)));//Global
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->lonSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->altSpinBox,SLOT(setValue(double)));
}
void QGCMissionNavLoiterTime::updateFrame(MAV_FRAME frame)
{
switch(frame)
{
case MAV_FRAME_LOCAL_ENU:
case MAV_FRAME_LOCAL_NED:
this->ui->posNSpinBox->show();
this->ui->posESpinBox->show();
this->ui->posDSpinBox->show();
this->ui->latSpinBox->hide();
this->ui->lonSpinBox->hide();
this->ui->altSpinBox->hide();
break;
case MAV_FRAME_GLOBAL:
case MAV_FRAME_GLOBAL_RELATIVE_ALT:
this->ui->posNSpinBox->hide();
this->ui->posESpinBox->hide();
this->ui->posDSpinBox->hide();
this->ui->latSpinBox->show();
this->ui->lonSpinBox->show();
this->ui->altSpinBox->show();
break;
default:
break;
}
}
QGCMissionNavLoiterTime::~QGCMissionNavLoiterTime()
{
delete ui;
}
#ifndef QGCMISSIONNAVLOITERTIME_H
#define QGCMISSIONNAVLOITERTIME_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionNavLoiterTime;
}
class QGCMissionNavLoiterTime : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionNavLoiterTime(WaypointEditableView* WEV);
~QGCMissionNavLoiterTime();
public slots:
void updateFrame(MAV_FRAME);
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionNavLoiterTime *ui;
};
#endif // QGCMISSIONNAVLOITERTIME_H
This diff is collapsed.
#include "QGCMissionNavLoiterTurns.h"
#include "ui_QGCMissionNavLoiterTurns.h"
#include "WaypointEditableView.h"
QGCMissionNavLoiterTurns::QGCMissionNavLoiterTurns(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavLoiterTurns)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->turnsSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//connect(this->ui->acceptanceSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
connect(this->ui->radSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
connect(this->ui->yawSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->posNSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//NED
connect(this->ui->posESpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->posDSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
connect(this->ui->latSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//Global
connect(this->ui->lonSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->altSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(frameBroadcast(MAV_FRAME)),this,SLOT(updateFrame(MAV_FRAME)));
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->turnsSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->acceptanceSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->radSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->yawSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->posNSpinBox,SLOT(setValue(double)));//NED
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->posESpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->posDSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->latSpinBox,SLOT(setValue(double)));//Global
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->lonSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->altSpinBox,SLOT(setValue(double)));
}
void QGCMissionNavLoiterTurns::updateFrame(MAV_FRAME frame)
{
switch(frame)
{
case MAV_FRAME_LOCAL_ENU:
case MAV_FRAME_LOCAL_NED:
this->ui->posNSpinBox->show();
this->ui->posESpinBox->show();
this->ui->posDSpinBox->show();
this->ui->latSpinBox->hide();
this->ui->lonSpinBox->hide();
this->ui->altSpinBox->hide();
break;
case MAV_FRAME_GLOBAL:
case MAV_FRAME_GLOBAL_RELATIVE_ALT:
this->ui->posNSpinBox->hide();
this->ui->posESpinBox->hide();
this->ui->posDSpinBox->hide();
this->ui->latSpinBox->show();
this->ui->lonSpinBox->show();
this->ui->altSpinBox->show();
break;
default:
break;
}
}
QGCMissionNavLoiterTurns::~QGCMissionNavLoiterTurns()
{
delete ui;
}
#ifndef QGCMISSIONNAVLOITERTURNS_H
#define QGCMISSIONNAVLOITERTURNS_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionNavLoiterTurns;
}
class QGCMissionNavLoiterTurns : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionNavLoiterTurns(WaypointEditableView* WEV);
~QGCMissionNavLoiterTurns();
public slots:
void updateFrame(MAV_FRAME);
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionNavLoiterTurns *ui;
};
#endif // QGCMISSIONNAVLOITERTURNS_H
This diff is collapsed.
#include "QGCMissionNavLoiterUnlim.h"
#include "ui_QGCMissionNavLoiterUnlim.h"
#include "WaypointEditableView.h"
QGCMissionNavLoiterUnlim::QGCMissionNavLoiterUnlim(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavLoiterUnlim)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
//connect(this->ui->holdTimeSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//connect(this->ui->acceptanceSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
connect(this->ui->radSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
connect(this->ui->yawSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->posNSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//NED
connect(this->ui->posESpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->posDSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
connect(this->ui->latSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//Global
connect(this->ui->lonSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->altSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(frameBroadcast(MAV_FRAME)),this,SLOT(updateFrame(MAV_FRAME)));
//connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->holdTimeSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->acceptanceSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->radSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->yawSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->posNSpinBox,SLOT(setValue(double)));//NED
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->posESpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->posDSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->latSpinBox,SLOT(setValue(double)));//Global
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->lonSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->altSpinBox,SLOT(setValue(double)));
}
void QGCMissionNavLoiterUnlim::updateFrame(MAV_FRAME frame)
{
switch(frame)
{
case MAV_FRAME_LOCAL_ENU:
case MAV_FRAME_LOCAL_NED:
this->ui->posNSpinBox->show();
this->ui->posESpinBox->show();
this->ui->posDSpinBox->show();
this->ui->latSpinBox->hide();
this->ui->lonSpinBox->hide();
this->ui->altSpinBox->hide();
break;
case MAV_FRAME_GLOBAL:
case MAV_FRAME_GLOBAL_RELATIVE_ALT:
this->ui->posNSpinBox->hide();
this->ui->posESpinBox->hide();
this->ui->posDSpinBox->hide();
this->ui->latSpinBox->show();
this->ui->lonSpinBox->show();
this->ui->altSpinBox->show();
break;
default:
break;
}
}
QGCMissionNavLoiterUnlim::~QGCMissionNavLoiterUnlim()
{
delete ui;
}
#ifndef QGCMISSIONNAVLOITERUNLIM_H
#define QGCMISSIONNAVLOITERUNLIM_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionNavLoiterUnlim;
}
class QGCMissionNavLoiterUnlim : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionNavLoiterUnlim(WaypointEditableView* WEV);
~QGCMissionNavLoiterUnlim();
public slots:
void updateFrame(MAV_FRAME);
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionNavLoiterUnlim *ui;
};
#endif // QGCMISSIONNAVLOITERUNLIM_H
This diff is collapsed.
#include "QGCMissionNavReturnToLaunch.h"
#include "ui_QGCMissionNavReturnToLaunch.h"
#include "WaypointEditableView.h"
QGCMissionNavReturnToLaunch::QGCMissionNavReturnToLaunch(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavReturnToLaunch)
{
ui->setupUi(this);
this->WEV = WEV;
}
QGCMissionNavReturnToLaunch::~QGCMissionNavReturnToLaunch()
{
delete ui;
}
#ifndef QGCMISSIONNAVRETURNTOLAUNCH_H
#define QGCMISSIONNAVRETURNTOLAUNCH_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionNavReturnToLaunch;
}
class QGCMissionNavReturnToLaunch : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionNavReturnToLaunch(WaypointEditableView* WEV);
~QGCMissionNavReturnToLaunch();
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionNavReturnToLaunch *ui;
};
#endif // QGCMISSIONNAVRETURNTOLAUNCH_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCMissionNavReturnToLaunch</class>
<widget class="QWidget" name="QGCMissionNavReturnToLaunch">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>258</width>
<height>37</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="noParamLabel">
<property name="text">
<string>No Parameters</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCMissionNavSweep.h"
#include "ui_QGCMissionNavSweep.h"
#include "WaypointEditableView.h"
QGCMissionNavSweep::QGCMissionNavSweep(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavSweep)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->radSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//connect(this->ui->acceptanceSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
connect(this->ui->posN1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));//NED
connect(this->ui->posE1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->posN2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));
connect(this->ui->posE2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->posDSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
connect(this->ui->lat1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));//Global
connect(this->ui->lon1SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->lat2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));
connect(this->ui->lon2SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->altSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(frameBroadcast(MAV_FRAME)),this,SLOT(updateFrame(MAV_FRAME)));
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->radSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->acceptanceSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->posN1SpinBox,SLOT(setValue(double)));//NED
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->posE1SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->posN2SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->posE2SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->posDSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->lat1SpinBox,SLOT(setValue(double)));//Global
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->lon1SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->lat2SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->lon2SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->altSpinBox,SLOT(setValue(double)));
}
void QGCMissionNavSweep::updateFrame(MAV_FRAME frame)
{
switch(frame)
{
case MAV_FRAME_LOCAL_ENU:
case MAV_FRAME_LOCAL_NED:
this->ui->posN1SpinBox->show();
this->ui->posE1SpinBox->show();
this->ui->posN2SpinBox->show();
this->ui->posE2SpinBox->show();
this->ui->posDSpinBox->show();
this->ui->lat1SpinBox->hide();
this->ui->lon1SpinBox->hide();
this->ui->lat2SpinBox->hide();
this->ui->lon2SpinBox->hide();
this->ui->altSpinBox->hide();
break;
case MAV_FRAME_GLOBAL:
case MAV_FRAME_GLOBAL_RELATIVE_ALT:
this->ui->posN1SpinBox->hide();
this->ui->posE1SpinBox->hide();
this->ui->posN2SpinBox->hide();
this->ui->posE2SpinBox->hide();
this->ui->posDSpinBox->hide();
this->ui->lat1SpinBox->show();
this->ui->lon1SpinBox->show();
this->ui->lat2SpinBox->show();
this->ui->lon2SpinBox->show();
this->ui->altSpinBox->show();
break;
default:
break;
}
}
QGCMissionNavSweep::~QGCMissionNavSweep()
{
delete ui;
}
#ifndef QGCMISSIONNAVSWEEP_H
#define QGCMISSIONNAVSWEEP_H
#include <QWidget>
#include "WaypointEditableView.h"
namespace Ui {
class QGCMissionNavSweep;
}
class QGCMissionNavSweep : public QWidget
{
Q_OBJECT
public:
explicit QGCMissionNavSweep(WaypointEditableView* WEV);
~QGCMissionNavSweep();
public slots:
void updateFrame(MAV_FRAME);
protected:
WaypointEditableView* WEV;
private:
Ui::QGCMissionNavSweep *ui;
};
#endif // QGCMISSIONNAVSWEEP_H
This diff is collapsed.
#include "QGCMissionNavTakeoff.h"
#include "ui_QGCMissionNavTakeoff.h"
#include "WaypointEditableView.h"
QGCMissionNavTakeoff::QGCMissionNavTakeoff(WaypointEditableView* WEV) :
QWidget(WEV),
ui(new Ui::QGCMissionNavTakeoff)
{
ui->setupUi(this);
this->WEV = WEV;
//Using UI to change WP:
connect(this->ui->minPitchSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam1(double)));
//connect(this->ui->acceptanceSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam2(double)));
//connect(this->ui->param3SpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam3(double)));
connect(this->ui->yawSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam4(double)));
connect(this->ui->posNSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//NED
connect(this->ui->posESpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->posDSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
connect(this->ui->latSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam5(double)));//Global
connect(this->ui->lonSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam6(double)));
connect(this->ui->altSpinBox, SIGNAL(valueChanged(double)),WEV,SLOT(changedParam7(double)));
//Reading WP to update UI:
connect(WEV,SIGNAL(frameBroadcast(MAV_FRAME)),this,SLOT(updateFrame(MAV_FRAME)));
connect(WEV,SIGNAL(param1Broadcast(double)),this->ui->minPitchSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param2Broadcast(double)),this->ui->acceptanceSpinBox,SLOT(setValue(double)));
//connect(WEV,SIGNAL(param3Broadcast(double)),this->ui->param3SpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param4Broadcast(double)),this->ui->yawSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->posNSpinBox,SLOT(setValue(double)));//NED
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->posESpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->posDSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param5Broadcast(double)),this->ui->latSpinBox,SLOT(setValue(double)));//Global
connect(WEV,SIGNAL(param6Broadcast(double)),this->ui->lonSpinBox,SLOT(setValue(double)));
connect(WEV,SIGNAL(param7Broadcast(double)),this->ui->altSpinBox,SLOT(setValue(double)));
}
void QGCMissionNavTakeoff::updateFrame(MAV_FRAME frame)
{
switch(frame)
{
case MAV_FRAME_LOCAL_ENU:
case MAV_FRAME_LOCAL_NED:
this->ui->posNSpinBox->show();
this->ui->posESpinBox->show();
this->ui->posDSpinBox->show();
this->ui->latSpinBox->hide();
this->ui->lonSpinBox->hide();
this->ui->altSpinBox->hide();
break;
case MAV_FRAME_GLOBAL:
case MAV_FRAME_GLOBAL_RELATIVE_ALT:
this->ui->posNSpinBox->hide();
this->ui->posESpinBox->hide();
this->ui->posDSpinBox->hide();
this->ui->latSpinBox->show();
this->ui->lonSpinBox->show();
this->ui->altSpinBox->show();
break;
default:
break;
}
}
QGCMissionNavTakeoff::~QGCMissionNavTakeoff()
{
delete ui;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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