Commit e1616d01 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #906 from DonLakeFlyer/RemoveAPM

Remove unreachable APM code
parents 6cb8eb14 14998d64
......@@ -39,12 +39,10 @@ WindowsBuild {
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\files\" \"$$DESTDIR_COPY_RESOURCE_LIST\\files\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\qml\" \"$$DESTDIR_COPY_RESOURCE_LIST\\qml\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\data\" \"$$DESTDIR_COPY_RESOURCE_LIST\\data\"
} else {
# Make sure to keep both side of this if using the same set of directories
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/files $$DESTDIR_COPY_RESOURCE_LIST
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/qml $$DESTDIR_COPY_RESOURCE_LIST
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/data $$DESTDIR_COPY_RESOURCE_LIST
}
......
......@@ -113,8 +113,7 @@ QT += network \
serialport \
sql \
printsupport \
webkitwidgets \
quick
webkitwidgets
# testlib is needed even in release flavor for QSignalSpy support
QT += testlib
......@@ -324,38 +323,11 @@ FORMS += \
src/ui/uas/QGCMessageView.ui \
src/ui/JoystickButton.ui \
src/ui/JoystickAxis.ui \
src/ui/configuration/ApmHardwareConfig.ui \
src/ui/configuration/ApmSoftwareConfig.ui \
src/ui/configuration/FrameTypeConfig.ui \
src/ui/configuration/CompassConfig.ui \
src/ui/configuration/AccelCalibrationConfig.ui \
src/ui/configuration/RadioCalibrationConfig.ui \
src/ui/configuration/FlightModeConfig.ui \
src/ui/configuration/Radio3DRConfig.ui \
src/ui/configuration/BatteryMonitorConfig.ui \
src/ui/configuration/SonarConfig.ui \
src/ui/configuration/AirspeedConfig.ui \
src/ui/configuration/OpticalFlowConfig.ui \
src/ui/configuration/OsdConfig.ui \
src/ui/configuration/AntennaTrackerConfig.ui \
src/ui/configuration/CameraGimbalConfig.ui \
src/ui/configuration/BasicPidConfig.ui \
src/ui/configuration/StandardParamConfig.ui \
src/ui/configuration/GeoFenceConfig.ui \
src/ui/configuration/FailSafeConfig.ui \
src/ui/configuration/AdvancedParamConfig.ui \
src/ui/configuration/ArduCopterPidConfig.ui \
src/ui/configuration/ApmPlaneLevel.ui \
src/ui/configuration/ParamWidget.ui \
src/ui/configuration/ArduPlanePidConfig.ui \
src/ui/configuration/AdvParameterList.ui \
src/ui/configuration/ArduRoverPidConfig.ui \
src/ui/QGCConfigView.ui \
src/ui/main/QGCViewModeSelection.ui \
src/ui/main/QGCWelcomeMainWindow.ui \
src/ui/configuration/terminalconsole.ui \
src/ui/configuration/SerialSettingsDialog.ui \
src/ui/configuration/ApmFirmwareConfig.ui \
src/ui/px4_configuration/QGCPX4AirframeConfig.ui \
src/ui/px4_configuration/QGCPX4MulticopterConfig.ui \
src/ui/px4_configuration/QGCPX4SensorCalibration.ui \
......@@ -411,7 +383,6 @@ HEADERS += \
src/ui/QGCSensorSettingsWidget.h \
src/ui/linechart/Linecharts.h \
src/uas/PxQuadMAV.h \
src/uas/ArduPilotMegaMAV.h \
src/uas/senseSoarMAV.h \
src/ui/watchdog/WatchdogControl.h \
src/ui/watchdog/WatchdogProcessView.h \
......@@ -503,34 +474,6 @@ HEADERS += \
src/ui/uas/QGCMessageView.h \
src/ui/JoystickButton.h \
src/ui/JoystickAxis.h \
src/ui/configuration/ApmHardwareConfig.h \
src/ui/configuration/ApmSoftwareConfig.h \
src/ui/configuration/FrameTypeConfig.h \
src/ui/configuration/CompassConfig.h \
src/ui/configuration/AccelCalibrationConfig.h \
src/ui/configuration/RadioCalibrationConfig.h \
src/ui/configuration/FlightModeConfig.h \
src/ui/configuration/Radio3DRConfig.h \
src/ui/configuration/BatteryMonitorConfig.h \
src/ui/configuration/SonarConfig.h \
src/ui/configuration/AirspeedConfig.h \
src/ui/configuration/OpticalFlowConfig.h \
src/ui/configuration/OsdConfig.h \
src/ui/configuration/AntennaTrackerConfig.h \
src/ui/configuration/CameraGimbalConfig.h \
src/ui/configuration/AP2ConfigWidget.h \
src/ui/configuration/BasicPidConfig.h \
src/ui/configuration/StandardParamConfig.h \
src/ui/configuration/GeoFenceConfig.h \
src/ui/configuration/FailSafeConfig.h \
src/ui/configuration/AdvancedParamConfig.h \
src/ui/configuration/ArduCopterPidConfig.h \
src/ui/apmtoolbar.h \
src/ui/configuration/ApmPlaneLevel.h \
src/ui/configuration/ParamWidget.h \
src/ui/configuration/ArduPlanePidConfig.h \
src/ui/configuration/AdvParameterList.h \
src/ui/configuration/ArduRoverPidConfig.h \
src/ui/QGCConfigView.h \
src/ui/main/QGCViewModeSelection.h \
src/ui/main/QGCWelcomeMainWindow.h \
......@@ -538,7 +481,6 @@ HEADERS += \
src/ui/configuration/SerialSettingsDialog.h \
src/ui/configuration/terminalconsole.h \
src/ui/configuration/ApmHighlighter.h \
src/ui/configuration/ApmFirmwareConfig.h \
src/uas/UASParameterDataModel.h \
src/uas/UASParameterCommsMgr.h \
src/ui/QGCPendingParamWidget.h \
......@@ -602,7 +544,6 @@ SOURCES += \
src/ui/QGCSensorSettingsWidget.cc \
src/ui/linechart/Linecharts.cc \
src/uas/PxQuadMAV.cc \
src/uas/ArduPilotMegaMAV.cc \
src/uas/senseSoarMAV.cpp \
src/ui/watchdog/WatchdogControl.cc \
src/ui/watchdog/WatchdogProcessView.cc \
......@@ -691,34 +632,6 @@ SOURCES += \
src/ui/JoystickButton.cc \
src/ui/JoystickAxis.cc \
src/ui/uas/QGCMessageView.cc \
src/ui/configuration/ApmHardwareConfig.cc \
src/ui/configuration/ApmSoftwareConfig.cc \
src/ui/configuration/FrameTypeConfig.cc \
src/ui/configuration/CompassConfig.cc \
src/ui/configuration/AccelCalibrationConfig.cc \
src/ui/configuration/RadioCalibrationConfig.cc \
src/ui/configuration/FlightModeConfig.cc \
src/ui/configuration/Radio3DRConfig.cc \
src/ui/configuration/BatteryMonitorConfig.cc \
src/ui/configuration/SonarConfig.cc \
src/ui/configuration/AirspeedConfig.cc \
src/ui/configuration/OpticalFlowConfig.cc \
src/ui/configuration/OsdConfig.cc \
src/ui/configuration/AntennaTrackerConfig.cc \
src/ui/configuration/CameraGimbalConfig.cc \
src/ui/configuration/AP2ConfigWidget.cc \
src/ui/configuration/BasicPidConfig.cc \
src/ui/configuration/StandardParamConfig.cc \
src/ui/configuration/GeoFenceConfig.cc \
src/ui/configuration/FailSafeConfig.cc \
src/ui/configuration/AdvancedParamConfig.cc \
src/ui/configuration/ArduCopterPidConfig.cc \
src/ui/apmtoolbar.cpp \
src/ui/configuration/ApmPlaneLevel.cc \
src/ui/configuration/ParamWidget.cc \
src/ui/configuration/ArduPlanePidConfig.cc \
src/ui/configuration/AdvParameterList.cc \
src/ui/configuration/ArduRoverPidConfig.cc \
src/ui/QGCConfigView.cc \
src/ui/main/QGCViewModeSelection.cc \
src/ui/main/QGCWelcomeMainWindow.cc \
......@@ -726,7 +639,6 @@ SOURCES += \
src/ui/configuration/console.cpp \
src/ui/configuration/SerialSettingsDialog.cc \
src/ui/configuration/ApmHighlighter.cc \
src/ui/configuration/ApmFirmwareConfig.cc \
src/uas/UASParameterDataModel.cc \
src/uas/UASParameterCommsMgr.cc \
src/ui/QGCPendingParamWidget.cc \
......@@ -768,7 +680,6 @@ HEADERS += \
src/qgcunittest/MockMavlinkInterface.h \
src/qgcunittest/MockMavlinkFileServer.h \
src/qgcunittest/MultiSignalSpy.h \
src/qgcunittest/FlightModeConfigTest.h \
src/qgcunittest/FlightGearTest.h \
src/qgcunittest/TCPLinkTest.h \
src/qgcunittest/TCPLoopBackServer.h \
......@@ -782,7 +693,6 @@ SOURCES += \
src/qgcunittest/MockQGCUASParamManager.cc \
src/qgcunittest/MockMavlinkFileServer.cc \
src/qgcunittest/MultiSignalSpy.cc \
src/qgcunittest/FlightModeConfigTest.cc \
src/qgcunittest/FlightGearTest.cc \
src/qgcunittest/TCPLinkTest.cc \
src/qgcunittest/TCPLoopBackServer.cc \
......
import QtQuick 2.1
import "./components"
Rectangle {
id: toolbar
property alias backgroundColor : toolbar.color
property alias linkNameLabel: linkDevice.label
property alias baudrateLabel: baudrate.label
property bool connected: false
property bool armed: false
property string armedstr: "DISARMED"
width: toolbar.width
height: 72
color: "black"
border.color: "black"
onArmedChanged: {
if (armed) {
statusDisplay.statusText = "ARMED"
statusDisplay.statusTextColor = "red"
statusDisplay.statusBackgroundColor = "#FF880000"
}
else {
statusDisplay.statusText = "DISARMED"
statusDisplay.statusTextColor = "yellow"
statusDisplay.statusBackgroundColor = "black"
}
}
onConnectedChanged: {
if (connected){
console.log("APM Tool BAR QML: connected")
connectButton.image = "./resources/qgroundcontrol/toolbar/disconnect.png"
connectButton.label = "DISCONNECT"
} else {
console.log("APM Tool BAR QML: disconnected")
connectButton.image = "./resources/qgroundcontrol/toolbar/connect.png"
connectButton.label = "CONNECT"
}
}
// [BB] The code below should work, not sure why. replaced with code above
// Connections {
// target: globalObj
// onMAVConnected: {
// console.log("QML Change Connection " + connected)
// if (connected){
// console.log("connected")
// connectButton.image = "./resources/qgroundcontrol/toolbar/disconnect.png"
// } else {
// console.log("disconnected")
// connectButton.image = "./resources/qgroundcontrol/toolbar/connect.png"
// }
// }
// }
Row {
anchors.left: parent.left
spacing: 10
Rectangle { // Spacer
width: 5
height: parent.height
color: "black"
}
Button {
id: flightDataView
label: "FLIGHT DATA"
image: "./resources/qgroundcontrol/toolbar/flightdata.png"
onClicked: {
globalObj.triggerFlightView()
}
}
Button {
id: flightPlanView
label: "FLIGHT PLAN"
image: "./resources/qgroundcontrol/toolbar/flightplanner.png"
onClicked: globalObj.triggerFlightPlanView()
}
Button {
id: hardwareConfigView
label: "HARDWARE"
image: "./resources/qgroundcontrol/toolbar/hardwareconfig.png"
margins: 8
onClicked: globalObj.triggerHardwareView()
}
Button {
id: softwareConfigView
label: "SOFTWARE"
image: "./resources/qgroundcontrol/toolbar/softwareconfig.png"
margins: 8
onClicked: globalObj.triggerSoftwareView()
}
Button {
id: simulationView
label: "SIMULATION"
image: "./resources/qgroundcontrol/toolbar/simulation.png"
onClicked: globalObj.triggerSimulationView()
}
Button {
id: terminalView
label: "TERMINAL"
image: "./resources/qgroundcontrol/toolbar/terminal.png"
onClicked: globalObj.triggerTerminalView()
}
Rectangle { // Spacer
width: 5
height: parent.height
color: "black"
}
StatusDisplay {
id: statusDisplay
width: 110
statusText: "DISARMED"
statusTextColor: "yellow"
statusBackgroundColor: "black"
}
Rectangle { // Spacer
width: 5
height: parent.height
color: "black"
}
// [BB] Commented out ToolBar Status info work.
// WIP: To be fixed later
// DigitalDisplay { // Information Pane
// title:"Mode"
// textValue: "Stabilize"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Speed"
// textValue: "11.0m/s"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Alt"
// textValue: "20.0m"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Volts"
// textValue: "14.8V"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Current"
// textValue: "12.0A"
// color: "black"
// }
// DigitalDisplay { // Information Pane
// title: "Level"
// textValue: "77%"
// color: "black"
// }
}
Row {
anchors.right: parent.right
spacing: 2
TextButton {
id: linkDevice
label: "none"
minWidth: 100
onClicked: globalObj.showConnectionDialog()
}
TextButton {
id: baudrate
label: "none"
minWidth: 100
onClicked: globalObj.showConnectionDialog()
}
Rectangle {
width: 5
height: parent.height
color: "black"
}
Button {
id: connectButton
label: "CONNECT"
image: "./resources/qgroundcontrol/toolbar/connect.png"
onClicked: globalObj.connectMAV()
}
Rectangle { // Spacer
width: 5
height: parent.height
color: "black"
}
}
}
import QtQuick 2.1
Rectangle {
signal clicked
property string label: "button label"
property alias image: buttonImage.source
property int margins: 2
id: button
width: 72
height: 72
radius: 3
smooth: true
border.width: 2
Text {
id: buttonLabel
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: 5
text: label
color: "white"
font.pointSize: 10
}
Image {
id: buttonImage
anchors.horizontalCenter: button.horizontalCenter
anchors.top: buttonLabel.bottom
anchors.margins: margins
source: image
fillMode: Image.PreserveAspectFit
width: image.width
height: image.height
}
signal buttonClick()
onButtonClick: {
console.log(buttonLabel.text + " clicked calling signal")
clicked()
}
// Highlighting and ativation section
property color buttonColor: "black"
property color onHoverbuttonColor: "lightblue"
property color onHoverColor: "darkblue"
property color borderColor: "black"
MouseArea {
id: buttonMouseArea
anchors.fill: parent
onClicked: buttonClick()
hoverEnabled: true
onEntered: {
parent.border.color = onHoverColor
parent.color = onHoverbuttonColor
}
onExited: {
parent.border.color = borderColor
parent.color = buttonColor
}
onPressed: parent.color = Qt.darker(onHoverbuttonColor, 1.5)
onReleased: parent.color = buttonColor
}
color: buttonColor
border.color: borderColor
}
import QtQuick 2.1
Rectangle {
property alias title: displayTitle.text
property string textValue: "none"
width: 110
height: parent.height/3
anchors.verticalCenter: parent.verticalCenter
border.color: "white"
Text {
id:displayTitle
anchors.left: parent.left
anchors.leftMargin: 3
anchors.verticalCenter: parent.verticalCenter
text: "blank"
color: "white"
}
Text {
id:displayValue
anchors.right: parent.right
anchors.rightMargin: 3
anchors.verticalCenter: parent.verticalCenter
text: textValue
color: "white"
}
}
import QtQuick 2.1
Rectangle {
id: statusDisplay
property alias statusText: armedText.text
property alias statusTextColor: armedText.color
property alias statusBackgroundColor: statusDisplay.color
width: 100
height: parent.height/3
anchors.verticalCenter: parent.verticalCenter
radius: 3
border.color: "white"
border.width: 1
Text {
id: armedText
anchors.centerIn: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 20
}
}
import QtQuick 2.1
Rectangle {
signal clicked
property string label: "Text Button label"
property int minWidth: 75
property int minHeight: 0
property int margin: 5
width: textBox.width
height: 72
anchors.verticalCenter: parent.verticalCenter
color: "black"
signal buttonClick()
onButtonClick: {
console.log(label + " clicked calling signal")
clicked()
}
// Highlighting and ativation section
property color buttonColor: "black"
property color onHoverbuttonColor: "lightblue"
property color onHoverColor: "darkblue"
property color borderColor: "white"
Rectangle {
width: textButtonLabel.paintedwidth
anchors.centerIn: parent
Rectangle{
id: textBox
anchors.centerIn: parent
width: minWidth > textButtonLabel.paintedWidth + margin ? minWidth : textButtonLabel.paintedWidth + margin
height: minHeight > textButtonLabel.paintedHeight + margin ? minHeight : textButtonLabel.paintedHeight + margin
Text {
id: textButtonLabel
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.margins: 2
text: label
color: "white"
font.pointSize: 11
}
MouseArea {
id: textButtonMouseArea
anchors.fill: parent
onClicked: buttonClick()
hoverEnabled: true
onEntered: {
parent.border.color = onHoverColor
parent.color = onHoverbuttonColor
}
onExited: {
parent.border.color = borderColor
parent.color = buttonColor
}
onPressed: parent.color = Qt.darker(onHoverbuttonColor, 1.5)
onReleased: parent.color = buttonColor
}
color: buttonColor
border.color: borderColor
border.width: 1
}
}
}
......@@ -25,7 +25,6 @@
#include "UASInterface.h"
#include "UAS.h"
#include "PxQuadMAV.h"
#include "ArduPilotMegaMAV.h"
#include "configuration.h"
#include "LinkManager.h"
#include "QGCMAVLink.h"
......
......@@ -585,28 +585,6 @@ void MAVLinkSimulationLink::mainloop()
memcpy(stream+streampointer, buffer, bufferlength);
streampointer += bufferlength;
// // HEARTBEAT VEHICLE 2
// // Pack message and get size of encoded byte string
// mavlink_msg_heartbeat_pack(54, componentId, &msg, MAV_HELICOPTER, MAV_AUTOPILOT_ARDUPILOTMEGA);
// // Allocate buffer with packet data
// bufferlength = mavlink_msg_to_send_buffer(buffer, &msg);
// //add data into datastream
// memcpy(stream+streampointer,buffer, bufferlength);
// streampointer += bufferlength;
// // HEARTBEAT VEHICLE 3
// // Pack message and get size of encoded byte string
// mavlink_msg_heartbeat_pack(60, componentId, &msg, MAV_FIXED_WING, MAV_AUTOPILOT_PIXHAWK);
// // Allocate buffer with packet data
// bufferlength = mavlink_msg_to_send_buffer(buffer, &msg);
// //add data into datastream
// memcpy(stream+streampointer,buffer, bufferlength);
// streampointer += bufferlength;
// Pack message and get size of encoded byte string
mavlink_msg_sys_status_encode(54, componentId, &msg, &status);
// Allocate buffer with packet data
......
......@@ -72,7 +72,7 @@ void MAVLinkSimulationMAV::mainloop()
// 1 Hz execution
if (timer1Hz <= 0) {
mavlink_message_t msg;
mavlink_msg_heartbeat_pack(systemid, MAV_COMP_ID_IMU, &msg, MAV_TYPE_FIXED_WING, MAV_AUTOPILOT_ARDUPILOTMEGA, MAV_MODE_GUIDED_ARMED, 0, MAV_STATE_ACTIVE);
mavlink_msg_heartbeat_pack(systemid, MAV_COMP_ID_IMU, &msg, MAV_TYPE_FIXED_WING, MAV_AUTOPILOT_PIXHAWK, MAV_MODE_GUIDED_ARMED, 0, MAV_STATE_ACTIVE);
link->sendMAVLinkMessage(&msg);
planner.handleMessage(msg);
......
This diff is collapsed.
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 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/>.
======================================================================*/