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
696643ab
Commit
696643ab
authored
Oct 12, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1954 from DonLakeFlyer/NoMobileWidget
Remove Dock Widget code from mobile builds
parents
13a187b8
90105411
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
149 additions
and
793 deletions
+149
-793
QGCApplication.pro
QGCApplication.pro
+41
-47
AutoPilotPlugin.cc
src/AutoPilotPlugins/AutoPilotPlugin.cc
+1
-0
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+1
-0
PowerComponentController.cc
src/AutoPilotPlugins/PX4/PowerComponentController.cc
+1
-0
SensorsComponentController.cc
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
+1
-0
FactPanelController.cc
src/FactSystem/FactControls/FactPanelController.cc
+1
-0
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+1
-0
QGCApplication.cc
src/QGCApplication.cc
+2
-13
QGCApplication.h
src/QGCApplication.h
+0
-2
QGCFileDialog.cc
src/QGCFileDialog.cc
+1
-0
main.cc
src/main.cc
+13
-9
MainWindow.cc
src/ui/MainWindow.cc
+73
-72
MainWindow.h
src/ui/MainWindow.h
+11
-20
QGCMainWindowAPConfigurator.cc
src/ui/QGCMainWindowAPConfigurator.cc
+0
-6
QGCMainWindowAPConfigurator.h
src/ui/QGCMainWindowAPConfigurator.h
+0
-18
Linecharts.cc
src/ui/linechart/Linecharts.cc
+1
-1
QGCMAVLinkMessageSender.cc
src/ui/mavlink/QGCMAVLinkMessageSender.cc
+0
-510
QGCMAVLinkMessageSender.h
src/ui/mavlink/QGCMAVLinkMessageSender.h
+0
-52
QGCMAVLinkMessageSender.ui
src/ui/mavlink/QGCMAVLinkMessageSender.ui
+0
-43
MainToolBar.cc
src/ui/toolbar/MainToolBar.cc
+1
-0
No files found.
QGCApplication.pro
View file @
696643ab
...
@@ -153,7 +153,6 @@ INCLUDEPATH += \
...
@@ -153,7 +153,6 @@ INCLUDEPATH += \
src
/
ui
/
linechart
\
src
/
ui
/
linechart
\
src
/
ui
/
map
\
src
/
ui
/
map
\
src
/
ui
/
mapdisplay
\
src
/
ui
/
mapdisplay
\
src
/
ui
/
mavlink
\
src
/
ui
/
mission
\
src
/
ui
/
mission
\
src
/
ui
/
px4_configuration
\
src
/
ui
/
px4_configuration
\
src
/
ui
/
toolbar
\
src
/
ui
/
toolbar
\
...
@@ -166,28 +165,18 @@ FORMS += \
...
@@ -166,28 +165,18 @@ FORMS += \
src
/
ui
/
Linechart
.
ui
\
src
/
ui
/
Linechart
.
ui
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
ui
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
ui
\
src
/
ui
/
MainWindow
.
ui
\
src
/
ui
/
MainWindow
.
ui
\
src
/
ui
/
mavlink
/
QGCMAVLinkMessageSender
.
ui
\
src
/
ui
/
MAVLinkSettingsWidget
.
ui
\
src
/
ui
/
MAVLinkSettingsWidget
.
ui
\
src
/
ui
/
MultiVehicleDockWidget
.
ui
\
src
/
ui
/
QGCCommConfiguration
.
ui
\
src
/
ui
/
QGCCommConfiguration
.
ui
\
src
/
ui
/
QGCDataPlot2D
.
ui
\
src
/
ui
/
QGCDataPlot2D
.
ui
\
src
/
ui
/
QGCLinkConfiguration
.
ui
\
src
/
ui
/
QGCLinkConfiguration
.
ui
\
src
/
ui
/
QGCMapRCToParamDialog
.
ui
\
src
/
ui
/
QGCMapRCToParamDialog
.
ui
\
src
/
ui
/
QGCMAVLinkInspector
.
ui
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
ui
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
ui
\
src
/
ui
/
QGCPluginHost
.
ui
\
src
/
ui
/
QGCPluginHost
.
ui
\
src
/
ui
/
QGCTabbedInfoView
.
ui
\
src
/
ui
/
QGCTCPLinkConfiguration
.
ui
\
src
/
ui
/
QGCTCPLinkConfiguration
.
ui
\
src
/
ui
/
QGCUASFileView
.
ui
\
src
/
ui
/
QGCUASFileViewMulti
.
ui
\
src
/
ui
/
QGCUDPLinkConfiguration
.
ui
\
src
/
ui
/
QGCUDPLinkConfiguration
.
ui
\
src
/
ui
/
SettingsDialog
.
ui
\
src
/
ui
/
SettingsDialog
.
ui
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
ui
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
ui
\
src
/
ui
/
uas
/
UASMessageView
.
ui
\
src
/
ui
/
uas
/
UASMessageView
.
ui
\
src
/
ui
/
uas
/
UASQuickView
.
ui
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
ui
\
src
/
ui
/
UASInfo
.
ui
\
src
/
ui
/
UASRawStatusView
.
ui
\
!
iOSBuild
{
!
iOSBuild
{
FORMS
+=
\
FORMS
+=
\
...
@@ -196,10 +185,19 @@ FORMS += \
...
@@ -196,10 +185,19 @@ FORMS += \
!
MobileBuild
{
!
MobileBuild
{
FORMS
+=
\
FORMS
+=
\
src
/
ui
/
MultiVehicleDockWidget
.
ui
\
src
/
ui
/
QGCHilConfiguration
.
ui
\
src
/
ui
/
QGCHilConfiguration
.
ui
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
ui
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
ui
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
ui
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
ui
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
ui
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
ui
\
src
/
ui
/
QGCMAVLinkInspector
.
ui
\
src
/
ui
/
QGCTabbedInfoView
.
ui
\
src
/
ui
/
QGCUASFileView
.
ui
\
src
/
ui
/
QGCUASFileViewMulti
.
ui
\
src
/
ui
/
uas
/
UASQuickView
.
ui
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
ui
\
src
/
ui
/
UASInfo
.
ui
\
src
/
ui
/
UASRawStatusView
.
ui
\
}
}
HEADERS
+=
\
HEADERS
+=
\
...
@@ -232,7 +230,6 @@ HEADERS += \
...
@@ -232,7 +230,6 @@ HEADERS += \
src
/
QGCApplication
.
h
\
src
/
QGCApplication
.
h
\
src
/
QGCComboBox
.
h
\
src
/
QGCComboBox
.
h
\
src
/
QGCConfig
.
h
\
src
/
QGCConfig
.
h
\
src
/
QGCDockWidget
.
h
\
src
/
QGCFileDialog
.
h
\
src
/
QGCFileDialog
.
h
\
src
/
QGCGeo
.
h
\
src
/
QGCGeo
.
h
\
src
/
QGCLoggingCategory
.
h
\
src
/
QGCLoggingCategory
.
h
\
...
@@ -263,37 +260,20 @@ HEADERS += \
...
@@ -263,37 +260,20 @@ HEADERS += \
src
/
ui
/
linechart
/
ScrollZoomer
.
h
\
src
/
ui
/
linechart
/
ScrollZoomer
.
h
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
h
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
h
\
src
/
ui
/
MainWindow
.
h
\
src
/
ui
/
MainWindow
.
h
\
src
/
ui
/
mavlink
/
QGCMAVLinkMessageSender
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
MAVLinkDecoder
.
h
\
src
/
ui
/
MAVLinkSettingsWidget
.
h
\
src
/
ui
/
MAVLinkSettingsWidget
.
h
\
src
/
ui
/
MultiVehicleDockWidget
.
h
\
src
/
ui
/
QGCCommConfiguration
.
h
\
src
/
ui
/
QGCCommConfiguration
.
h
\
src
/
ui
/
QGCDataPlot2D
.
h
\
src
/
ui
/
QGCDataPlot2D
.
h
\
src
/
ui
/
QGCLinkConfiguration
.
h
\
src
/
ui
/
QGCLinkConfiguration
.
h
\
src
/
ui
/
QGCMainWindowAPConfigurator
.
h
\
src
/
ui
/
QGCMapRCToParamDialog
.
h
\
src
/
ui
/
QGCMapRCToParamDialog
.
h
\
src
/
ui
/
QGCMAVLinkInspector
.
h
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
h
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
h
\
src
/
ui
/
QGCPluginHost
.
h
\
src
/
ui
/
QGCPluginHost
.
h
\
src
/
ui
/
QGCTabbedInfoView
.
h
\
src
/
ui
/
QGCTCPLinkConfiguration
.
h
\
src
/
ui
/
QGCTCPLinkConfiguration
.
h
\
src
/
ui
/
QGCUASFileView
.
h
\
src
/
ui
/
QGCUASFileViewMulti
.
h
\
src
/
ui
/
QGCUDPLinkConfiguration
.
h
\
src
/
ui
/
QGCUDPLinkConfiguration
.
h
\
src
/
ui
/
SettingsDialog
.
h
\
src
/
ui
/
SettingsDialog
.
h
\
src
/
ui
/
toolbar
/
MainToolBar
.
h
\
src
/
ui
/
toolbar
/
MainToolBar
.
h
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
h
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
h
\
src
/
ui
/
uas
/
UASInfoWidget
.
h
\
src
/
ui
/
uas
/
UASMessageView
.
h
\
src
/
ui
/
uas
/
UASMessageView
.
h
\
src
/
ui
/
uas
/
UASQuickView
.
h
\
src
/
ui
/
uas
/
UASQuickViewGaugeItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
h
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
h
\
src
/
ui
/
UASRawStatusView
.
h
\
src
/
ViewWidgets
/
CustomCommandWidget
.
h
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
h
\
src
/
ViewWidgets
/
ViewWidgetController
.
h
\
src
/
MissionItem
.
h
\
src
/
MissionItem
.
h
\
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
h
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
h
...
@@ -309,13 +289,29 @@ HEADERS += \
...
@@ -309,13 +289,29 @@ HEADERS += \
src
/
comm
/
QGCHilLink
.
h
\
src
/
comm
/
QGCHilLink
.
h
\
src
/
comm
/
QGCJSBSimLink
.
h
\
src
/
comm
/
QGCJSBSimLink
.
h
\
src
/
comm
/
QGCXPlaneLink
.
h
\
src
/
comm
/
QGCXPlaneLink
.
h
\
src
/
QGCDockWidget
.
h
\
src
/
ui
/
CameraView
.
h
\
src
/
ui
/
CameraView
.
h
\
src
/
ui
/
HILDockWidget
.
h
\
src
/
ui
/
HILDockWidget
.
h
\
src
/
ui
/
MultiVehicleDockWidget
.
h
\
src
/
ui
/
QGCHilConfiguration
.
h
\
src
/
ui
/
QGCHilConfiguration
.
h
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
h
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
h
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
h
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
h
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
h
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
h
\
src
/
ui
/
QGCMAVLinkInspector
.
h
\
src
/
ui
/
QGCTabbedInfoView
.
h
\
src
/
ui
/
QGCUASFileView
.
h
\
src
/
ui
/
QGCUASFileViewMulti
.
h
\
src
/
ui
/
uas
/
UASInfoWidget
.
h
\
src
/
ui
/
uas
/
UASQuickView
.
h
\
src
/
ui
/
uas
/
UASQuickViewGaugeItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewItem
.
h
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
h
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
h
\
src
/
ui
/
UASRawStatusView
.
h
\
src
/
VehicleSetup
/
JoystickConfigController
.
h
\
src
/
VehicleSetup
/
JoystickConfigController
.
h
\
src
/
ViewWidgets
/
CustomCommandWidget
.
h
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
h
\
src
/
ViewWidgets
/
ViewWidgetController
.
h
\
}
}
SOURCES
+=
\
SOURCES
+=
\
...
@@ -344,7 +340,6 @@ SOURCES += \
...
@@ -344,7 +340,6 @@ SOURCES += \
src
/
QGC
.
cc
\
src
/
QGC
.
cc
\
src
/
QGCApplication
.
cc
\
src
/
QGCApplication
.
cc
\
src
/
QGCComboBox
.
cc
\
src
/
QGCComboBox
.
cc
\
src
/
QGCDockWidget
.
cc
\
src
/
QGCFileDialog
.
cc
\
src
/
QGCFileDialog
.
cc
\
src
/
QGCLoggingCategory
.
cc
\
src
/
QGCLoggingCategory
.
cc
\
src
/
QGCPalette
.
cc
\
src
/
QGCPalette
.
cc
\
...
@@ -370,37 +365,20 @@ SOURCES += \
...
@@ -370,37 +365,20 @@ SOURCES += \
src
/
ui
/
linechart
/
ScrollZoomer
.
cc
\
src
/
ui
/
linechart
/
ScrollZoomer
.
cc
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
cc
\
src
/
ui
/
LogReplayLinkConfigurationWidget
.
cc
\
src
/
ui
/
MainWindow
.
cc
\
src
/
ui
/
MainWindow
.
cc
\
src
/
ui
/
mavlink
/
QGCMAVLinkMessageSender
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
MAVLinkDecoder
.
cc
\
src
/
ui
/
MAVLinkSettingsWidget
.
cc
\
src
/
ui
/
MAVLinkSettingsWidget
.
cc
\
src
/
ui
/
MultiVehicleDockWidget
.
cc
\
src
/
ui
/
QGCCommConfiguration
.
cc
\
src
/
ui
/
QGCCommConfiguration
.
cc
\
src
/
ui
/
QGCDataPlot2D
.
cc
\
src
/
ui
/
QGCDataPlot2D
.
cc
\
src
/
ui
/
QGCLinkConfiguration
.
cc
\
src
/
ui
/
QGCLinkConfiguration
.
cc
\
src
/
ui
/
QGCMainWindowAPConfigurator
.
cc
\
src
/
ui
/
QGCMapRCToParamDialog
.
cpp
\
src
/
ui
/
QGCMapRCToParamDialog
.
cpp
\
src
/
ui
/
QGCMAVLinkInspector
.
cc
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
cc
\
src
/
ui
/
QGCMAVLinkLogPlayer
.
cc
\
src
/
ui
/
QGCPluginHost
.
cc
\
src
/
ui
/
QGCPluginHost
.
cc
\
src
/
ui
/
QGCTabbedInfoView
.
cpp
\
src
/
ui
/
QGCTCPLinkConfiguration
.
cc
\
src
/
ui
/
QGCTCPLinkConfiguration
.
cc
\
src
/
ui
/
QGCUASFileView
.
cc
\
src
/
ui
/
QGCUASFileViewMulti
.
cc
\
src
/
ui
/
QGCUDPLinkConfiguration
.
cc
\
src
/
ui
/
QGCUDPLinkConfiguration
.
cc
\
src
/
ui
/
SettingsDialog
.
cc
\
src
/
ui
/
SettingsDialog
.
cc
\
src
/
ui
/
toolbar
/
MainToolBar
.
cc
\
src
/
ui
/
toolbar
/
MainToolBar
.
cc
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
cc
\
src
/
ui
/
uas
/
QGCUnconnectedInfoWidget
.
cc
\
src
/
ui
/
uas
/
UASInfoWidget
.
cc
\
src
/
ui
/
uas
/
UASMessageView
.
cc
\
src
/
ui
/
uas
/
UASMessageView
.
cc
\
src
/
ui
/
uas
/
UASQuickView
.
cc
\
src
/
ui
/
uas
/
UASQuickViewGaugeItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
cc
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
cc
\
src
/
ui
/
UASRawStatusView
.
cpp
\
src
/
ViewWidgets
/
CustomCommandWidget
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
cc
\
src
/
ViewWidgets
/
ViewWidgetController
.
cc
\
src
/
MissionItem
.
cc
\
src
/
MissionItem
.
cc
\
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
cc
src
/
AutoPilotPlugins
/
PX4
/
PX4AirframeLoader
.
cc
...
@@ -415,13 +393,29 @@ SOURCES += \
...
@@ -415,13 +393,29 @@ SOURCES += \
src
/
comm
/
QGCFlightGearLink
.
cc
\
src
/
comm
/
QGCFlightGearLink
.
cc
\
src
/
comm
/
QGCJSBSimLink
.
cc
\
src
/
comm
/
QGCJSBSimLink
.
cc
\
src
/
comm
/
QGCXPlaneLink
.
cc
\
src
/
comm
/
QGCXPlaneLink
.
cc
\
src
/
QGCDockWidget
.
cc
\
src
/
ui
/
CameraView
.
cc
\
src
/
ui
/
CameraView
.
cc
\
src
/
ui
/
HILDockWidget
.
cc
\
src
/
ui
/
HILDockWidget
.
cc
\
src
/
ui
/
MultiVehicleDockWidget
.
cc
\
src
/
ui
/
QGCHilConfiguration
.
cc
\
src
/
ui
/
QGCHilConfiguration
.
cc
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
cc
\
src
/
ui
/
QGCHilFlightGearConfiguration
.
cc
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
cc
\
src
/
ui
/
QGCHilJSBSimConfiguration
.
cc
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
cc
\
src
/
ui
/
QGCHilXPlaneConfiguration
.
cc
\
src
/
ui
/
QGCMAVLinkInspector
.
cc
\
src
/
ui
/
QGCTabbedInfoView
.
cpp
\
src
/
ui
/
QGCUASFileView
.
cc
\
src
/
ui
/
QGCUASFileViewMulti
.
cc
\
src
/
ui
/
uas
/
UASInfoWidget
.
cc
\
src
/
ui
/
uas
/
UASQuickView
.
cc
\
src
/
ui
/
uas
/
UASQuickViewGaugeItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItem
.
cc
\
src
/
ui
/
uas
/
UASQuickViewItemSelect
.
cc
\
src
/
ui
/
uas
/
UASQuickViewTextItem
.
cc
\
src
/
ui
/
UASRawStatusView
.
cpp
\
src
/
VehicleSetup
/
JoystickConfigController
.
cc
\
src
/
VehicleSetup
/
JoystickConfigController
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidget
.
cc
\
src
/
ViewWidgets
/
CustomCommandWidgetController
.
cc
\
src
/
ViewWidgets
/
ViewWidgetController
.
cc
\
}
}
#
#
...
...
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
696643ab
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "MainWindow.h"
#include "MainWindow.h"
#include "ParameterLoader.h"
#include "ParameterLoader.h"
#include "UAS.h"
AutoPilotPlugin
::
AutoPilotPlugin
(
Vehicle
*
vehicle
,
QObject
*
parent
)
AutoPilotPlugin
::
AutoPilotPlugin
(
Vehicle
*
vehicle
,
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
...
...
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
696643ab
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "FlightModesComponentController.h"
#include "FlightModesComponentController.h"
#include "AirframeComponentController.h"
#include "AirframeComponentController.h"
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "UAS.h"
/// @file
/// @file
/// @brief This is the AutoPilotPlugin implementatin for the MAV_AUTOPILOT_PX4 type.
/// @brief This is the AutoPilotPlugin implementatin for the MAV_AUTOPILOT_PX4 type.
...
...
src/AutoPilotPlugins/PX4/PowerComponentController.cc
View file @
696643ab
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "PowerComponentController.h"
#include "PowerComponentController.h"
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "UAS.h"
#include <QVariant>
#include <QVariant>
#include <QQmlProperty>
#include <QQmlProperty>
...
...
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
View file @
696643ab
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "SensorsComponentController.h"
#include "SensorsComponentController.h"
#include "QGCMAVLink.h"
#include "QGCMAVLink.h"
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "UAS.h"
#include <QVariant>
#include <QVariant>
#include <QQmlProperty>
#include <QQmlProperty>
...
...
src/FactSystem/FactControls/FactPanelController.cc
View file @
696643ab
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "FactPanelController.h"
#include "FactPanelController.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "UAS.h"
#include <QQmlEngine>
#include <QQmlEngine>
...
...
src/FactSystem/ParameterLoader.cc
View file @
696643ab
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "UASMessageHandler.h"
#include "UASMessageHandler.h"
#include "FirmwarePlugin.h"
#include "FirmwarePlugin.h"
#include "UAS.h"
#include <QFile>
#include <QFile>
#include <QDebug>
#include <QDebug>
...
...
src/QGCApplication.cc
View file @
696643ab
...
@@ -163,9 +163,6 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
...
@@ -163,9 +163,6 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
,
_runningUnitTests
(
unitTesting
)
,
_runningUnitTests
(
unitTesting
)
,
_styleIsDark
(
true
)
,
_styleIsDark
(
true
)
,
_fakeMobile
(
false
)
,
_fakeMobile
(
false
)
#ifdef UNITTEST_BUILD
,
_useNewMissionEditor
(
true
)
// Unit Tests run new mission editor
#endif
#ifdef QT_DEBUG
#ifdef QT_DEBUG
,
_testHighDPI
(
false
)
,
_testHighDPI
(
false
)
#endif
#endif
...
@@ -337,9 +334,7 @@ void QGCApplication::_initCommon(void)
...
@@ -337,9 +334,7 @@ void QGCApplication::_initCommon(void)
qmlRegisterUncreatableType
<
QGCQGeoCoordinate
>
(
"QGroundControl"
,
1
,
0
,
"QGCQGeoCoordinate"
,
"Reference only"
);
qmlRegisterUncreatableType
<
QGCQGeoCoordinate
>
(
"QGroundControl"
,
1
,
0
,
"QGCQGeoCoordinate"
,
"Reference only"
);
qmlRegisterUncreatableType
<
CoordinateVector
>
(
"QGroundControl"
,
1
,
0
,
"CoordinateVector"
,
"Reference only"
);
qmlRegisterUncreatableType
<
CoordinateVector
>
(
"QGroundControl"
,
1
,
0
,
"CoordinateVector"
,
"Reference only"
);
qmlRegisterType
<
ViewWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
ParameterEditorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ParameterEditorController"
);
qmlRegisterType
<
ParameterEditorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ParameterEditorController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"CustomCommandWidgetController"
);
qmlRegisterType
<
FlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FlightModesComponentController"
);
qmlRegisterType
<
FlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FlightModesComponentController"
);
qmlRegisterType
<
AirframeComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AirframeComponentController"
);
qmlRegisterType
<
AirframeComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AirframeComponentController"
);
qmlRegisterType
<
SensorsComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"SensorsComponentController"
);
qmlRegisterType
<
SensorsComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"SensorsComponentController"
);
...
@@ -348,6 +343,8 @@ void QGCApplication::_initCommon(void)
...
@@ -348,6 +343,8 @@ void QGCApplication::_initCommon(void)
qmlRegisterType
<
ScreenToolsController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ScreenToolsController"
);
qmlRegisterType
<
ScreenToolsController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ScreenToolsController"
);
#ifndef __mobile__
#ifndef __mobile__
qmlRegisterType
<
ViewWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"CustomCommandWidgetController"
);
qmlRegisterType
<
FirmwareUpgradeController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FirmwareUpgradeController"
);
qmlRegisterType
<
FirmwareUpgradeController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FirmwareUpgradeController"
);
qmlRegisterType
<
JoystickConfigController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"JoystickConfigController"
);
qmlRegisterType
<
JoystickConfigController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"JoystickConfigController"
);
#endif
#endif
...
@@ -420,14 +417,6 @@ bool QGCApplication::_initForNormalAppBoot(void)
...
@@ -420,14 +417,6 @@ bool QGCApplication::_initForNormalAppBoot(void)
_styleIsDark
=
settings
.
value
(
_styleKey
,
_styleIsDark
).
toBool
();
_styleIsDark
=
settings
.
value
(
_styleKey
,
_styleIsDark
).
toBool
();
_loadCurrentStyle
();
_loadCurrentStyle
();
// Temp hack for new mission editor
#ifdef __mobile__
// Mobile builds always use new Mission Editor
_useNewMissionEditor
=
true
;
#else
_useNewMissionEditor
=
settings
.
value
(
"UseNewMissionEditor"
,
false
).
toBool
();
#endif
// Show splash screen
// Show splash screen
QPixmap
splashImage
(
":/res/SplashScreen"
);
QPixmap
splashImage
(
":/res/SplashScreen"
);
QSplashScreen
*
splashScreen
=
new
QSplashScreen
(
splashImage
);
QSplashScreen
*
splashScreen
=
new
QSplashScreen
(
splashImage
);
...
...
src/QGCApplication.h
View file @
696643ab
...
@@ -179,8 +179,6 @@ private:
...
@@ -179,8 +179,6 @@ private:
bool
_fakeMobile
;
///< true: Fake ui into displaying mobile interface
bool
_fakeMobile
;
///< true: Fake ui into displaying mobile interface
bool
_useNewMissionEditor
;
///< true: Use new Mission Editor
#ifdef QT_DEBUG
#ifdef QT_DEBUG
bool
_testHighDPI
;
///< true: double fonts sizes for simulating high dpi devices
bool
_testHighDPI
;
///< true: double fonts sizes for simulating high dpi devices
#endif
#endif
...
...
src/QGCFileDialog.cc
View file @
696643ab
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <QRegularExpression>
#include <QRegularExpression>
#include <QMessageBox>
#include <QMessageBox>
#include <QPushButton>
QString
QGCFileDialog
::
getExistingDirectory
(
QString
QGCFileDialog
::
getExistingDirectory
(
QWidget
*
parent
,
QWidget
*
parent
,
...
...
src/main.cc
View file @
696643ab
...
@@ -31,21 +31,25 @@ This file is part of the QGROUNDCONTROL project
...
@@ -31,21 +31,25 @@ This file is part of the QGROUNDCONTROL project
#include <QtGlobal>
#include <QtGlobal>
#include <QApplication>
#include <QApplication>
#include <QSslSocket>
#include <QSslSocket>
#include <QProcessEnvironment>
#ifndef __mobile__
#ifndef __mobile__
#include <QSerialPortInfo>
#include <QSerialPortInfo>
#endif
#endif
#include <QProcessEnvironment>
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "MainWindow.h"
#include "MainWindow.h"
#ifdef QT_DEBUG
#ifdef QT_DEBUG
#ifndef __mobile__
#ifndef __mobile__
#include "UnitTest.h"
#include "UnitTest.h"
#endif
#endif
#include "CmdLineOptParser.h"
#include "CmdLineOptParser.h"
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
#include <crtdbg.h>
#include <crtdbg.h>
#endif
#endif
#endif
#endif
#include <iostream>
#include <iostream>
/* SDL does ugly things to main() */
/* SDL does ugly things to main() */
...
...
src/ui/MainWindow.cc
View file @
696643ab
...
@@ -33,11 +33,11 @@ This file is part of the QGROUNDCONTROL project
...
@@ -33,11 +33,11 @@ This file is part of the QGROUNDCONTROL project
#include <QTimer>
#include <QTimer>
#include <QHostInfo>
#include <QHostInfo>
#include <QSplashScreen>
#include <QSplashScreen>
#include <QQuickView>
#include <QQuickView>
#include <QDesktopWidget>
#include <QDesktopWidget>
#include <QScreen>
#include <QScreen>
#include <QDesktopServices>
#include <QDesktopServices>
#include <QDockWidget>
#include "QGC.h"
#include "QGC.h"
#include "MAVLinkProtocol.h"
#include "MAVLinkProtocol.h"
...
@@ -46,27 +46,28 @@ This file is part of the QGROUNDCONTROL project
...
@@ -46,27 +46,28 @@ This file is part of the QGROUNDCONTROL project
#include "QGCMAVLinkLogPlayer.h"
#include "QGCMAVLinkLogPlayer.h"
#include "SettingsDialog.h"
#include "SettingsDialog.h"
#include "MAVLinkDecoder.h"
#include "MAVLinkDecoder.h"
#include "QGCMAVLinkMessageSender.h"
#include "UASQuickView.h"
#include "QGCDataPlot2D.h"
#include "QGCDataPlot2D.h"
#include "Linecharts.h"
#include "Linecharts.h"
#include "QGCTabbedInfoView.h"
#include "UASRawStatusView.h"
#include "FlightDisplayView.h"
#include "FlightDisplayView.h"
#include "FlightDisplayWidget.h"
#include "SetupView.h"
#include "SetupView.h"
#include "QGCUASFileViewMulti.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "QGCFileDialog.h"
#include "QGCFileDialog.h"
#include "QGCMessageBox.h"
#include "QGCMessageBox.h"
#include "QGCDockWidget.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
#include "CustomCommandWidget.h"
#include "HomePositionManager.h"
#include "HomePositionManager.h"
#include "MissionEditor.h"
#include "MissionEditor.h"
#include "LogCompressor.h"
#include "LogCompressor.h"
#include "UAS.h"
#ifndef __mobile__
#ifndef __mobile__
#include "QGCUASFileViewMulti.h"
#include "UASQuickView.h"
#include "QGCTabbedInfoView.h"
#include "UASRawStatusView.h"
#include "CustomCommandWidget.h"
#include "QGCDockWidget.h"
#include "FlightDisplayWidget.h"
#include "UASInfoWidget.h"
#include "HILDockWidget.h"
#include "HILDockWidget.h"
#endif
#endif
...
@@ -86,6 +87,7 @@ This file is part of the QGROUNDCONTROL project
...
@@ -86,6 +87,7 @@ This file is part of the QGROUNDCONTROL project
/// The key under which the Main Window settings are saved
/// The key under which the Main Window settings are saved
const
char
*
MAIN_SETTINGS_GROUP
=
"QGC_MAINWINDOW"
;
const
char
*
MAIN_SETTINGS_GROUP
=
"QGC_MAINWINDOW"
;
#ifndef __mobile__
const
char
*
MainWindow
::
_mavlinkDockWidgetName
=
"MAVLINK_INSPECTOR_DOCKWIDGET"
;
const
char
*
MainWindow
::
_mavlinkDockWidgetName
=
"MAVLINK_INSPECTOR_DOCKWIDGET"
;
const
char
*
MainWindow
::
_customCommandWidgetName
=
"CUSTOM_COMMAND_DOCKWIDGET"
;
const
char
*
MainWindow
::
_customCommandWidgetName
=
"CUSTOM_COMMAND_DOCKWIDGET"
;
const
char
*
MainWindow
::
_filesDockWidgetName
=
"FILE_VIEW_DOCKWIDGET"
;
const
char
*
MainWindow
::
_filesDockWidgetName
=
"FILE_VIEW_DOCKWIDGET"
;
...
@@ -94,6 +96,7 @@ const char* MainWindow::_mapViewDockWidgetName = "MAP_VIEW_DOCKWIDGET";
...
@@ -94,6 +96,7 @@ const char* MainWindow::_mapViewDockWidgetName = "MAP_VIEW_DOCKWIDGET";
const
char
*
MainWindow
::
_pfdDockWidgetName
=
"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET"
;
const
char
*
MainWindow
::
_pfdDockWidgetName
=
"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET"
;
const
char
*
MainWindow
::
_uasInfoViewDockWidgetName
=
"UAS_INFO_INFOVIEW_DOCKWIDGET"
;
const
char
*
MainWindow
::
_uasInfoViewDockWidgetName
=
"UAS_INFO_INFOVIEW_DOCKWIDGET"
;
const
char
*
MainWindow
::
_hilDockWidgetName
=
"HIL_DOCKWIDGET"
;
const
char
*
MainWindow
::
_hilDockWidgetName
=
"HIL_DOCKWIDGET"
;
#endif
static
MainWindow
*
_instance
=
NULL
;
///< @brief MainWindow singleton
static
MainWindow
*
_instance
=
NULL
;
///< @brief MainWindow singleton
...
@@ -162,10 +165,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
...
@@ -162,10 +165,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
menuBar
()
->
setNativeMenuBar
(
false
);
menuBar
()
->
setNativeMenuBar
(
false
);
#endif
#endif
#ifndef __mobile__
#ifdef UNITTEST_BUILD
#ifdef UNITTEST_BUILD
QAction
*
qmlTestAction
=
new
QAction
(
"Test QML palette and controls"
,
NULL
);
QAction
*
qmlTestAction
=
new
QAction
(
"Test QML palette and controls"
,
NULL
);
connect
(
qmlTestAction
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
_showQmlTestWidget
);
connect
(
qmlTestAction
,
&
QAction
::
triggered
,
this
,
&
MainWindow
::
_showQmlTestWidget
);
_ui
.
menuWidgets
->
addAction
(
qmlTestAction
);
_ui
.
menuWidgets
->
addAction
(
qmlTestAction
);
#endif
#endif
#endif
// Load QML Toolbar
// Load QML Toolbar
...
@@ -184,9 +189,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
...
@@ -184,9 +189,12 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
setStatusBar
(
new
QStatusBar
(
this
));
setStatusBar
(
new
QStatusBar
(
this
));
statusBar
()
->
setSizeGripEnabled
(
true
);
statusBar
()
->
setSizeGripEnabled
(
true
);
#ifndef __mobile__
emit
initStatusChanged
(
tr
(
"Building common widgets."
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
emit
initStatusChanged
(
tr
(
"Building common widgets."
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
_buildCommonWidgets
();
_buildCommonWidgets
();
emit
initStatusChanged
(
tr
(
"Building common actions"
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
emit
initStatusChanged
(
tr
(
"Building common actions"
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
#endif
// Create actions
// Create actions
connectCommonActions
();
connectCommonActions
();
// Connect user interface devices
// Connect user interface devices
...
@@ -332,6 +340,7 @@ QString MainWindow::_getWindowGeometryKey()
...
@@ -332,6 +340,7 @@ QString MainWindow::_getWindowGeometryKey()
return
"_geometry"
;
return
"_geometry"
;
}
}
#ifndef __mobile__
void
MainWindow
::
_createDockWidget
(
const
QString
&
title
,
const
QString
&
name
,
Qt
::
DockWidgetArea
area
,
QWidget
*
innerWidget
)
void
MainWindow
::
_createDockWidget
(
const
QString
&
title
,
const
QString
&
name
,
Qt
::
DockWidgetArea
area
,
QWidget
*
innerWidget
)
{
{
Q_ASSERT
(
!
_mapName2DockWidget
.
contains
(
name
));
Q_ASSERT
(
!
_mapName2DockWidget
.
contains
(
name
));
...
@@ -401,46 +410,6 @@ void MainWindow::_buildCommonWidgets(void)
...
@@ -401,46 +410,6 @@ void MainWindow::_buildCommonWidgets(void)
}
}
}
}
void
MainWindow
::
_buildMissionEditorView
(
void
)
{
if
(
!
_missionEditorView
)
{
_missionEditorView
=
new
MissionEditor
(
this
);
_missionEditorView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildFlightView
(
void
)
{
if
(
!
_flightView
)
{
_flightView
=
new
FlightDisplayView
(
this
);
_flightView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildSetupView
(
void
)
{
if
(
!
_setupView
)
{
_setupView
=
new
SetupView
(
this
);
_setupView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildAnalyzeView
(
void
)
{
if
(
!
_analyzeView
)
{
_analyzeView
=
new
QGCDataPlot2D
(
this
);
_analyzeView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildSimView
(
void
)
{
if
(
!
_simView
)
{
_simView
=
new
FlightDisplayView
(
this
);
_simView
->
setVisible
(
false
);
}
}
/// Shows or hides the specified dock widget, creating if necessary
/// Shows or hides the specified dock widget, creating if necessary
void
MainWindow
::
_showDockWidget
(
const
QString
&
name
,
bool
show
)
void
MainWindow
::
_showDockWidget
(
const
QString
&
name
,
bool
show
)
{
{
...
@@ -503,6 +472,53 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
...
@@ -503,6 +472,53 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
}
}
}
}
void
MainWindow
::
_hideAllDockWidgets
(
void
)
{
foreach
(
QDockWidget
*
dockWidget
,
_mapName2DockWidget
)
{
dockWidget
->
setVisible
(
false
);
}
}
void
MainWindow
::
_showDockWidgetAction
(
bool
show
)
{
QAction
*
action
=
dynamic_cast
<
QAction
*>
(
QObject
::
sender
());
Q_ASSERT
(
action
);
_showDockWidget
(
action
->
data
().
toString
(),
show
);
}
#endif
void
MainWindow
::
_buildMissionEditorView
(
void
)
{
if
(
!
_missionEditorView
)
{
_missionEditorView
=
new
MissionEditor
(
this
);
_missionEditorView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildFlightView
(
void
)
{
if
(
!
_flightView
)
{
_flightView
=
new
FlightDisplayView
(
this
);
_flightView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildSetupView
(
void
)
{
if
(
!
_setupView
)
{
_setupView
=
new
SetupView
(
this
);
_setupView
->
setVisible
(
false
);
}
}
void
MainWindow
::
_buildAnalyzeView
(
void
)
{
if
(
!
_analyzeView
)
{
_analyzeView
=
new
QGCDataPlot2D
(
this
);
_analyzeView
->
setVisible
(
false
);
}
}
void
MainWindow
::
fullScreenActionItemCallback
(
bool
)
void
MainWindow
::
fullScreenActionItemCallback
(
bool
)
{
{
_ui
.
actionNormal
->
setChecked
(
false
);
_ui
.
actionNormal
->
setChecked
(
false
);
...
@@ -804,10 +820,10 @@ void MainWindow::_loadCurrentViewState(void)
...
@@ -804,10 +820,10 @@ void MainWindow::_loadCurrentViewState(void)
_centralLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
_centralLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
_currentViewWidget
->
setVisible
(
true
);
_currentViewWidget
->
setVisible
(
true
);
#ifndef __mobile__
// Hide all widgets from previous view
// Hide all widgets from previous view
_hideAllDockWidgets
();
_hideAllDockWidgets
();
#ifndef __mobile__
// Restore the widgets for the new view
// Restore the widgets for the new view
QString
widgetNames
=
settings
.
value
(
_getWindowStateKey
()
+
"WIDGETS"
,
defaultWidgets
).
toString
();
QString
widgetNames
=
settings
.
value
(
_getWindowStateKey
()
+
"WIDGETS"
,
defaultWidgets
).
toString
();
qDebug
()
<<
widgetNames
;
qDebug
()
<<
widgetNames
;
...
@@ -829,21 +845,6 @@ void MainWindow::_loadCurrentViewState(void)
...
@@ -829,21 +845,6 @@ void MainWindow::_loadCurrentViewState(void)
emit
repaintCanvas
();
emit
repaintCanvas
();
}
}
void
MainWindow
::
_hideAllDockWidgets
(
void
)
{
foreach
(
QDockWidget
*
dockWidget
,
_mapName2DockWidget
)
{
dockWidget
->
setVisible
(
false
);
}
}
void
MainWindow
::
_showDockWidgetAction
(
bool
show
)
{
QAction
*
action
=
dynamic_cast
<
QAction
*>
(
QObject
::
sender
());
Q_ASSERT
(
action
);
_showDockWidget
(
action
->
data
().
toString
(),
show
);
}
void
MainWindow
::
loadAnalyzeView
()
void
MainWindow
::
loadAnalyzeView
()
{
{
if
(
_currentView
!=
VIEW_ANALYZE
)
if
(
_currentView
!=
VIEW_ANALYZE
)
...
...
src/ui/MainWindow.h
View file @
696643ab
...
@@ -41,7 +41,6 @@ This file is part of the QGROUNDCONTROL project
...
@@ -41,7 +41,6 @@ This file is part of the QGROUNDCONTROL project
#include "LinkManager.h"
#include "LinkManager.h"
#include "LinkInterface.h"
#include "LinkInterface.h"
#include "UASInterface.h"
#include "UASInterface.h"
#include "UASInfoWidget.h"
#include "CameraView.h"
#include "CameraView.h"
#if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX)
#if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX)
#include "Mouse6dofInput.h"
#include "Mouse6dofInput.h"
...
@@ -53,16 +52,13 @@ This file is part of the QGROUNDCONTROL project
...
@@ -53,16 +52,13 @@ This file is part of the QGROUNDCONTROL project
#include "QGCMAVLinkInspector.h"
#include "QGCMAVLinkInspector.h"
#include "QGCMAVLinkLogPlayer.h"
#include "QGCMAVLinkLogPlayer.h"
#include "MAVLinkDecoder.h"
#include "MAVLinkDecoder.h"
#include "QGCUASFileViewMulti.h"
#include "Vehicle.h"
#include "Vehicle.h"
class
QGCMAVLinkMessageSender
;
class
QGCFirmwareUpdate
;
class
QGCFirmwareUpdate
;
class
QSplashScreen
;
class
QSplashScreen
;
class
QGCStatusBar
;
class
QGCStatusBar
;
class
Linecharts
;
class
Linecharts
;
class
QGCDataPlot2D
;
class
QGCDataPlot2D
;
class
QGCUASFileViewMulti
;
/**
/**
* @brief Main Application Window
* @brief Main Application Window
...
@@ -212,19 +208,11 @@ protected:
...
@@ -212,19 +208,11 @@ protected:
// Center widgets
// Center widgets
QPointer
<
Linecharts
>
linechartWidget
;
QPointer
<
Linecharts
>
linechartWidget
;
#ifdef QGC_OSG_ENABLED
QPointer
<
QWidget
>
q3DWidget
;
#endif
QPointer
<
QGCFirmwareUpdate
>
firmwareUpdateWidget
;
QPointer
<
MainToolBar
>
_mainToolBar
;
QPointer
<
MainToolBar
>
_mainToolBar
;
QPointer
<
QDockWidget
>
mavlinkInspectorWidget
;
QPointer
<
MAVLinkDecoder
>
mavlinkDecoder
;
QPointer
<
MAVLinkDecoder
>
mavlinkDecoder
;
QPointer
<
QDockWidget
>
mavlinkSenderWidget
;
QGCMAVLinkLogPlayer
*
logPlayer
;
QGCMAVLinkLogPlayer
*
logPlayer
;
QPointer
<
QGCUASFileViewMulti
>
fileWidget
;
#ifdef QGC_MOUSE_ENABLED_WIN
#ifdef QGC_MOUSE_ENABLED_WIN
/** @brief 3d Mouse support (WIN only) */
/** @brief 3d Mouse support (WIN only) */
Mouse3DInput
*
mouseInput
;
///< 3dConnexion 3dMouse SDK
Mouse3DInput
*
mouseInput
;
///< 3dConnexion 3dMouse SDK
...
@@ -251,15 +239,17 @@ protected:
...
@@ -251,15 +239,17 @@ protected:
QTimer
windowNameUpdateTimer
;
QTimer
windowNameUpdateTimer
;
private
slots
:
private
slots
:
void
_showDockWidgetAction
(
bool
show
);
void
_linkStateChange
(
LinkInterface
*
);
void
_linkStateChange
(
LinkInterface
*
);
void
_closeWindow
(
void
)
{
close
();
}
void
_vehicleAdded
(
Vehicle
*
vehicle
);
#ifndef __mobile__
void
_showDockWidgetAction
(
bool
show
);
#endif
#ifdef UNITTEST_BUILD
#ifdef UNITTEST_BUILD
void
_showQmlTestWidget
(
void
);
void
_showQmlTestWidget
(
void
);
#endif
#endif
void
_closeWindow
(
void
)
{
close
();
}
private
slots
:
void
_vehicleAdded
(
Vehicle
*
vehicle
);
private:
private:
/// Constructor is private since all creation should be through MainWindow::_create
/// Constructor is private since all creation should be through MainWindow::_create
...
@@ -272,10 +262,9 @@ private:
...
@@ -272,10 +262,9 @@ private:
QPointer
<
QWidget
>
_flightView
;
QPointer
<
QWidget
>
_flightView
;
QPointer
<
QWidget
>
_setupView
;
QPointer
<
QWidget
>
_setupView
;
QPointer
<
QWidget
>
_analyzeView
;
QPointer
<
QWidget
>
_analyzeView
;
QPointer
<
QWidget
>
_simView
;
QPointer
<
QWidget
>
_terminalView
;
QPointer
<
QWidget
>
_missionEditorView
;
QPointer
<
QWidget
>
_missionEditorView
;
#ifndef __mobile__
// Dock widget names
// Dock widget names
static
const
char
*
_mavlinkDockWidgetName
;
static
const
char
*
_mavlinkDockWidgetName
;
static
const
char
*
_customCommandWidgetName
;
static
const
char
*
_customCommandWidgetName
;
...
@@ -288,23 +277,25 @@ private:
...
@@ -288,23 +277,25 @@ private:
QMap
<
QString
,
QDockWidget
*>
_mapName2DockWidget
;
QMap
<
QString
,
QDockWidget
*>
_mapName2DockWidget
;
QMap
<
QDockWidget
*
,
QAction
*>
_mapDockWidget2Action
;
QMap
<
QDockWidget
*
,
QAction
*>
_mapDockWidget2Action
;
#endif
void
_buildPlanView
(
void
);
void
_buildPlanView
(
void
);
void
_buildFlightView
(
void
);
void
_buildFlightView
(
void
);
void
_buildSetupView
(
void
);
void
_buildSetupView
(
void
);
void
_buildAnalyzeView
(
void
);
void
_buildAnalyzeView
(
void
);
void
_buildSimView
(
void
);
void
_buildTerminalView
(
void
);
void
_buildTerminalView
(
void
);
void
_buildMissionEditorView
(
void
);
void
_buildMissionEditorView
(
void
);
void
_storeCurrentViewState
(
void
);
void
_storeCurrentViewState
(
void
);
void
_loadCurrentViewState
(
void
);
void
_loadCurrentViewState
(
void
);
#ifndef __mobile__
void
_createDockWidget
(
const
QString
&
title
,
const
QString
&
name
,
Qt
::
DockWidgetArea
area
,
QWidget
*
innerWidget
);
void
_createDockWidget
(
const
QString
&
title
,
const
QString
&
name
,
Qt
::
DockWidgetArea
area
,
QWidget
*
innerWidget
);
void
_createInnerDockWidget
(
const
QString
&
widgetName
);
void
_createInnerDockWidget
(
const
QString
&
widgetName
);
void
_buildCommonWidgets
(
void
);
void
_buildCommonWidgets
(
void
);
void
_hideAllDockWidgets
(
void
);
void
_hideAllDockWidgets
(
void
);
void
_showDockWidget
(
const
QString
&
name
,
bool
show
);
void
_showDockWidget
(
const
QString
&
name
,
bool
show
);
#endif
bool
_autoReconnect
;
bool
_autoReconnect
;
bool
_lowPowerMode
;
///< If enabled, QGC reduces the update rates of all widgets
bool
_lowPowerMode
;
///< If enabled, QGC reduces the update rates of all widgets
...
...
src/ui/QGCMainWindowAPConfigurator.cc
deleted
100644 → 0
View file @
13a187b8
#include "QGCMainWindowAPConfigurator.h"
QGCMainWindowAPConfigurator
::
QGCMainWindowAPConfigurator
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
src/ui/QGCMainWindowAPConfigurator.h
deleted
100644 → 0
View file @
13a187b8
#ifndef QGCMAINWINDOWAPCONFIGURATOR_H
#define QGCMAINWINDOWAPCONFIGURATOR_H
#include <QObject>
class
QGCMainWindowAPConfigurator
:
public
QObject
{
Q_OBJECT
public:
explicit
QGCMainWindowAPConfigurator
(
QObject
*
parent
=
0
);
signals:
public
slots
:
};
#endif // QGCMAINWINDOWAPCONFIGURATOR_H
src/ui/linechart/Linecharts.cc
View file @
696643ab
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
#include "Linecharts.h"
#include "Linecharts.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
#include "MainWindow.h"
#include "MainWindow.h"
#include "UAS.h"
Linecharts
::
Linecharts
(
QWidget
*
parent
)
:
Linecharts
::
Linecharts
(
QWidget
*
parent
)
:
QStackedWidget
(
parent
),
QStackedWidget
(
parent
),
...
...
src/ui/mavlink/QGCMAVLinkMessageSender.cc
deleted
100644 → 0
View file @
13a187b8
#include "QGCMAVLinkMessageSender.h"
#include "ui_QGCMAVLinkMessageSender.h"
#include "MAVLinkProtocol.h"
QGCMAVLinkMessageSender
::
QGCMAVLinkMessageSender
(
MAVLinkProtocol
*
mavlink
,
QWidget
*
parent
)
:
QWidget
(
parent
),
protocol
(
mavlink
),
ui
(
new
Ui
::
QGCMAVLinkMessageSender
)
{
ui
->
setupUi
(
this
);
mavlink_message_info_t
msg
[
256
]
=
MAVLINK_MESSAGE_INFO
;
memcpy
(
messageInfo
,
msg
,
sizeof
(
mavlink_message_info_t
)
*
256
);
QStringList
header
;
header
<<
tr
(
"Name"
);
header
<<
tr
(
"Value"
);
header
<<
tr
(
"Type"
);
ui
->
treeWidget
->
setHeaderLabels
(
header
);
createTreeView
();
connect
(
&
refreshTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
refresh
()));
//refreshTimer.start(1000); // Refresh at 1 Hz interval
connect
(
ui
->
sendButton
,
SIGNAL
(
pressed
()),
this
,
SLOT
(
sendMessage
()));
}
void
QGCMAVLinkMessageSender
::
refresh
()
{
// Send messages
foreach
(
unsigned
int
i
,
managementItems
.
keys
())
{
if
(
!
sendTimers
.
contains
(
i
))
{
//sendTimers.insert(i, new QTimer())
}
}
// ui->treeWidget->topLevelItem(0)->children();
}
bool
QGCMAVLinkMessageSender
::
sendMessage
()
{
return
sendMessage
(
ui
->
messageIdSpinBox
->
value
());
}
bool
QGCMAVLinkMessageSender
::
sendMessage
(
unsigned
int
msgid
)
{
QString
msgname
(
messageInfo
[
msgid
].
name
);
if
(
msgid
==
0
||
msgid
>
255
||
messageInfo
[
msgid
].
name
==
NULL
||
msgname
.
compare
(
QString
(
"EMPTY"
)))
{
return
false
;
}
bool
result
=
true
;
if
(
treeWidgetItems
.
contains
(
msgid
))
{
// Fill message fields
mavlink_message_t
msg
;
QList
<
QTreeWidgetItem
*>
fields
;
// = treeWidgetItems.value(msgid)->;
for
(
unsigned
int
i
=
0
;
i
<
messageInfo
[
msgid
].
num_fields
;
++
i
)
{
QTreeWidgetItem
*
field
=
fields
.
at
(
i
);
int
fieldid
=
i
;
uint8_t
*
m
=
((
uint8_t
*
)(
&
msg
))
+
8
;
switch
(
messageInfo
[
msgid
].
fields
[
fieldid
].
type
)
{
case
MAVLINK_TYPE_CHAR
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
char
*
str
=
(
char
*
)(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
// Copy data
QString
string
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
();
// Copy string size
int
len
=
qMin
((
unsigned
int
)
string
.
length
(),
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
);
memcpy
(
str
,
string
.
toStdString
().
c_str
(),
len
);
// Enforce null termination
str
[
len
-
1
]
=
'\0'
;
}
else
{
// Single char
char
*
b
=
((
char
*
)(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
));
*
b
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toChar
().
toLatin1
();
}
break
;
case
MAVLINK_TYPE_UINT8_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
uint8_t
*
nums
=
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toInt
();
}
}
}
else
{
// Single value
uint8_t
*
u
=
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toChar
().
toLatin1
();
}
break
;
case
MAVLINK_TYPE_INT8_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
int8_t
*
nums
=
reinterpret_cast
<
int8_t
*>
((
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
));
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toInt
();
}
}
}
else
{
// Single value
int8_t
*
u
=
reinterpret_cast
<
int8_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toChar
().
toLatin1
();
}
break
;
case
MAVLINK_TYPE_INT16_T
:
case
MAVLINK_TYPE_UINT16_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
uint16_t
*
nums
=
reinterpret_cast
<
uint16_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toUInt
();
}
}
}
else
{
// Single value
uint16_t
*
u
=
reinterpret_cast
<
uint16_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toUInt
();
}
break
;
case
MAVLINK_TYPE_INT32_T
:
case
MAVLINK_TYPE_UINT32_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
int32_t
*
nums
=
reinterpret_cast
<
int32_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toUInt
();
}
}
}
else
{
// Single value
int32_t
*
u
=
reinterpret_cast
<
int32_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toUInt
();
}
break
;
case
MAVLINK_TYPE_INT64_T
:
case
MAVLINK_TYPE_UINT64_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
int64_t
*
nums
=
reinterpret_cast
<
int64_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toULongLong
();
}
}
}
else
{
// Single value
int64_t
*
u
=
reinterpret_cast
<
int64_t
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toULongLong
();
}
break
;
case
MAVLINK_TYPE_FLOAT
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
float
*
nums
=
reinterpret_cast
<
float
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toFloat
();
}
}
}
else
{
// Single value
float
*
u
=
reinterpret_cast
<
float
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toFloat
();
}
break
;
case
MAVLINK_TYPE_DOUBLE
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
double
*
nums
=
reinterpret_cast
<
double
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
if
((
unsigned
int
)(
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
size
())
>
j
)
{
nums
[
j
]
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toString
().
split
(
" "
).
at
(
j
).
toDouble
();
}
}
}
else
{
// Single value
double
*
u
=
reinterpret_cast
<
double
*>
(
m
+
messageInfo
[
msgid
].
fields
[
fieldid
].
wire_offset
);
*
u
=
field
->
data
(
1
,
Qt
::
DisplayRole
).
toDouble
();
}
break
;
}
}
// Send message
protocol
->
sendMessage
(
msg
);
}
else
{
result
=
false
;
}
return
result
;
}
QGCMAVLinkMessageSender
::~
QGCMAVLinkMessageSender
()
{
delete
ui
;
}
void
QGCMAVLinkMessageSender
::
createTreeView
()
{
for
(
int
i
=
0
;
i
<
256
;
++
i
)
//mavlink_message_t msg, receivedMessages)
{
// Update the tree view
QString
messageName
(
"%1 (%2 Hz, #%3)"
);
float
msgHz
=
messagesHz
.
value
(
i
,
0
);
// Ignore non-existent messages
if
(
QString
(
messageInfo
[
i
].
name
)
==
"EMPTY"
)
continue
;
messageName
=
messageName
.
arg
(
messageInfo
[
i
].
name
).
arg
(
msgHz
,
3
,
'f'
,
1
).
arg
(
i
);
if
(
!
treeWidgetItems
.
contains
(
i
))
{
QStringList
fields
;
fields
<<
messageName
;
QTreeWidgetItem
*
widget
=
new
QTreeWidgetItem
(
fields
);
widget
->
setFirstColumnSpanned
(
true
);
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
i
].
num_fields
;
++
j
)
{
QTreeWidgetItem
*
field
=
new
QTreeWidgetItem
();
widget
->
addChild
(
field
);
}
treeWidgetItems
.
insert
(
i
,
widget
);
ui
->
treeWidget
->
addTopLevelItem
(
widget
);
QTreeWidgetItem
*
message
=
widget
;
//treeWidgetItems.value(msg->msgid);
message
->
setFirstColumnSpanned
(
true
);
message
->
setData
(
0
,
Qt
::
DisplayRole
,
QVariant
(
messageName
));
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
i
].
num_fields
;
++
j
)
{
createField
(
i
,
j
,
message
->
child
(
j
));
}
// Add management fields, such as update rate and send button
// QTreeWidgetItem* management = new QTreeWidgetItem();
// widget->addChild(management);
// management->setData(0, Qt::DisplayRole, "Rate:");
// management->setData(1, Qt::DisplayRole, 0);
// management->setData(2, Qt::DisplayRole, "Hz");
// managementItems.insert(i, management);
}
}
}
void
QGCMAVLinkMessageSender
::
createField
(
int
msgid
,
int
fieldid
,
QTreeWidgetItem
*
item
)
{
// Add field tree widget item
item
->
setData
(
0
,
Qt
::
DisplayRole
,
QVariant
(
messageInfo
[
msgid
].
fields
[
fieldid
].
name
));
//uint8_t* m = ((uint8_t*)(receivedMessages+msgid))+8;
switch
(
messageInfo
[
msgid
].
fields
[
fieldid
].
type
)
{
case
MAVLINK_TYPE_CHAR
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"char"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
""
);
}
else
{
// Single char
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"char[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
""
);
}
break
;
case
MAVLINK_TYPE_UINT8_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"uint8_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"uint8_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0
);
}
break
;
case
MAVLINK_TYPE_INT8_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"int8_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"int8_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0
);
}
break
;
case
MAVLINK_TYPE_UINT16_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"uint16_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"uint16_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0
);
}
break
;
case
MAVLINK_TYPE_INT16_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"int16_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"int16_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0
);
}
break
;
case
MAVLINK_TYPE_UINT32_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"uint32_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"uint32_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0
);
}
break
;
case
MAVLINK_TYPE_INT32_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"int32_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"int32_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0
);
}
break
;
case
MAVLINK_TYPE_FLOAT
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0.0
f
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"float[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"float"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0.0
f
);
}
break
;
case
MAVLINK_TYPE_DOUBLE
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"double[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"double"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
0.0
);
}
break
;
case
MAVLINK_TYPE_UINT64_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"uint64_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"uint64_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
(
quint64
)
0
);
}
break
;
case
MAVLINK_TYPE_INT64_T
:
if
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
>
0
)
{
// Enforce null termination
QString
tmp
(
"%1, "
);
QString
string
;
for
(
unsigned
int
j
=
0
;
j
<
messageInfo
[
msgid
].
fields
[
j
].
array_length
;
++
j
)
{
string
+=
tmp
.
arg
(
0
);
}
item
->
setData
(
2
,
Qt
::
DisplayRole
,
QString
(
"int64_t[%1]"
).
arg
(
messageInfo
[
msgid
].
fields
[
fieldid
].
array_length
));
item
->
setData
(
1
,
Qt
::
DisplayRole
,
string
);
}
else
{
// Single value
item
->
setData
(
2
,
Qt
::
DisplayRole
,
"int64_t"
);
item
->
setData
(
1
,
Qt
::
DisplayRole
,
(
qint64
)
0
);
}
break
;
}
}
src/ui/mavlink/QGCMAVLinkMessageSender.h
deleted
100644 → 0
View file @
13a187b8
#ifndef QGCMAVLINKMESSAGESENDER_H
#define QGCMAVLINKMESSAGESENDER_H
#include <QWidget>
#include <QTreeWidgetItem>
#include <QMap>
#include <QTimer>
#include "MAVLinkProtocol.h"
namespace
Ui
{
class
QGCMAVLinkMessageSender
;
}
class
QGCMAVLinkMessageSender
:
public
QWidget
{
Q_OBJECT
friend
class
QTimer
;
public:
explicit
QGCMAVLinkMessageSender
(
MAVLinkProtocol
*
mavlink
,
QWidget
*
parent
=
0
);
~
QGCMAVLinkMessageSender
();
public
slots
:
/** @brief Send message currently selected in ui, taking values from tree view */
bool
sendMessage
();
protected:
mavlink_message_info_t
messageInfo
[
256
];
///< Meta information about all messages
MAVLinkProtocol
*
protocol
;
///< MAVLink protocol
QMap
<
int
,
float
>
messagesHz
;
///< Used to store update rate in Hz
QTimer
refreshTimer
;
QMap
<
unsigned
int
,
QTimer
*>
sendTimers
;
QMap
<
unsigned
int
,
QTreeWidgetItem
*>
managementItems
;
QMap
<
unsigned
int
,
QTreeWidgetItem
*>
treeWidgetItems
;
///< Messages
/** @brief Create the tree view of all messages */
void
createTreeView
();
/** @brief Create one field of one message in the tree view of all messages */
void
createField
(
int
msgid
,
int
fieldid
,
QTreeWidgetItem
*
item
);
/** @brief Send message with values taken from tree view */
bool
sendMessage
(
unsigned
int
id
);
protected
slots
:
/** @brief Read / display values in UI */
void
refresh
();
private:
Ui
::
QGCMAVLinkMessageSender
*
ui
;
};
#endif // QGCMAVLINKMESSAGESENDER_H
src/ui/mavlink/QGCMAVLinkMessageSender.ui
deleted
100644 → 0
View file @
13a187b8
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
QGCMAVLinkMessageSender
</class>
<widget
class=
"QWidget"
name=
"QGCMAVLinkMessageSender"
>
<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"
>
<property
name=
"margin"
>
<number>
6
</number>
</property>
<item
row=
"0"
column=
"0"
colspan=
"2"
>
<widget
class=
"QTreeWidget"
name=
"treeWidget"
>
<column>
<property
name=
"text"
>
<string
notr=
"true"
>
1
</string>
</property>
</column>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QSpinBox"
name=
"messageIdSpinBox"
/>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QPushButton"
name=
"sendButton"
>
<property
name=
"text"
>
<string>
Send Message
</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
src/ui/toolbar/MainToolBar.cc
View file @
696643ab
...
@@ -38,6 +38,7 @@ This file is part of the QGROUNDCONTROL project
...
@@ -38,6 +38,7 @@ This file is part of the QGROUNDCONTROL project
#include "FlightDisplayView.h"
#include "FlightDisplayView.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
#include "UAS.h"
MainToolBar
::
MainToolBar
(
QWidget
*
parent
)
MainToolBar
::
MainToolBar
(
QWidget
*
parent
)
:
QGCQmlWidgetHolder
(
parent
)
:
QGCQmlWidgetHolder
(
parent
)
...
...
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