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
6a1fe19d
Commit
6a1fe19d
authored
Dec 09, 2015
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing old comm link settings.
parent
90222306
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
42 additions
and
1937 deletions
+42
-1937
qgroundcontrol.pro
qgroundcontrol.pro
+0
-22
QGroundControlQmlGlobal.cc
src/QmlControls/QGroundControlQmlGlobal.cc
+6
-0
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+12
-4
LogReplayLinkConfigurationWidget.cc
src/ui/LogReplayLinkConfigurationWidget.cc
+0
-53
LogReplayLinkConfigurationWidget.h
src/ui/LogReplayLinkConfigurationWidget.h
+0
-48
LogReplayLinkConfigurationWidget.ui
src/ui/LogReplayLinkConfigurationWidget.ui
+0
-142
MainWindow.cc
src/ui/MainWindow.cc
+0
-10
MainWindow.h
src/ui/MainWindow.h
+0
-1
MainWindow.ui
src/ui/MainWindow.ui
+0
-1
MockLinkConfiguration.cc
src/ui/MockLinkConfiguration.cc
+0
-109
MockLinkConfiguration.h
src/ui/MockLinkConfiguration.h
+0
-56
MockLinkConfiguration.ui
src/ui/MockLinkConfiguration.ui
+0
-72
QGCCommConfiguration.cc
src/ui/QGCCommConfiguration.cc
+0
-215
QGCCommConfiguration.h
src/ui/QGCCommConfiguration.h
+0
-85
QGCCommConfiguration.ui
src/ui/QGCCommConfiguration.ui
+0
-139
QGCLinkConfiguration.cc
src/ui/QGCLinkConfiguration.cc
+0
-293
QGCLinkConfiguration.h
src/ui/QGCLinkConfiguration.h
+0
-80
QGCLinkConfiguration.ui
src/ui/QGCLinkConfiguration.ui
+0
-67
QGCTCPLinkConfiguration.cc
src/ui/QGCTCPLinkConfiguration.cc
+0
-74
QGCTCPLinkConfiguration.h
src/ui/QGCTCPLinkConfiguration.h
+0
-61
QGCTCPLinkConfiguration.ui
src/ui/QGCTCPLinkConfiguration.ui
+0
-61
QGCUDPLinkConfiguration.cc
src/ui/QGCUDPLinkConfiguration.cc
+0
-157
QGCUDPLinkConfiguration.h
src/ui/QGCUDPLinkConfiguration.h
+0
-83
QGCUDPLinkConfiguration.ui
src/ui/QGCUDPLinkConfiguration.ui
+0
-90
SettingsDialog.cc
src/ui/SettingsDialog.cc
+3
-12
SettingsDialog.h
src/ui/SettingsDialog.h
+0
-1
BluetoothSettings.qml
src/ui/preferences/BluetoothSettings.qml
+1
-0
LinkSettings.qml
src/ui/preferences/LinkSettings.qml
+1
-1
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+19
-0
No files found.
qgroundcontrol.pro
View file @
6a1fe19d
...
...
@@ -193,11 +193,6 @@ FORMS += \
src
/
ui
/
MainWindow
.
ui
\
src
/
QGCQmlWidgetHolder
.
ui
\
DebugBuild
{
FORMS
+=
\
src
/
ui
/
MockLinkConfiguration
.
ui
\
}
!
iOSBuild
{
FORMS
+=
\
src
/
ui
/
SerialSettings
.
ui
\
...
...
@@ -208,21 +203,16 @@ FORMS += \
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
ui
\
src
/
ui
/
uas
/
UASMessageView
.
ui
\
src
/
ui
/
Linechart
.
ui
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
ui
\
src
/
ui
/
MultiVehicleDockWidget
.
ui
\
src
/
ui
/
MAVLinkSettingsWidget
.
ui
\
src
/
ui
/
QGCCommConfiguration
.
ui
\
src
/
ui
/
QGCDataPlot2D
.
ui
\
src
/
ui
/
QGCHilConfiguration
.
ui
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
ui
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
ui
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
ui
\
src
/
ui
/
QGCLinkConfiguration
.
ui
\
src
/
ui
/
QGCMapRCToParamDialog
.
ui
\
src
/
ui
/
QGCMAVLinkInspector
.
ui
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
ui
\
src
/
ui
/
QGCTCPLinkConfiguration
.
ui
\
src
/
ui
/
QGCUDPLinkConfiguration
.
ui
\
src
/
ui
/
QGCTabbedInfoView
.
ui
\
src
/
ui
/
QGCUASFileView
.
ui
\
src
/
ui
/
QGCUASFileViewMulti
.
ui
\
...
...
@@ -287,7 +277,6 @@ HEADERS += \
src
/
comm
/
MockLink
.
h
\
src
/
comm
/
MockLinkFileServer
.
h
\
src
/
comm
/
MockLinkMissionItemHandler
.
h
\
src
/
ui
/
MockLinkConfiguration
.
h
\
}
WindowsBuild
{
...
...
@@ -325,17 +314,12 @@ HEADERS += \
src
/
ui
/
linechart
/
LinechartWidget
.
h
\
src
/
ui
/
linechart
/
Scrollbar
.
h
\
src
/
ui
/
linechart
/
ScrollZoomer
.
h
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
h
\
src
/
ui
/
MainWindow
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
MAVLinkSettingsWidget
.
h
\
src
/
ui
/
MultiVehicleDockWidget
.
h
\
src
/
ui
/
QGCCommConfiguration
.
h
\
src
/
ui
/
QGCLinkConfiguration
.
h
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
h
\
src
/
ui
/
QGCMapRCToParamDialog
.
h
\
src
/
ui
/
QGCTCPLinkConfiguration
.
h
\
src
/
ui
/
QGCUDPLinkConfiguration
.
h
\
src
/
ui
/
SettingsDialog
.
h
\
src
/
ui
/
uas
/
UASMessageView
.
h
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
h
\
...
...
@@ -409,7 +393,6 @@ SOURCES += \
src
/
comm
/
MockLink
.
cc
\
src
/
comm
/
MockLinkFileServer
.
cc
\
src
/
comm
/
MockLinkMissionItemHandler
.
cc
\
src
/
ui
/
MockLinkConfiguration
.
cc
\
}
!
iOSBuild
{
...
...
@@ -430,16 +413,11 @@ SOURCES += \
src
/
uas
/
FileManager
.
cc
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
cc
\
src
/
ui
/
SettingsDialog
.
cc
\
src
/
ui
/
QGCTCPLinkConfiguration
.
cc
\
src
/
ui
/
QGCUDPLinkConfiguration
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
MAVLinkSettingsWidget
.
cc
\
src
/
ui
/
QGCCommConfiguration
.
cc
\
src
/
ui
/
QGCLinkConfiguration
.
cc
\
src
/
ui
/
QGCMapRCToParamDialog
.
cpp
\
src
/
comm
/
LogReplayLink
.
cc
\
src
/
QGCFileDialog
.
cc
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
cc
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
cc
\
src
/
comm
/
QGCFlightGearLink
.
cc
\
src
/
comm
/
QGCJSBSimLink
.
cc
\
...
...
src/QmlControls/QGroundControlQmlGlobal.cc
View file @
6a1fe19d
...
...
@@ -168,6 +168,12 @@ void QGroundControlQmlGlobal::setIsVersionCheckEnabled(bool enable)
emit
isVersionCheckEnabledChanged
(
enable
);
}
void
QGroundControlQmlGlobal
::
setMavlinkSystemID
(
int
id
)
{
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
()
->
setSystemId
(
id
);
emit
mavlinkSystemIDChanged
(
id
);
}
void
QGroundControlQmlGlobal
::
setVirtualTabletJoystick
(
bool
enabled
)
{
if
(
_virtualTabletJoystick
!=
enabled
)
{
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
6a1fe19d
...
...
@@ -64,10 +64,13 @@ public:
Q_PROPERTY
(
bool
isAudioMuted
READ
isAudioMuted
WRITE
setIsAudioMuted
NOTIFY
isAudioMutedChanged
)
Q_PROPERTY
(
bool
isSaveLogPrompt
READ
isSaveLogPrompt
WRITE
setIsSaveLogPrompt
NOTIFY
isSaveLogPromptChanged
)
Q_PROPERTY
(
bool
isSaveLogPromptNotArmed
READ
isSaveLogPromptNotArmed
WRITE
setIsSaveLogPromptNotArmed
NOTIFY
isSaveLogPromptNotArmedChanged
)
Q_PROPERTY
(
bool
virtualTabletJoystick
READ
virtualTabletJoystick
WRITE
setVirtualTabletJoystick
NOTIFY
virtualTabletJoystickChanged
)
// MavLink Protocol
Q_PROPERTY
(
bool
isHeartBeatEnabled
READ
isHeartBeatEnabled
WRITE
setIsHeartBeatEnabled
NOTIFY
isHeartBeatEnabledChanged
)
Q_PROPERTY
(
bool
isMultiplexingEnabled
READ
isMultiplexingEnabled
WRITE
setIsMultiplexingEnabled
NOTIFY
isMultiplexingEnabledChanged
)
Q_PROPERTY
(
bool
isVersionCheckEnabled
READ
isVersionCheckEnabled
WRITE
setIsVersionCheckEnabled
NOTIFY
isVersionCheckEnabledChanged
)
Q_PROPERTY
(
bool
virtualTabletJoystick
READ
virtualTabletJoystick
WRITE
setVirtualTabletJoystick
NOTIFY
virtualTabletJoystick
Changed
)
Q_PROPERTY
(
int
mavlinkSystemID
READ
mavlinkSystemID
WRITE
setMavlinkSystemID
NOTIFY
mavlinkSystemID
Changed
)
Q_INVOKABLE
void
saveGlobalSetting
(
const
QString
&
key
,
const
QString
&
value
);
Q_INVOKABLE
QString
loadGlobalSetting
(
const
QString
&
key
,
const
QString
&
defaultValue
);
...
...
@@ -99,10 +102,12 @@ public:
bool
isAudioMuted
()
{
return
qgcApp
()
->
toolbox
()
->
audioOutput
()
->
isMuted
();
}
bool
isSaveLogPrompt
()
{
return
qgcApp
()
->
promptFlightDataSave
();
}
bool
isSaveLogPromptNotArmed
()
{
return
qgcApp
()
->
promptFlightDataSaveNotArmed
();
}
bool
virtualTabletJoystick
()
{
return
_virtualTabletJoystick
;
}
bool
isHeartBeatEnabled
()
{
return
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
()
->
heartbeatsEnabled
();
}
bool
isMultiplexingEnabled
()
{
return
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
()
->
multiplexingEnabled
();
}
bool
isVersionCheckEnabled
()
{
return
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
()
->
versionCheckEnabled
();
}
bool
virtualTabletJoystick
()
{
return
_virtualTabletJoystick
;
}
int
mavlinkSystemID
()
{
return
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
()
->
getSystemId
()
;
}
//-- TODO: Make this into an actual preference.
bool
isAdvancedMode
()
{
return
false
;
}
...
...
@@ -111,20 +116,23 @@ public:
void
setIsAudioMuted
(
bool
muted
);
void
setIsSaveLogPrompt
(
bool
prompt
);
void
setIsSaveLogPromptNotArmed
(
bool
prompt
);
void
setVirtualTabletJoystick
(
bool
enabled
);
void
setIsHeartBeatEnabled
(
bool
enable
);
void
setIsMultiplexingEnabled
(
bool
enable
);
void
setIsVersionCheckEnabled
(
bool
enable
);
void
set
VirtualTabletJoystick
(
bool
enable
d
);
void
set
MavlinkSystemID
(
int
i
d
);
signals:
void
isDarkStyleChanged
(
bool
dark
);
void
isAudioMutedChanged
(
bool
muted
);
void
isSaveLogPromptChanged
(
bool
prompt
);
void
isSaveLogPromptNotArmedChanged
(
bool
prompt
);
void
virtualTabletJoystickChanged
(
bool
enabled
);
void
isHeartBeatEnabledChanged
(
bool
enabled
);
void
isMultiplexingEnabledChanged
(
bool
enabled
);
void
isVersionCheckEnabledChanged
(
bool
enabled
);
void
virtualTabletJoystickChanged
(
bool
enable
d
);
void
mavlinkSystemIDChanged
(
int
i
d
);
private:
...
...
src/ui/LogReplayLinkConfigurationWidget.cc
deleted
100644 → 0
View file @
90222306
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#include "LogReplayLinkConfigurationWidget.h"
#include "QGCFileDialog.h"
#include "QGCApplication.h"
LogReplayLinkConfigurationWidget
::
LogReplayLinkConfigurationWidget
(
LogReplayLinkConfiguration
*
config
,
QWidget
*
parent
,
Qt
::
WindowFlags
flags
)
:
QWidget
(
parent
,
flags
)
{
_ui
.
setupUi
(
this
);
Q_ASSERT
(
config
!=
NULL
);
_config
=
config
;
_ui
.
logFilename
->
setText
(
_config
->
logFilename
());
connect
(
_ui
.
selectLogFileButton
,
&
QPushButton
::
clicked
,
this
,
&
LogReplayLinkConfigurationWidget
::
_selectLogFile
);
}
void
LogReplayLinkConfigurationWidget
::
_selectLogFile
(
bool
checked
)
{
Q_UNUSED
(
checked
);
QString
logFile
=
QGCFileDialog
::
getOpenFileName
(
this
,
"Select log file to replay"
,
qgcApp
()
->
mavlinkLogFilesLocation
(),
"MAVLink Log Files (*.mavlink);;All Files (*)"
);
if
(
!
logFile
.
isEmpty
())
{
_ui
.
logFilename
->
setText
(
logFile
);
_config
->
setLogFilename
(
logFile
);
}
}
\ No newline at end of file
src/ui/LogReplayLinkConfigurationWidget.h
deleted
100644 → 0
View file @
90222306
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef _LogReplayLinkConfigurationWidget_H_
#define _LogReplayLinkConfigurationWidget_H_
#include <QWidget>
#include "LogReplayLink.h"
#include "ui_LogReplayLinkConfigurationWidget.h"
class
LogReplayLinkConfigurationWidget
:
public
QWidget
{
Q_OBJECT
public:
LogReplayLinkConfigurationWidget
(
LogReplayLinkConfiguration
*
config
,
QWidget
*
parent
=
0
,
Qt
::
WindowFlags
flags
=
Qt
::
Sheet
);
private
slots
:
void
_selectLogFile
(
bool
checked
);
private:
Ui
::
LogReplayLinkConfigurationWidget
_ui
;
LogReplayLinkConfiguration
*
_config
;
};
#endif
src/ui/LogReplayLinkConfigurationWidget.ui
deleted
100644 → 0
View file @
90222306
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
LogReplayLinkConfigurationWidget
</class>
<widget
class=
"QWidget"
name=
"LogReplayLinkConfigurationWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
325
</width>
<height>
347
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_7"
stretch=
"0"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Log File:
</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget
class=
"QLabel"
name=
"logFilename"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
60
</height>
</size>
</property>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"wordWrap"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"selectLogFileButton"
>
<property
name=
"text"
>
<string>
Select Log File
</string>
</property>
</widget>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_8"
/>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
<action
name=
"actionDelete"
>
<property
name=
"text"
>
<string>
Delete
</string>
</property>
<property
name=
"toolTip"
>
<string>
Delete this link
</string>
</property>
<property
name=
"statusTip"
>
<string>
Delete this link
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Link delete button
</string>
</property>
</action>
<action
name=
"actionConnect"
>
<property
name=
"text"
>
<string>
Connect
</string>
</property>
<property
name=
"toolTip"
>
<string>
Connect this link
</string>
</property>
<property
name=
"statusTip"
>
<string>
Connect this link
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Connect this link
</string>
</property>
</action>
<action
name=
"actionClose"
>
<property
name=
"text"
>
<string>
Close
</string>
</property>
<property
name=
"toolTip"
>
<string>
Close the configuration window
</string>
</property>
<property
name=
"statusTip"
>
<string>
Close the configuration window
</string>
</property>
<property
name=
"whatsThis"
>
<string>
Close the configuration window
</string>
</property>
</action>
</widget>
<resources/>
<connections>
<connection>
<sender>
actionClose
</sender>
<signal>
triggered()
</signal>
<receiver>
LogReplayLinkConfigurationWidget
</receiver>
<slot>
close()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
-1
</x>
<y>
-1
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
224
</x>
<y>
195
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
src/ui/MainWindow.cc
View file @
6a1fe19d
...
...
@@ -536,9 +536,6 @@ void MainWindow::configureWindowName()
**/
void
MainWindow
::
connectCommonActions
()
{
// Connect actions from ui
connect
(
_ui
.
actionAdd_Link
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
manageLinks
()));
// Audio output
_ui
.
actionMuteAudioOutput
->
setChecked
(
qgcApp
()
->
toolbox
()
->
audioOutput
()
->
isMuted
());
connect
(
qgcApp
()
->
toolbox
()
->
audioOutput
(),
SIGNAL
(
mutedChanged
(
bool
)),
_ui
.
actionMuteAudioOutput
,
SLOT
(
setChecked
(
bool
)));
...
...
@@ -581,13 +578,6 @@ void MainWindow::showSettings()
SettingsDialog
settings
(
this
);
settings
.
exec
();
}
void
MainWindow
::
manageLinks
()
{
SettingsDialog
settings
(
this
,
SettingsDialog
::
ShowCommLinks
);
settings
.
exec
();
}
#endif
void
MainWindow
::
_vehicleAdded
(
Vehicle
*
vehicle
)
...
...
src/ui/MainWindow.h
View file @
6a1fe19d
...
...
@@ -104,7 +104,6 @@ public:
public
slots
:
#ifndef __mobile__
void
showSettings
();
void
manageLinks
();
#endif
/** @brief Save power by reducing update rates */
...
...
src/ui/MainWindow.ui
View file @
6a1fe19d
...
...
@@ -60,7 +60,6 @@
</property>
<addaction
name=
"separator"
/>
<addaction
name=
"actionMuteAudioOutput"
/>
<addaction
name=
"actionAdd_Link"
/>
<addaction
name=
"actionSettings"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionExit"
/>
...
...
src/ui/MockLinkConfiguration.cc
deleted
100644 → 0
View file @
90222306
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#include "MockLinkConfiguration.h"
#include "ui_MockLinkConfiguration.h"
MockLinkConfiguration
::
MockLinkConfiguration
(
MockConfiguration
*
config
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
_ui
(
new
Ui
::
MockLinkConfiguration
)
,
_config
(
config
)
{
_ui
->
setupUi
(
this
);
switch
(
config
->
firmwareType
())
{
case
MAV_AUTOPILOT_PX4
:
_ui
->
px4Radio
->
setChecked
(
true
);
break
;
case
MAV_AUTOPILOT_ARDUPILOTMEGA
:
_ui
->
apmRadio
->
setChecked
(
true
);
break
;
default:
_ui
->
genericRadio
->
setChecked
(
true
);
break
;
}
switch
(
config
->
vehicleType
())
{
case
MAV_TYPE_FIXED_WING
:
_ui
->
apmArduPlaneRadio
->
setChecked
(
true
);
break
;
default:
_ui
->
apmArduCopterRadio
->
setChecked
(
true
);
break
;
}
_ui
->
sendStatusTextCheckBox
->
setChecked
(
config
->
sendStatusText
());
connect
(
_ui
->
px4Radio
,
&
QRadioButton
::
clicked
,
this
,
&
MockLinkConfiguration
::
_px4RadioClicked
);
connect
(
_ui
->
apmRadio
,
&
QRadioButton
::
clicked
,
this
,
&
MockLinkConfiguration
::
_apmRadioClicked
);
connect
(
_ui
->
genericRadio
,
&
QRadioButton
::
clicked
,
this
,
&
MockLinkConfiguration
::
_genericRadioClicked
);
connect
(
_ui
->
apmArduCopterRadio
,
&
QRadioButton
::
clicked
,
this
,
&
MockLinkConfiguration
::
_apmArduCopterRadioClicked
);
connect
(
_ui
->
apmArduPlaneRadio
,
&
QRadioButton
::
clicked
,
this
,
&
MockLinkConfiguration
::
_apmArduPlaneRadioClicked
);
connect
(
_ui
->
genericRadio
,
&
QRadioButton
::
clicked
,
this
,
&
MockLinkConfiguration
::
_genericRadioClicked
);
connect
(
_ui
->
sendStatusTextCheckBox
,
&
QCheckBox
::
clicked
,
this
,
&
MockLinkConfiguration
::
_sendStatusTextClicked
);
}
MockLinkConfiguration
::~
MockLinkConfiguration
()
{
delete
_ui
;
}
void
MockLinkConfiguration
::
_px4RadioClicked
(
bool
checked
)
{
if
(
checked
)
{
_config
->
setFirmwareType
(
MAV_AUTOPILOT_PX4
);
}
}
void
MockLinkConfiguration
::
_apmRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
_config
->
setFirmwareType
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
}
}
void
MockLinkConfiguration
::
_genericRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
_config
->
setFirmwareType
(
MAV_AUTOPILOT_GENERIC
);
}
}
void
MockLinkConfiguration
::
_apmArduCopterRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
_config
->
setVehicleType
(
MAV_TYPE_QUADROTOR
);
}
}
void
MockLinkConfiguration
::
_apmArduPlaneRadioClicked
(
bool
checked
)
{
if
(
checked
)
{
_config
->
setVehicleType
(
MAV_TYPE_FIXED_WING
);
}
}
void
MockLinkConfiguration
::
_sendStatusTextClicked
(
bool
checked
)
{
_config
->
setSendStatusText
(
checked
);
}
src/ui/MockLinkConfiguration.h
deleted
100644 → 0
View file @
90222306
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef MockLinkConfiguration_H
#define MockLinkConfiguration_H
#include <QWidget>
#include "MockLink.h"
namespace
Ui
{
class
MockLinkConfiguration
;
}
class
MockLinkConfiguration
:
public
QWidget
{
Q_OBJECT
public:
explicit
MockLinkConfiguration
(
MockConfiguration
*
config
,
QWidget
*
parent
=
0
);
~
MockLinkConfiguration
();
private
slots
:
void
_px4RadioClicked
(
bool
checked
);
void
_apmRadioClicked
(
bool
checked
);
void
_genericRadioClicked
(
bool
checked
);
void
_apmArduCopterRadioClicked
(
bool
checked
);
void
_apmArduPlaneRadioClicked
(
bool
checked
);
void
_sendStatusTextClicked
(
bool
checked
);
private:
Ui
::
MockLinkConfiguration
*
_ui
;
MockConfiguration
*
_config
;
};
#endif // MockLinkConfiguration_H
src/ui/MockLinkConfiguration.ui
deleted
100644 → 0
View file @
90222306
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
MockLinkConfiguration
</class>
<widget
class=
"QWidget"
name=
"MockLinkConfiguration"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
238
</width>
<height>
188
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QRadioButton"
name=
"px4Radio"
>
<property
name=
"text"
>
<string>
PX4 Firmware
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"apmRadio"
>
<property
name=
"text"
>
<string>
APM Firmware
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"genericRadio"
>
<property
name=
"text"
>
<string>
Generic Firmware
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"sendStatusTextCheckBox"
>
<property
name=
"text"
>
<string>
Send status text + voice
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"title"
>
<string>
APM vehicle type
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QRadioButton"
name=
"apmArduCopterRadio"
>
<property
name=
"text"
>
<string>
ArduCopter
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"apmArduPlaneRadio"
>
<property
name=
"text"
>
<string>
ArduPlane
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
src/ui/QGCCommConfiguration.cc
deleted
100644 → 0
View file @
90222306
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Comm Link Configuration
* @author Gus Grubba <mavlink@grubba.com>
*
*/
#include <QPushButton>
#ifndef __ios__
#include "SerialLink.h"
#include "SerialConfigurationWindow.h"
#endif
#include "QGCUDPLinkConfiguration.h"
#include "QGCTCPLinkConfiguration.h"
#ifdef QT_DEBUG
#include "MockLinkConfiguration.h"
#endif