Commit 39fc764a authored by Lorenz Meier's avatar Lorenz Meier

Many minor improvements

parent c5599aa1
......@@ -235,7 +235,11 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCMAVLinkInspector.ui \
src/ui/WaypointViewOnlyView.ui \
src/ui/WaypointEditableView.ui \
src/ui/UnconnectedUASInfoWidget.ui
src/ui/UnconnectedUASInfoWidget.ui \
src/ui/mavlink/QGCMAVLinkMessageSender.ui \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.ui \
src/ui/QGCPluginHost.ui \
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
......@@ -353,7 +357,11 @@ HEADERS += src/MG.h \
src/ui/WaypointViewOnlyView.h \
src/ui/WaypointEditableView.h \
src/ui/UnconnectedUASInfoWidget.h \
src/ui/QGCRGBDView.h
src/ui/QGCRGBDView.h \
src/ui/mavlink/QGCMAVLinkMessageSender.h \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.h \
src/ui/QGCPluginHost.h \
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.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
......@@ -481,7 +489,11 @@ SOURCES += src/main.cc \
src/ui/WaypointViewOnlyView.cc \
src/ui/WaypointEditableView.cc \
src/ui/UnconnectedUASInfoWidget.cc \
src/ui/QGCRGBDView.cc
src/ui/QGCRGBDView.cc \
src/ui/mavlink/QGCMAVLinkMessageSender.cc \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.cc \
src/ui/QGCPluginHost.cc \
src/ui/firmwareupdate/QGCPX4FirmwareUpdate.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
......
This diff is collapsed.
......@@ -55,7 +55,6 @@ This file is part of the QGROUNDCONTROL project
#include "JoystickWidget.h"
#include "input/JoystickInput.h"
#include "DebugConsole.h"
//#include "MapWidget.h"
#include "ParameterInterface.h"
#include "XMLCommProtocolWidget.h"
#include "HDDisplay.h"
......@@ -80,6 +79,8 @@ This file is part of the QGROUNDCONTROL project
#include "MAVLinkDecoder.h"
class QGCMapTool;
class QGCMAVLinkMessageSender;
class QGCFirmwareUpdate;
class QSplashScreen;
/**
......@@ -154,6 +155,8 @@ public slots:
void loadOperatorView();
/** @brief Load MAVLink XML generator view */
void loadMAVLinkView();
/** @brief Load firmware update view */
void loadFirmwareUpdateView();
/** @brief Show the online help for users */
void showHelp();
......@@ -241,13 +244,11 @@ protected:
VIEW_OPERATOR,
VIEW_PILOT,
VIEW_MAVLINK,
VIEW_FIRMWAREUPDATE,
VIEW_UNCONNECTED, ///< View in unconnected mode, when no UAS is available
VIEW_FULL ///< All widgets shown at once
} VIEW_SECTIONS;
// QHash<int, QAction*> toolsMenuActions; // Holds ptr to the Menu Actions
// QHash<int, QWidget*> dockWidgets; // Holds ptr to the Actual Dock widget
/**
* @brief Adds an already instantiated QDockedWidget to the Tools Menu
*
......@@ -314,12 +315,10 @@ protected:
#ifdef QGC_OSG_ENABLED
QPointer<QWidget> _3DWidget;
#endif
#ifdef QGC_OSGEARTH_ENABLED
QPointer<QWidget> _3DMapWidget;
#endif
#if (defined _MSC_VER) || (defined Q_OS_MAC)
QPointer<QGCGoogleEarthView> gEarthWidget;
#endif
QPointer<QGCFirmwareUpdate> firmwareUpdateWidget;
// Dock widgets
QPointer<QDockWidget> controlDockWidget;
......@@ -353,6 +352,7 @@ protected:
QPointer<QDockWidget> mavlinkInspectorWidget;
QPointer<MAVLinkDecoder> mavlinkDecoder;
QPointer<QDockWidget> mavlinkSenderWidget;
QGCMAVLinkLogPlayer* logPlayer;
// Popup widgets
......
......@@ -51,7 +51,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>25</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuMGround">
......@@ -108,7 +108,7 @@
</widget>
<widget class="QMenu" name="menuTools">
<property name="title">
<string>Widgets</string>
<string>Tool Widgets</string>
</property>
<addaction name="actionNewCustomWidget"/>
<addaction name="actionLoadCustomWidgetFile"/>
......@@ -129,6 +129,7 @@
<addaction name="actionEngineersView"/>
<addaction name="actionPilotsView"/>
<addaction name="separator"/>
<addaction name="actionFirmwareUpdateView"/>
<addaction name="actionMavlinkView"/>
<addaction name="actionUnconnectedView"/>
<addaction name="separator"/>
......@@ -137,16 +138,22 @@
</widget>
<widget class="QMenu" name="menuMain">
<property name="title">
<string>Main</string>
<string>Main Widget</string>
</property>
</widget>
<widget class="QMenu" name="menuPlugins">
<property name="title">
<string>Plugins</string>
</property>
</widget>
<addaction name="menuMGround"/>
<addaction name="menuNetwork"/>
<addaction name="menuConnected_Systems"/>
<addaction name="menuUnmanned_System"/>
<addaction name="menuPerspectives"/>
<addaction name="menuMain"/>
<addaction name="menuTools"/>
<addaction name="menuPerspectives"/>
<addaction name="menuPlugins"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
......@@ -466,6 +473,18 @@
<string>Load Custom Widget File</string>
</property>
</action>
<action name="actionFirmwareUpdateView">
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/images/status/software-update-available.svg</normaloff>:/images/status/software-update-available.svg</iconset>
</property>
<property name="text">
<string>Firmware Update</string>
</property>
<property name="toolTip">
<string>Update the firmware of one of the connected autopilots</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
......
......@@ -6,13 +6,21 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>596</width>
<height>343</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QComboBox" name="autopilotComboBox"/>
</item>
<item row="1" column="0">
<widget class="QWidget" name="widget" native="true"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
......
#include "QGCPluginHost.h"
#include "ui_QGCPluginHost.h"
QGCPluginHost::QGCPluginHost(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCPluginHost)
{
ui->setupUi(this);
}
QGCPluginHost::~QGCPluginHost()
{
delete ui;
}
#ifndef QGCPLUGINHOST_H
#define QGCPLUGINHOST_H
#include <QWidget>
namespace Ui {
class QGCPluginHost;
}
class QGCPluginHost : public QWidget
{
Q_OBJECT
public:
explicit QGCPluginHost(QWidget *parent = 0);
~QGCPluginHost();
private:
Ui::QGCPluginHost *ui;
};
#endif // QGCPLUGINHOST_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCPluginHost</class>
<widget class="QWidget" name="QGCPluginHost">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>633</width>
<height>329</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QListWidget" name="pluginListWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>256</width>
<height>271</height>
</rect>
</property>
</widget>
<widget class="QTextEdit" name="pluginLog">
<property name="geometry">
<rect>
<x>280</x>
<y>30</y>
<width>341</width>
<height>271</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Loaded Plugins</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>280</x>
<y>10</y>
<width>91</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Plugin Log</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCFirmwareUpdateWidget.h"
#include "ui_QGCFirmwareUpdateWidget.h"
QGCFirmwareUpdateWidget::QGCFirmwareUpdateWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCFirmwareUpdateWidget)
{
ui->setupUi(this);
}
QGCFirmwareUpdateWidget::~QGCFirmwareUpdateWidget()
{
delete ui;
}
#ifndef QGCFIRMWAREUPDATEWIDGET_H
#define QGCFIRMWAREUPDATEWIDGET_H
#include <QWidget>
namespace Ui {
class QGCFirmwareUpdateWidget;
}
class QGCFirmwareUpdateWidget : public QWidget
{
Q_OBJECT
public:
explicit QGCFirmwareUpdateWidget(QWidget *parent = 0);
~QGCFirmwareUpdateWidget();
private:
Ui::QGCFirmwareUpdateWidget *ui;
};
#endif // QGCFIRMWAREUPDATEWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCFirmwareUpdateWidget</class>
<widget class="QWidget" name="QGCFirmwareUpdateWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>638</width>
<height>412</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>1) Select Autopilot</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QListWidget" name="autopilotListWidget"/>
</item>
<item row="1" column="2">
<widget class="QTextEdit" name="textEdit">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;Autopilot Selection&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Select one of the connected autopilots from the list on the left.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="3" rowspan="4" colspan="2">
<widget class="QTextEdit" name="firmwareInfo">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;AP Firmware v0.9.1&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;This software update...&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;FIXES:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;- Fix1&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;FEATURES:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;- New feature 1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>2) Select Software Version</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QListWidget" name="firmwareListWidget"/>
</item>
<item row="3" column="2" rowspan="2">
<widget class="QTextEdit" name="textEdit_2">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:large; font-weight:600;&quot;&gt;Software Version Selection&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Select the software version from the online repository on the left or choose the select file button to load a file from the harddisk. Detail information is shown on the right.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="selectFileButton">
<property name="text">
<string>Select File..</string>
</property>
</widget>
</item>
<item row="5" column="0" rowspan="2" colspan="5">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
</widget>
</item>
<item row="6" column="4" rowspan="2">
<widget class="QPushButton" name="flashFirmwareButton">
<property name="text">
<string>Flash Firmware</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Status</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#include "QGCPX4FirmwareUpdate.h"
#include "ui_QGCPX4FirmwareUpdate.h"
QGCPX4FirmwareUpdate::QGCPX4FirmwareUpdate(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCPX4FirmwareUpdate)
{
ui->setupUi(this);
}
QGCPX4FirmwareUpdate::~QGCPX4FirmwareUpdate()
{
delete ui;
}
#ifndef QGCPX4FIRMWAREUPDATE_H
#define QGCPX4FIRMWAREUPDATE_H
#include <QWidget>
namespace Ui {
class QGCPX4FirmwareUpdate;
}
class QGCPX4FirmwareUpdate : public QWidget
{
Q_OBJECT
public:
explicit QGCPX4FirmwareUpdate(QWidget *parent = 0);
~QGCPX4FirmwareUpdate();
private:
Ui::QGCPX4FirmwareUpdate *ui;
};
#endif // QGCPX4FIRMWAREUPDATE_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCPX4FirmwareUpdate</class>
<widget class="QWidget" name="QGCPX4FirmwareUpdate">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="4">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>2</number>
</property>
<widget class="QWidget" name="firmwareSelectTab">
<attribute name="title">
<string>Firmware</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QListWidget" name="fileList"/>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="fileLineEdit"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="selectFileButton">
<property name="text">
<string>Select File</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="settingsBackupTab">
<attribute name="title">
<string>Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="settingsStoreButton">
<property name="text">
<string>Select File</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="flashTab">
<attribute name="title">
<string>Flash Firmware</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="fileLabel">
<property name="text">
<string>Filename</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="statusLabel">
<property name="text">
<string>Status</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="flashButton">
<property name="text">
<string>Flash Firmware</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Prev</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Next</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="pushButton_3">
<property name="text">
<string>Flash</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -35,8 +35,8 @@ LinechartPlot::LinechartPlot(QWidget *parent, int plotid, quint64 interval): Qwt
minTime(0),
lastTime(0),
maxTime(100),
plotPosition(0),
maxInterval(MAX_STORAGE_INTERVAL),
plotPosition(0),
timeScaleStep(DEFAULT_SCALE_INTERVAL), // 10 seconds
automaticScrollActive(false),
m_active(false),
......
......@@ -298,8 +298,8 @@ protected:
// TODO CHECK THIS!!!
int scaling;
QwtScaleEngine* yScaleEngine;
quint64 lastTime; ///< Last added timestamp
quint64 minTime; ///< The smallest timestamp occured so far
quint64 lastTime; ///< Last added timestamp
quint64 maxTime; ///< The biggest timestamp occured so far
quint64 maxInterval;
quint64 storageInterval;
......
......@@ -663,15 +663,19 @@ void
Pixhawk3DWidget::getPosition(double& x, double& y, double& z,
QString& utmZone)
{
if (uas) {
if (frame == MAV_FRAME_GLOBAL) {
if (uas)
{
if (frame == MAV_FRAME_GLOBAL)
{
double latitude = uas->getLatitude();
double longitude = uas->getLongitude();
double altitude = uas->getAltitude();
Imagery::LLtoUTM(latitude, longitude, x, y, utmZone);
z = -altitude;
} else if (frame == MAV_FRAME_LOCAL_NED) {
}
else if (frame == MAV_FRAME_LOCAL_NED)
{
x = uas->getLocalX();
y = uas->getLocalY();
z = uas->getLocalZ();
......@@ -881,7 +885,8 @@ Pixhawk3DWidget::resizeHUD(void)
int bottomHUDHeight = 25;
osg::Vec3Array* vertices = static_cast<osg::Vec3Array*>(hudBackgroundGeometry->getVertexArray());
if (vertices == NULL || vertices->size() != 8) {
if (vertices == NULL || vertices->size() != 8)
{
osg::ref_ptr<osg::Vec3Array> newVertices = new osg::Vec3Array(8);
hudBackgroundGeometry->setVertexArray(newVertices);
......@@ -899,7 +904,8 @@ Pixhawk3DWidget::resizeHUD(void)
statusText->setPosition(osg::Vec3(10, height() - 15, -1.5));
if (rgb2DGeode.valid() && depth2DGeode.valid()) {
if (rgb2DGeode.valid() && depth2DGeode.valid())
{
int windowWidth = (width() - 20) / 2;
int windowHeight = 3 * windowWidth / 4;
rgb2DGeode->setAttributes(10, (height() - windowHeight) / 2,
......@@ -922,7 +928,8 @@ Pixhawk3DWidget::updateHUD(double robotX, double robotY, double robotZ,
std::ostringstream oss;
oss.setf(std::ios::fixed, std::ios::floatfield);
oss.precision(2);
if (frame == MAV_FRAME_GLOBAL) {
if (frame == MAV_FRAME_GLOBAL)
{
double latitude, longitude;
Imagery::UTMtoLL(robotX, robotY, utmZone, latitude, longitude);
......@@ -943,7 +950,9 @@ Pixhawk3DWidget::updateHUD(double robotX, double robotY, double robotZ,
oss.precision(6);
oss << " Cursor [" << cursorLatitude <<
" " << cursorLongitude << "]";
} else if (frame == MAV_FRAME_LOCAL_NED) {
}
else if (frame == MAV_FRAME_LOCAL_NED)