Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
cb41567d
Commit
cb41567d
authored
Dec 03, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mobile Tweaks
parent
f29410b7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
70 additions
and
30 deletions
+70
-30
qgroundcontrol.pro
qgroundcontrol.pro
+8
-8
LinkConfiguration.cc
src/comm/LinkConfiguration.cc
+6
-0
LinkConfiguration.h
src/comm/LinkConfiguration.h
+4
-0
LinkManager.cc
src/comm/LinkManager.cc
+18
-4
LinkManager.h
src/comm/LinkManager.h
+2
-0
MainWindow.cc
src/ui/MainWindow.cc
+2
-0
MainWindow.h
src/ui/MainWindow.h
+6
-2
MainWindow.qml
src/ui/MainWindow.qml
+1
-1
MainWindowLeftPanel.qml
src/ui/MainWindowLeftPanel.qml
+5
-5
QGCCommConfiguration.cc
src/ui/QGCCommConfiguration.cc
+11
-5
QGCLinkConfiguration.cc
src/ui/QGCLinkConfiguration.cc
+6
-4
LinkSettings.qml
src/ui/preferences/LinkSettings.qml
+1
-1
No files found.
qgroundcontrol.pro
View file @
cb41567d
...
...
@@ -186,14 +186,12 @@ INCLUDEPATH += \
FORMS
+=
\
src
/
QGCQmlWidgetHolder
.
ui
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
ui
\
src
/
ui
/
MainWindow
.
ui
\
src
/
ui
/
MAVLinkSettingsWidget
.
ui
\
src
/
ui
/
MockLinkConfiguration
.
ui
\
src
/
ui
/
QGCCommConfiguration
.
ui
\
src
/
ui
/
QGCLinkConfiguration
.
ui
\
src
/
ui
/
QGCMapRCToParamDialog
.
ui
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
ui
\
src
/
ui
/
QGCPluginHost
.
ui
\
src
/
ui
/
QGCTCPLinkConfiguration
.
ui
\
src
/
ui
/
QGCUDPLinkConfiguration
.
ui
\
...
...
@@ -208,6 +206,8 @@ FORMS += \
!
MobileBuild
{
FORMS
+=
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
ui
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
ui
\
src
/
ui
/
Linechart
.
ui
\
src
/
ui
/
MultiVehicleDockWidget
.
ui
\
src
/
ui
/
QGCDataPlot2D
.
ui
\
...
...
@@ -230,7 +230,6 @@ HEADERS += \
src
/
comm
/
LinkConfiguration
.
h
\
src
/
comm
/
LinkInterface
.
h
\
src
/
comm
/
LinkManager
.
h
\
src
/
comm
/
LogReplayLink
.
h
\
src
/
comm
/
MAVLinkProtocol
.
h
\
src
/
comm
/
MockLink
.
h
\
src
/
comm
/
MockLinkFileServer
.
h
\
...
...
@@ -276,7 +275,6 @@ HEADERS += \
src
/
uas
/
UAS
.
h
\
src
/
uas
/
UASInterface
.
h
\
src
/
uas
/
UASMessageHandler
.
h
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
h
\
src
/
ui
/
MainWindow
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
MAVLinkSettingsWidget
.
h
\
...
...
@@ -284,7 +282,6 @@ HEADERS += \
src
/
ui
/
QGCCommConfiguration
.
h
\
src
/
ui
/
QGCLinkConfiguration
.
h
\
src
/
ui
/
QGCMapRCToParamDialog
.
h
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
h
\
src
/
ui
/
QGCPluginHost
.
h
\
src
/
ui
/
QGCTCPLinkConfiguration
.
h
\
src
/
ui
/
QGCUDPLinkConfiguration
.
h
\
...
...
@@ -309,6 +306,9 @@ HEADERS += \
!
MobileBuild
{
HEADERS
+=
\
src
/
comm
/
LogReplayLink
.
h
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
h
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
h
\
src
/
comm
/
QGCFlightGearLink
.
h
\
src
/
comm
/
QGCHilLink
.
h
\
src
/
comm
/
QGCJSBSimLink
.
h
\
...
...
@@ -348,7 +348,6 @@ SOURCES += \
src
/
CmdLineOptParser
.
cc
\
src
/
comm
/
LinkConfiguration
.
cc
\
src
/
comm
/
LinkManager
.
cc
\
src
/
comm
/
LogReplayLink
.
cc
\
src
/
comm
/
MAVLinkProtocol
.
cc
\
src
/
comm
/
MockLink
.
cc
\
src
/
comm
/
MockLinkFileServer
.
cc
\
...
...
@@ -388,7 +387,6 @@ SOURCES += \
src
/
uas
/
FileManager
.
cc
\
src
/
uas
/
UAS
.
cc
\
src
/
uas
/
UASMessageHandler
.
cc
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
cc
\
src
/
ui
/
MainWindow
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
MAVLinkSettingsWidget
.
cc
\
...
...
@@ -396,7 +394,6 @@ SOURCES += \
src
/
ui
/
QGCCommConfiguration
.
cc
\
src
/
ui
/
QGCLinkConfiguration
.
cc
\
src
/
ui
/
QGCMapRCToParamDialog
.
cpp
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
cc
\
src
/
ui
/
QGCPluginHost
.
cc
\
src
/
ui
/
QGCTCPLinkConfiguration
.
cc
\
src
/
ui
/
QGCUDPLinkConfiguration
.
cc
\
...
...
@@ -416,6 +413,9 @@ SOURCES += \
!
MobileBuild
{
SOURCES
+=
\
src
/
comm
/
LogReplayLink
.
cc
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
cc
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
cc
\
src
/
comm
/
QGCFlightGearLink
.
cc
\
src
/
comm
/
QGCJSBSimLink
.
cc
\
src
/
comm
/
QGCXPlaneLink
.
cc
\
...
...
src/comm/LinkConfiguration.cc
View file @
cb41567d
...
...
@@ -33,7 +33,9 @@ This file is part of the QGROUNDCONTROL project
#endif
#include "UDPLink.h"
#include "TCPLink.h"
#ifndef __mobile__
#include "LogReplayLink.h"
#endif
#ifdef QT_DEBUG
#include "MockLink.h"
...
...
@@ -99,9 +101,11 @@ LinkConfiguration* LinkConfiguration::createSettings(int type, const QString& na
case
LinkConfiguration
:
:
TypeTcp
:
config
=
new
TCPConfiguration
(
name
);
break
;
#ifndef __mobile__
case
LinkConfiguration
:
:
TypeLogReplay
:
config
=
new
LogReplayLinkConfiguration
(
name
);
break
;
#endif
#ifdef QT_DEBUG
case
LinkConfiguration
:
:
TypeMock
:
config
=
new
MockConfiguration
(
name
);
...
...
@@ -130,9 +134,11 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc
case
TypeTcp
:
dupe
=
new
TCPConfiguration
(
dynamic_cast
<
TCPConfiguration
*>
(
source
));
break
;
#ifndef __mobile__
case
TypeLogReplay
:
dupe
=
new
LogReplayLinkConfiguration
(
dynamic_cast
<
LogReplayLinkConfiguration
*>
(
source
));
break
;
#endif
#ifdef QT_DEBUG
case
TypeMock
:
dupe
=
new
MockConfiguration
(
dynamic_cast
<
MockConfiguration
*>
(
source
));
...
...
src/comm/LinkConfiguration.h
View file @
cb41567d
...
...
@@ -69,8 +69,12 @@ public:
TypeXbee, ///< XBee Proprietary Link
TypeOpal, ///< Opal-RT Link
#endif
#ifdef QT_DEBUG
TypeMock
,
///< Mock Link for Unitesting
#endif
#ifndef __mobile__
TypeLogReplay
,
#endif
TypeLast
// Last type value (type >= TypeLast == invalid)
};
...
...
src/comm/LinkManager.cc
View file @
cb41567d
...
...
@@ -124,9 +124,11 @@ LinkInterface* LinkManager::createConnectedLink(LinkConfiguration* config)
case
LinkConfiguration
:
:
TypeTcp
:
pLink
=
new
TCPLink
(
dynamic_cast
<
TCPConfiguration
*>
(
config
));
break
;
#ifndef __mobile__
case
LinkConfiguration
:
:
TypeLogReplay
:
pLink
=
new
LogReplayLink
(
dynamic_cast
<
LogReplayLinkConfiguration
*>
(
config
));
break
;
#endif
#ifdef QT_DEBUG
case
LinkConfiguration
:
:
TypeMock
:
pLink
=
new
MockLink
(
dynamic_cast
<
MockConfiguration
*>
(
config
));
...
...
@@ -357,9 +359,11 @@ void LinkManager::loadLinkConfigurationList()
case
LinkConfiguration
:
:
TypeTcp
:
pLink
=
(
LinkConfiguration
*
)
new
TCPConfiguration
(
name
);
break
;
#ifndef __mobile__
case
LinkConfiguration
:
:
TypeLogReplay
:
pLink
=
(
LinkConfiguration
*
)
new
LogReplayLinkConfiguration
(
name
);
break
;
#endif
#ifdef QT_DEBUG
case
LinkConfiguration
:
:
TypeMock
:
pLink
=
(
LinkConfiguration
*
)
new
MockConfiguration
(
name
);
...
...
@@ -697,8 +701,12 @@ QStringList LinkManager::linkTypeStrings(void) const
#endif
list
+=
"UDP"
;
list
+=
"TCP"
;
#ifdef QT_DEBUG
list
+=
"Mock Link"
;
#endif
#ifndef __mobile__
list
+=
"Log Replay"
;
#endif
}
return
list
;
}
...
...
@@ -771,16 +779,20 @@ bool LinkManager::endCreateConfiguration(LinkConfiguration* config)
LinkConfiguration
*
LinkManager
::
createConfiguration
(
int
type
,
const
QString
&
name
)
{
#ifndef __ios__
if
((
LinkConfiguration
::
LinkType
)
type
==
LinkConfiguration
::
TypeSerial
)
_updateSerialPorts
();
#endif
return
LinkConfiguration
::
createSettings
(
type
,
name
);
}
LinkConfiguration
*
LinkManager
::
startConfigurationEditing
(
LinkConfiguration
*
config
)
{
Q_ASSERT
(
config
!=
NULL
);
#ifndef __ios__
if
(
config
->
type
()
==
LinkConfiguration
::
TypeSerial
)
_updateSerialPorts
();
#endif
return
LinkConfiguration
::
duplicateSettings
(
config
);
}
...
...
@@ -816,13 +828,15 @@ void LinkManager::_fixUnnamed(LinkConfiguration* config)
}
}
break
;
#ifndef __mobile__
case
LinkConfiguration
:
:
TypeLogReplay
:
{
LogReplayLinkConfiguration
*
tconfig
=
dynamic_cast
<
LogReplayLinkConfiguration
*>
(
config
);
if
(
tconfig
)
{
config
->
setName
(
QString
(
"Log Replay %1"
).
arg
(
tconfig
->
logFilenameShort
()));
LogReplayLinkConfiguration
*
tconfig
=
dynamic_cast
<
LogReplayLinkConfiguration
*>
(
config
);
if
(
tconfig
)
{
config
->
setName
(
QString
(
"Log Replay %1"
).
arg
(
tconfig
->
logFilenameShort
()));
}
}
}
break
;
#endif
#ifdef QT_DEBUG
case
LinkConfiguration
:
:
TypeMock
:
config
->
setName
(
...
...
src/comm/LinkManager.h
View file @
cb41567d
...
...
@@ -37,7 +37,9 @@ This file is part of the PIXHAWK project
#include "QGCToolbox.h"
#include "ProtocolInterface.h"
#include "MAVLinkProtocol.h"
#ifndef __mobile__
#include "LogReplayLink.h"
#endif
#include "QmlObjectListModel.h"
#ifndef __ios__
...
...
src/ui/MainWindow.cc
View file @
cb41567d
...
...
@@ -43,7 +43,9 @@ This file is part of the QGROUNDCONTROL project
#include "MAVLinkProtocol.h"
#include "MainWindow.h"
#include "GAudioOutput.h"
#ifndef __mobile__
#include "QGCMAVLinkLogPlayer.h"
#endif
#include "SettingsDialog.h"
#include "MAVLinkDecoder.h"
#include "QGCApplication.h"
...
...
src/ui/MainWindow.h
View file @
cb41567d
...
...
@@ -42,7 +42,9 @@ This file is part of the QGROUNDCONTROL project
#include "UASInterface.h"
#include "LogCompressor.h"
#include "QGCMAVLinkInspector.h"
#ifndef __mobile__
#include "QGCMAVLinkLogPlayer.h"
#endif
#include "MAVLinkDecoder.h"
#include "Vehicle.h"
#include "QGCDockWidget.h"
...
...
@@ -157,11 +159,12 @@ signals:
#endif //QGC_MOUSE_ENABLED_LINUX
public:
#ifndef __mobile__
QGCMAVLinkLogPlayer
*
getLogPlayer
()
{
return
logPlayer
;
}
#endif
protected:
void
connectCommonActions
();
...
...
@@ -171,8 +174,9 @@ protected:
QSettings
settings
;
QPointer
<
MAVLinkDecoder
>
mavlinkDecoder
;
#ifndef __mobile__
QGCMAVLinkLogPlayer
*
logPlayer
;
#endif
#ifdef QGC_MOUSE_ENABLED_WIN
/** @brief 3d Mouse support (WIN only) */
Mouse3DInput
*
mouseInput
;
///< 3dConnexion 3dMouse SDK
...
...
src/ui/MainWindow.qml
View file @
cb41567d
...
...
@@ -44,7 +44,7 @@ Item {
property
real
tbHeight
:
ScreenTools
.
isMobile
?
(
ScreenTools
.
isTinyScreen
?
(
mainWindow
.
width
*
0.0666
)
:
(
mainWindow
.
width
*
0.05
))
:
ScreenTools
.
defaultFontPixelSize
*
4
property
int
tbCellHeight
:
tbHeight
*
0.75
property
real
tbSpacing
:
ScreenTools
.
isMobile
?
width
*
0.00824
:
9.54
property
real
tbButtonWidth
:
tbCellHeight
*
1.3
property
real
tbButtonWidth
:
tbCellHeight
*
1.3
5
property
real
availableHeight
:
height
-
tbHeight
property
real
menuButtonWidth
:
(
tbButtonWidth
*
2
)
+
(
tbSpacing
*
4
)
+
1
...
...
src/ui/MainWindowLeftPanel.qml
View file @
cb41567d
...
...
@@ -149,7 +149,7 @@ Item {
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
QGCButton
{
width
:
parent
.
width
*
0.8
width
:
parent
.
width
*
0.8
5
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
text
:
"
General
"
exclusiveGroup
:
panelActionGroup
...
...
@@ -162,7 +162,7 @@ Item {
}
}
QGCButton
{
width
:
parent
.
width
*
0.8
width
:
parent
.
width
*
0.8
5
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
text
:
"
Comm Links
"
exclusiveGroup
:
panelActionGroup
...
...
@@ -175,7 +175,7 @@ Item {
}
}
QGCButton
{
width
:
parent
.
width
*
0.8
width
:
parent
.
width
*
0.8
5
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
text
:
"
MavLink
"
exclusiveGroup
:
panelActionGroup
...
...
@@ -188,7 +188,7 @@ Item {
}
}
QGCButton
{
width
:
parent
.
width
*
0.8
width
:
parent
.
width
*
0.8
5
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
text
:
"
Mock Link
"
visible
:
ScreenTools
.
isDebug
...
...
@@ -202,7 +202,7 @@ Item {
}
}
QGCButton
{
width
:
parent
.
width
*
0.8
width
:
parent
.
width
*
0.8
5
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.5
text
:
"
Debug
"
visible
:
ScreenTools
.
isDebug
...
...
src/ui/QGCCommConfiguration.cc
View file @
cb41567d
...
...
@@ -37,7 +37,9 @@ This file is part of the QGROUNDCONTROL project
#include "QGCUDPLinkConfiguration.h"
#include "QGCTCPLinkConfiguration.h"
#include "MockLinkConfiguration.h"
#ifndef __mobile__
#include "LogReplayLinkConfigurationWidget.h"
#endif
#include "QGCCommConfiguration.h"
#include "ui_QGCCommConfiguration.h"
...
...
@@ -54,7 +56,9 @@ QGCCommConfiguration::QGCCommConfiguration(QWidget *parent, LinkConfiguration *c
#endif
_ui
->
typeCombo
->
addItem
(
tr
(
"UDP"
),
LinkConfiguration
::
TypeUdp
);
_ui
->
typeCombo
->
addItem
(
tr
(
"TCP"
),
LinkConfiguration
::
TypeTcp
);
#ifndef __mobile__
_ui
->
typeCombo
->
addItem
(
tr
(
"Log replay"
),
LinkConfiguration
::
TypeLogReplay
);
#endif
#ifdef QT_DEBUG
_ui
->
typeCombo
->
addItem
(
tr
(
"Mock"
),
LinkConfiguration
::
TypeMock
);
#endif
...
...
@@ -143,13 +147,15 @@ void QGCCommConfiguration::_loadTypeConfigWidget(int type)
_ui
->
typeCombo
->
setCurrentIndex
(
_ui
->
typeCombo
->
findData
(
LinkConfiguration
::
TypeTcp
));
}
break
;
#ifndef __mobile__
case
LinkConfiguration
:
:
TypeLogReplay
:
{
QWidget
*
conf
=
new
LogReplayLinkConfigurationWidget
((
LogReplayLinkConfiguration
*
)
_config
,
this
);
_ui
->
linkScrollArea
->
setWidget
(
conf
);
_ui
->
linkGroupBox
->
setTitle
(
"Log Replay"
);
_ui
->
typeCombo
->
setCurrentIndex
(
_ui
->
typeCombo
->
findData
(
LinkConfiguration
::
TypeLogReplay
));
}
QWidget
*
conf
=
new
LogReplayLinkConfigurationWidget
((
LogReplayLinkConfiguration
*
)
_config
,
this
);
_ui
->
linkScrollArea
->
setWidget
(
conf
);
_ui
->
linkGroupBox
->
setTitle
(
"Log Replay"
);
_ui
->
typeCombo
->
setCurrentIndex
(
_ui
->
typeCombo
->
findData
(
LinkConfiguration
::
TypeLogReplay
));
}
break
;
#endif
#ifdef QT_DEBUG
case
LinkConfiguration
:
:
TypeMock
:
{
QWidget
*
conf
=
new
MockLinkConfiguration
((
MockConfiguration
*
)
_config
,
this
);
...
...
src/ui/QGCLinkConfiguration.cc
View file @
cb41567d
...
...
@@ -165,13 +165,15 @@ void QGCLinkConfiguration::_fixUnnamed(LinkConfiguration* config)
}
}
break
;
#ifndef __mobile__
case
LinkConfiguration
:
:
TypeLogReplay
:
{
LogReplayLinkConfiguration
*
tconfig
=
dynamic_cast
<
LogReplayLinkConfiguration
*>
(
config
);
if
(
tconfig
)
{
config
->
setName
(
QString
(
"Log Replay %1"
).
arg
(
tconfig
->
logFilenameShort
()));
LogReplayLinkConfiguration
*
tconfig
=
dynamic_cast
<
LogReplayLinkConfiguration
*>
(
config
);
if
(
tconfig
)
{
config
->
setName
(
QString
(
"Log Replay %1"
).
arg
(
tconfig
->
logFilenameShort
()));
}
}
}
break
;
#endif
#ifdef QT_DEBUG
case
LinkConfiguration
:
:
TypeMock
:
config
->
setName
(
...
...
src/ui/preferences/LinkSettings.qml
View file @
cb41567d
...
...
@@ -333,7 +333,7 @@ Rectangle {
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.bottom
:
parent
.
bottom
anchors.
horizontalCenter
:
parent
.
horizontalCenter
anchors.
right
:
parent
.
right
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
10
text
:
"
OK
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment