diff --git a/QGCExternalLibs.pri b/QGCExternalLibs.pri index 3e4df5ee33..e47ce01611 100644 --- a/QGCExternalLibs.pri +++ b/QGCExternalLibs.pri @@ -151,7 +151,7 @@ OSGDependency { message("Including support for OpenSceneGraph") DEFINES += QGC_OSG_ENABLED - + LIBS += \ -losg \ -losgViewer \ @@ -183,7 +183,7 @@ OSGDependency { src/ui/map3D/WaypointGroupNode.h \ src/ui/map3D/TerrainParamDialog.h \ src/ui/map3D/ImageryParamDialog.h - + SOURCES += \ src/ui/map3D/gpl.cc \ src/ui/map3D/CameraParams.cc \ @@ -394,7 +394,7 @@ WindowsBuild : win32 : exists(src/lib/opalrt/OpalApi.h) : exists(C:/OPAL-RT/RT-L DEFINES += OPAL_RT - INCLUDEPATH += + INCLUDEPATH += src/lib/opalrt libs/lib/opal/include \ @@ -466,7 +466,7 @@ WindowsCrossBuild { LinuxBuild { LIBS += \ - -lflite_cmu_us_kal16 \ + -lflite_cmu_us_kal \ -lflite_usenglish \ -lflite_cmulex \ -lflite diff --git a/QsLog/QsLogDestFile.cpp b/QsLog/QsLogDestFile.cpp index 3d1885fb3f..1d6b213d46 100644 --- a/QsLog/QsLogDestFile.cpp +++ b/QsLog/QsLogDestFile.cpp @@ -122,10 +122,10 @@ void QsLogging::SizeRotationStrategy::setBackupCount(int backups) QsLogging::LaunchRotationStrategy::LaunchRotationStrategy() - : mCurrentSizeInBytes(0) + : mFirstFile(true) + , mCurrentSizeInBytes(0) , mMaxSizeInBytes(0) , mBackupsCount(0) - , mFirstFile(true) { } diff --git a/apmplanner_core.pro b/apmplanner_core.pro new file mode 100644 index 0000000000..9a454d4d5e --- /dev/null +++ b/apmplanner_core.pro @@ -0,0 +1,923 @@ +# ------------------------------------------------- +# APM Planner - Micro Air Vehicle Groundstation +# Please see our website at +# Maintainer: +# Bill Bonney +# Based of QGroundControl by Lorenz Meier +# +# (c) 2009-2011 QGroundControl Developers +# (c) 2013 Bill Bonney +# (c) 2013 Michael Carpenter +# +# This file is part of the open groundstation project +# APM Planner 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. +# APM Planner 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 . +# ------------------------------------------------- + + +message(Qt version $$[QT_VERSION]) + +# Setup our supported build types. We do this once here and then use the defined config scopes +# to allow us to easily modify suported build types in one place instead of duplicated throughout +# the project file. + +linux-g++-64 { + message(Linux build x64_86) + CONFIG += LinuxBuild + DEFINES += Q_LINUX_64 + DISTRO = $$system(lsb_release -i) + contains( DISTRO, "Ubuntu" ) { + DEFINES += Q_UBUNTU + } +} else: linux-g++ | linux-clang { + message(Linux build x86) + CONFIG += LinuxBuild + DEFINES += Q_LINUX_32 + DISTRO = $$system(lsb_release -i) + contains( DISTRO, "Ubuntu" ) { + DEFINES += Q_UBUNTU + } + +} else : win32-msvc2008 | win32-msvc2010 | win32-msvc2012 { + message(Windows build) + CONFIG += WindowsBuild +} else : win32-x-g++|win64-x-g++ { + message(Windows Cross Build) + CONFIG += WindowsCrossBuild +} else : macx-clang | macx-g++ { + message(Mac build) + CONFIG += MacBuild +} else { + error(Unsupported build type) +} + +# Setup our supported build flavors + +CONFIG(debug, debug|release) { + message(Debug flavor) + CONFIG += DebugBuild +} else:CONFIG(release, debug|release) { + message(Release flavor) + CONFIG += ReleaseBuild +} else { + error(Unsupported build flavor) +} + +# Setup our build directories + +BASEDIR = $${IN_PWD} +DebugBuild { + DESTDIR = $${OUT_PWD}/debug + BUILDDIR = $${OUT_PWD}/build-debug +} +ReleaseBuild { + DESTDIR = $${OUT_PWD}/release + BUILDDIR = $${OUT_PWD}/build-release +} +OBJECTS_DIR = $${BUILDDIR}/obj +MOC_DIR = $${BUILDDIR}/moc +UI_DIR = $${BUILDDIR}/ui +RCC_DIR = $${BUILDDIR}/rcc +LANGUAGE = C++ + +TEMPLATE = lib +TARGET = apmplanner-core + +message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET) + +# Qt configuration +CONFIG += qt \ + thread + +QT += network \ + opengl \ + svg \ + xml \ + sql \ + widgets \ + serialport \ + script\ + quick \ + printsupport \ + qml \ + quickwidgets + +## testlib is needed even in release flavor for QSignalSpy support +QT += testlib + +!NOTOUCH { + gittouch.commands = touch qgroundcontrol.pro + QMAKE_EXTRA_TARGETS += gittouch + POST_TARGETDEPS += gittouch +} + +# Turn off serial port warnings +DEFINES += _TTY_NOWARN_ + +#Turn on camera view +#DEFINES += AMERAVIEW +# +# Logging Library +# +include (QsLog/QsLog.pri) +#include (libs/mavlink/include/mavlink/v1.0-qt/mavlink.pri) +# +# OS Specific settings +# + +RaspberryPiBuild { + DEFINES -= CAMERAVIEW +} + +MacBuild { + QT += multimedia + + QMAKE_INFO_PLIST = Custom-Info.plist + CONFIG += x86_64 + CONFIG -= x86 +# QMAKE_MAC_SDK = macosx10.11 # Required for Xcode7.0 + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 + ICON = $$BASEDIR/files/APMIcons/icon.icns + QMAKE_INFO_PLIST = APMPlanner.plist # Sets the pretty name for the build + + DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) + DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) + + LIBS += -lz + LIBS += -lssl -lcrypto + LIBS += -framework ApplicationServices +} + +LinuxBuild { + DEFINES += __STDC_LIMIT_MACROS + + DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) + DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) + + LIBS += -lsndfile -lasound + LIBS += -lz + LIBS += -lssl -lcrypto + DEFINES += OPENSSL +} + +WindowsBuild { + DEFINES += __STDC_LIMIT_MACROS + + # Specify multi-process compilation within Visual Studio. + # (drastically improves compilation times for multi-core computers) + QMAKE_CXXFLAGS_DEBUG += -MP + QMAKE_CXXFLAGS_RELEASE += -MP + + # QWebkit is not needed on MS-Windows compilation environment + CONFIG -= webkit + + RC_FILE = $$BASEDIR/qgroundcontrol.rc + + DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) + DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) +} + +WindowsCrossBuild { + QT += script + # Windows version cross compiled on linux using + DEFINES += __STDC_LIMIT_MACROS + + # QWebkit is not needed on MS-Windows compilation environment + CONFIG -= webkit + + RC_FILE = $$BASEDIR/qgroundcontrol.rc + LIBS += -lz + CONFIG += exceptions rtti + + DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) + DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) +} + +# +# Build flavor specific settings +# + +DebugBuild { +#Let console be defined by the IDE/Build process. + #CONFIG += console +} + +ReleaseBuild { + DEFINES += QT_NO_DEBUG + + WindowsBuild { + # Use link time code generation for beteer optimization (I believe this is supported in msvc express, but not 100% sure) + QMAKE_LFLAGS_LTCG = /LTCG + QMAKE_CFLAGS_LTCG = -GL + } +} + +# +# External library configuration +# + +include(QGCExternalLibs.pri) + +# +# Post link configuration +# + +include(QGCSetup.pri) + +# +# Main QGroundControl portion of project file +# + +RESOURCES += qgroundcontrol.qrc + +TRANSLATIONS += \ + es-MX.ts \ + en-US.ts + +DEPENDPATH += \ + . \ + plugins + +INCLUDEPATH += . + +INCLUDEPATH += \ + src \ + src/ui \ + src/ui/linechart \ + src/ui/uas \ + src/ui/map \ + src/uas \ + src/comm \ + include/ui \ + src/input \ + src/lib/qmapcontrol \ + src/ui/mavlink \ + src/ui/param \ + src/ui/watchdog \ + src/ui/map3D \ + src/ui/mission \ + src/ui/designer \ + src/ui/configuration \ + src/output + +FORMS += \ + src/ui/MainWindow.ui \ + src/ui/CommSettings.ui \ + src/ui/SerialSettings.ui \ + src/ui/UASControl.ui \ + src/ui/UASList.ui \ + src/ui/UASInfo.ui \ + src/ui/UASView.ui \ + src/ui/ParameterInterface.ui \ + src/ui/WaypointList.ui \ + src/ui/ObjectDetectionView.ui \ + src/ui/JoystickWidget.ui \ + src/ui/HDDisplay.ui \ + src/ui/MAVLinkSettingsWidget.ui \ + src/ui/AudioOutputWidget.ui \ + src/ui/QGCSensorSettingsWidget.ui \ + src/ui/watchdog/WatchdogControl.ui \ + src/ui/watchdog/WatchdogProcessView.ui \ + src/ui/watchdog/WatchdogView.ui \ + src/ui/QGCFirmwareUpdate.ui \ + src/ui/QGCPxImuFirmwareUpdate.ui \ + src/ui/QMap3D.ui \ + src/ui/SlugsDataSensorView.ui \ + src/ui/SlugsHilSim.ui \ + src/ui/SlugsPadCameraControl.ui \ + src/ui/uas/QGCUnconnectedInfoWidget.ui \ + src/ui/designer/QGCToolWidget.ui \ + src/ui/designer/QGCParamSlider.ui \ + src/ui/designer/QGCActionButton.ui \ + src/ui/designer/QGCCommandButton.ui \ + src/ui/QGCMAVLinkLogPlayer.ui \ + src/ui/QGCWaypointListMulti.ui \ + src/ui/QGCUDPLinkConfiguration.ui \ + src/ui/QGCUDPClientLinkConfiguration.ui \ + src/ui/QGCTCPLinkConfiguration.ui \ + src/ui/QGCSettingsWidget.ui \ + src/ui/map/QGCMapTool.ui \ + src/ui/map/QGCMapToolBar.ui \ + src/ui/QGCMAVLinkInspector.ui \ + src/ui/WaypointViewOnlyView.ui \ + src/ui/WaypointEditableView.ui \ + src/ui/UnconnectedUASInfoWidget.ui \ + src/ui/mavlink/QGCMAVLinkMessageSender.ui \ + src/ui/firmwareupdate/QGCFirmwareUpdateWidget.ui \ + src/ui/QGCPluginHost.ui \ + src/ui/firmwareupdate/QGCPX4FirmwareUpdate.ui \ + src/ui/mission/QGCMissionOther.ui \ + src/ui/mission/QGCMissionNavWaypoint.ui \ + src/ui/mission/QGCMissionDoJump.ui \ + src/ui/mission/QGCMissionDoSetServo.ui \ + src/ui/mission/QGCMissionDoRepeatServo.ui \ + src/ui/mission/QGCMissionDoDigicamControl.ui \ + src/ui/mission/QGCMissionDoChangeSpeed.ui \ + src/ui/mission/QGCMissionDoSetCamTriggDist.ui \ + src/ui/mission/QGCMissionDoSetHome.ui \ + src/ui/mission/QGCMissionDoSetRelay.ui \ + src/ui/mission/QGCMissionDoSetROI.ui \ + src/ui/mission/QGCMissionDoMountControl.ui \ + src/ui/mission/QGCMissionDoRepeatRelay.ui \ + src/ui/mission/QGCMissionConditionDelay.ui \ + src/ui/mission/QGCMissionConditionYaw.ui \ + src/ui/mission/QGCMissionConditionDistance.ui \ + src/ui/mission/QGCMissionNavLoiterUnlim.ui \ + src/ui/mission/QGCMissionNavLoiterTurns.ui \ + src/ui/mission/QGCMissionNavLoiterTime.ui \ + src/ui/mission/QGCMissionNavLoiterToAlt.ui \ + src/ui/mission/QGCMissionNavReturnToLaunch.ui \ + src/ui/mission/QGCMissionNavLand.ui \ + src/ui/mission/QGCMissionNavTakeoff.ui \ + src/ui/mission/QGCMissionNavSweep.ui \ + src/ui/mission/QGCMissionNavContinueChangeAlt.ui \ + src/ui/mission/QGCMissionDoStartSearch.ui \ + src/ui/mission/QGCMissionDoFinishSearch.ui \ + src/ui/QGCVehicleConfig.ui \ + src/ui/QGCHilConfiguration.ui \ + src/ui/QGCHilFlightGearConfiguration.ui \ + src/ui/QGCHilJSBSimConfiguration.ui \ +# src/ui/QGCHilXPlaneConfiguration.ui \ + src/ui/designer/QGCComboBox.ui \ + src/ui/designer/QGCTextLabel.ui \ + src/ui/uas/UASQuickView.ui \ + src/ui/uas/UASQuickViewItemSelect.ui \ + src/ui/uas/UASActionsWidget.ui \ + src/ui/QGCTabbedInfoView.ui \ + src/ui/UASRawStatusView.ui \ + src/ui/uas/QGCMessageView.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/RangeFinderConfig.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/CopterPidConfig.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/configuration/TerminalConsole.ui \ + src/ui/configuration/LogConsole.ui \ + src/ui/configuration/SerialSettingsDialog.ui \ + src/ui/configuration/ApmFirmwareConfig.ui \ + src/ui/DebugOutput.ui \ + src/ui/configuration/SetupWarningMessage.ui \ + src/ui/uas/APMShortcutModesDialog.ui \ + src/ui/configuration/DownloadRemoteParamsDialog.ui \ + src/ui/configuration/ParamCompareDialog.ui \ + src/ui/AP2DataPlot2D.ui \ + src/ui/dataselectionscreen.ui \ + src/ui/AboutDialog.ui \ + src/ui/AP2DataPlotAxisDialog.ui \ + src/ui/AutoUpdateDialog.ui \ + src/uas/LogDownloadDialog.ui \ + src/ui/configuration/CompassMotorCalibrationDialog.ui \ + src/ui/MissionElevationDisplay.ui \ + src/ui/DroneshareUploadDialog.ui \ + src/ui/DroneshareDialog.ui \ + src/ui/uas/PreFlightCalibrationDialog.ui \ + src/ui/configuration/RadioFlashWizard.ui + +HEADERS += \ + src/MG.h \ + src/QGCCore.h \ + src/uas/UASInterface.h \ + src/uas/UAS.h \ + src/uas/UASManager.h \ + src/comm/LinkManager.h \ + src/comm/LinkInterface.h \ + src/comm/SerialLinkInterface.h \ + src/comm/ProtocolInterface.h \ + src/comm/QGCFlightGearLink.h \ + src/comm/QGCJSBSimLink.h \ +# src/comm/QGCXPlaneLink.h \ + src/comm/serialconnection.h \ + src/ui/CommConfigurationWindow.h \ + src/ui/SerialConfigurationWindow.h \ + src/ui/MainWindow.h \ + src/ui/uas/UASControlWidget.h \ + src/ui/uas/UASListWidget.h \ + src/ui/uas/UASInfoWidget.h \ + src/ui/HUD.h \ + src/configuration.h \ + src/ui/uas/UASView.h \ +#if defined(CAMERAVIEW) + src/ui/CameraView.h \ +#endif + src/comm/MAVLinkSimulationLink.h \ + src/comm/UDPLink.h \ + src/comm/UDPClientLink.h \ + src/comm/TCPLink.h \ + src/ui/ParameterInterface.h \ + src/ui/WaypointList.h \ + src/ui/WaypointNavigation.h \ + src/Waypoint.h \ + src/ui/ObjectDetectionView.h \ + src/input/JoystickInput.h \ + src/ui/JoystickWidget.h \ + src/ui/HDDisplay.h \ + src/ui/MAVLinkSettingsWidget.h \ + src/ui/AudioOutputWidget.h \ + src/GAudioOutput.h \ + src/LogCompressor.h \ + src/ui/QGCParamWidget.h \ + src/ui/QGCSensorSettingsWidget.h \ + src/uas/SlugsMAV.h \ + src/uas/PxQuadMAV.h \ + src/uas/ArduPilotMegaMAV.h \ + src/uas/senseSoarMAV.h \ + src/ui/watchdog/WatchdogControl.h \ + src/ui/watchdog/WatchdogProcessView.h \ + src/ui/watchdog/WatchdogView.h \ + src/uas/UASWaypointManager.h \ + src/ui/HSIDisplay.h \ + src/QGC.h \ + src/ui/QGCFirmwareUpdate.h \ + src/ui/QGCPxImuFirmwareUpdate.h \ + src/ui/RadioCalibration/RadioCalibrationData.h \ + src/comm/QGCMAVLink.h \ + src/ui/SlugsDataSensorView.h \ + src/ui/SlugsHilSim.h \ + src/ui/SlugsPadCameraControl.h \ + src/ui/QGCMainWindowAPConfigurator.h \ + src/comm/MAVLinkSwarmSimulationLink.h \ + src/ui/uas/QGCUnconnectedInfoWidget.h \ + src/ui/designer/QGCToolWidget.h \ + src/ui/designer/QGCParamSlider.h \ + src/ui/designer/QGCCommandButton.h \ + src/ui/designer/QGCToolWidgetItem.h \ + src/ui/QGCMAVLinkLogPlayer.h \ + src/comm/MAVLinkSimulationWaypointPlanner.h \ + src/comm/MAVLinkSimulationMAV.h \ + src/uas/QGCMAVLinkUASFactory.h \ + src/ui/QGCWaypointListMulti.h \ + src/ui/QGCUDPLinkConfiguration.h \ + src/ui/QGCUDPClientLinkConfiguration.h \ + src/ui/QGCTCPLinkConfiguration.h \ + src/ui/QGCSettingsWidget.h \ + src/uas/QGCUASParamManager.h \ + src/ui/map/QGCMapWidget.h \ + src/ui/map/MAV2DIcon.h \ + src/ui/map/Waypoint2DIcon.h \ + src/ui/map/QGCMapTool.h \ + src/ui/map/QGCMapToolBar.h \ + src/QGCGeo.h \ + src/ui/QGCToolBar.h \ + src/ui/QGCStatusBar.h \ + src/ui/QGCMAVLinkInspector.h \ + src/ui/WaypointViewOnlyView.h \ + src/ui/WaypointEditableView.h \ + src/ui/UnconnectedUASInfoWidget.h \ + src/ui/QGCRGBDView.h \ + src/ui/mavlink/QGCMAVLinkMessageSender.h \ + src/ui/firmwareupdate/QGCFirmwareUpdateWidget.h \ + src/ui/QGCPluginHost.h \ + src/ui/firmwareupdate/QGCPX4FirmwareUpdate.h \ + src/ui/mission/QGCMissionOther.h \ + src/ui/mission/QGCMissionNavWaypoint.h \ + src/ui/mission/QGCMissionDoJump.h \ + src/ui/mission/QGCMissionDoSetServo.h \ + src/ui/mission/QGCMissionDoRepeatServo.h \ + src/ui/mission/QGCMissionDoDigicamControl.h \ + src/ui/mission/QGCMissionDoChangeSpeed.h \ + src/ui/mission/QGCMissionDoSetCamTriggDist.h \ + src/ui/mission/QGCMissionDoSetHome.h \ + src/ui/mission/QGCMissionDoSetRelay.h \ + src/ui/mission/QGCMissionDoSetROI.h \ + src/ui/mission/QGCMissionDoMountControl.h \ + src/ui/mission/QGCMissionDoRepeatRelay.h \ + src/ui/mission/QGCMissionConditionDelay.h \ + src/ui/mission/QGCMissionConditionYaw.h \ + src/ui/mission/QGCMissionConditionDistance.h \ + src/ui/mission/QGCMissionNavLoiterUnlim.h \ + src/ui/mission/QGCMissionNavLoiterTurns.h \ + src/ui/mission/QGCMissionNavLoiterTime.h \ + src/ui/mission/QGCMissionNavLoiterToAlt.h \ + src/ui/mission/QGCMissionNavReturnToLaunch.h \ + src/ui/mission/QGCMissionNavLand.h \ + src/ui/mission/QGCMissionNavTakeoff.h \ + src/ui/mission/QGCMissionNavSweep.h \ + src/ui/mission/QGCMissionNavContinueChangeAlt.h \ + src/ui/mission/QGCMissionDoStartSearch.h \ + src/ui/mission/QGCMissionDoFinishSearch.h \ + src/ui/QGCVehicleConfig.h \ + src/comm/QGCHilLink.h \ + src/ui/QGCHilConfiguration.h \ + src/ui/QGCHilFlightGearConfiguration.h \ + src/ui/QGCHilJSBSimConfiguration.h \ +# src/ui/QGCHilXPlaneConfiguration.h \ + src/ui/designer/QGCComboBox.h \ + src/ui/designer/QGCTextLabel.h \ + src/ui/submainwindow.h \ + src/ui/dockwidgettitlebareventfilter.h \ + src/ui/uas/UASQuickView.h \ + src/ui/uas/UASQuickViewItem.h \ + src/ui/uas/UASQuickViewItemSelect.h \ + src/ui/uas/UASQuickViewTextItem.h \ + src/ui/uas/UASQuickViewGaugeItem.h \ + src/ui/uas/UASActionsWidget.h \ + src/ui/designer/QGCRadioChannelDisplay.h \ + src/ui/QGCTabbedInfoView.h \ + src/ui/UASRawStatusView.h \ + src/ui/PrimaryFlightDisplay.h \ + src/ui/uas/QGCMessageView.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/RangeFinderConfig.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/configuration/CopterPidConfig.h \ + src/ui/ApmToolBar.h \ + src/ui/configuration/PX4FirmwareUploader.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/configuration/Console.h \ + src/ui/configuration/SerialSettingsDialog.h \ + src/ui/configuration/TerminalConsole.h \ + src/ui/configuration/LogConsole.h \ + src/ui/configuration/ApmHighlighter.h \ + src/ui/configuration/ApmFirmwareConfig.h \ + src/ui/designer/QGCMouseWheelEventFilter.h \ + src/ui/DebugOutput.h \ + src/ui/configuration/APDoubleSpinBox.h \ + src/ui/configuration/APSpinBox.h \ + src/ui/configuration/Radio3DRSettings.h \ + src/ui/configuration/SetupWarningMessage.h \ + src/ui/uas/APMShortcutModesDialog.h \ + src/ui/configuration/DownloadRemoteParamsDialog.h \ + src/ui/configuration/ParamCompareDialog.h \ + src/uas/UASParameter.h \ + src/output/kmlcreator.h \ + src/output/logdata.h \ + src/ui/AP2DataPlot2D.h \ + src/ui/AP2DataPlotThread.h \ + src/ui/dataselectionscreen.h \ + src/ui/qcustomplot.h \ + src/globalobject.h \ + src/ui/AboutDialog.h \ + src/ui/uas/UASQuickViewTextLabel.h \ + src/uas/ApmUiHelpers.h \ + src/ui/AP2DataPlotAxisDialog.h \ + src/comm/arduino_intelhex.h \ + src/comm/arduinoflash.h \ + src/audio/AlsaAudio.h \ + src/ui/AutoUpdateCheck.h \ + src/ui/AutoUpdateDialog.h \ + src/uas/LogDownloadDialog.h \ + src/comm/TLogReplayLink.h \ + src/ui/PrimaryFlightDisplayQML.h \ + src/ui/configuration/CompassMotorCalibrationDialog.h \ + src/comm/MAVLinkDecoder.h \ + src/comm/MAVLinkProtocol.h \ + src/ui/MissionElevationDisplay.h \ + src/ui/GoogleElevationData.h \ + src/ui/DroneshareUploadDialog.h \ + src/ui/DroneshareUpload.h \ + src/ui/DroneshareDialog.h \ + src/ui/LoginDialog.h \ + src/ui/DroneshareAPIBroker.h \ + src/comm/UASObject.h \ + src/comm/VehicleOverview.h \ + src/comm/RelPositionOverview.h \ + src/comm/AbsPositionOverview.h \ + src/comm/MissionOverview.h \ + src/ui/AP2DataPlot2DModel.h \ + src/ui/uas/PreFlightCalibrationDialog.h \ + src/ui/configuration/RadioFlashWizard.h \ + src/ui/GraphTreeWidgetItem.h \ + src/comm/LinkManagerFactory.h \ + src/versioncomparator.h \ + src/ui/VibrationMonitor.h \ + src/ui/EKFMonitor.h \ + src/Settings.h + +SOURCES += \ + src/QGCCore.cc \ + src/uas/UASManager.cc \ + src/uas/UAS.cc \ + src/comm/LinkManager.cc \ + src/comm/LinkInterface.cpp \ + src/comm/QGCFlightGearLink.cc \ + src/comm/QGCJSBSimLink.cc \ +# src/comm/QGCXPlaneLink.cc \ + src/comm/serialconnection.cc \ + src/ui/CommConfigurationWindow.cc \ + src/ui/SerialConfigurationWindow.cc \ + src/ui/MainWindow.cc \ + src/ui/uas/UASControlWidget.cc \ + src/ui/uas/UASListWidget.cc \ + src/ui/uas/UASInfoWidget.cc \ + src/ui/HUD.cc \ + src/ui/uas/UASView.cc \ +#ifdef CAMERAVIEW + src/ui/CameraView.cc \ +#endif + src/comm/MAVLinkSimulationLink.cc \ + src/comm/UDPLink.cc \ + src/comm/UDPClientLink.cc \ + src/comm/TCPLink.cc \ + src/ui/ParameterInterface.cc \ + src/ui/WaypointList.cc \ + src/ui/WaypointNavigation.cc \ + src/Waypoint.cc \ + src/ui/ObjectDetectionView.cc \ + src/input/JoystickInput.cc \ + src/ui/JoystickWidget.cc \ + src/ui/HDDisplay.cc \ + src/ui/MAVLinkSettingsWidget.cc \ + src/ui/AudioOutputWidget.cc \ + src/GAudioOutput.cc \ + src/LogCompressor.cc \ + src/ui/QGCParamWidget.cc \ + src/ui/QGCSensorSettingsWidget.cc \ + src/uas/SlugsMAV.cc \ + src/uas/PxQuadMAV.cc \ + src/uas/ArduPilotMegaMAV.cc \ + src/uas/senseSoarMAV.cpp \ + src/ui/watchdog/WatchdogControl.cc \ + src/ui/watchdog/WatchdogProcessView.cc \ + src/ui/watchdog/WatchdogView.cc \ + src/uas/UASWaypointManager.cc \ + src/ui/HSIDisplay.cc \ + src/QGC.cc \ + src/ui/QGCFirmwareUpdate.cc \ + src/ui/QGCPxImuFirmwareUpdate.cc \ + src/ui/RadioCalibration/RadioCalibrationData.cc \ + src/ui/SlugsDataSensorView.cc \ + src/ui/SlugsHilSim.cc \ + src/ui/SlugsPadCameraControl.cpp \ + src/ui/QGCMainWindowAPConfigurator.cc \ + src/comm/MAVLinkSwarmSimulationLink.cc \ + src/ui/uas/QGCUnconnectedInfoWidget.cc \ + src/ui/designer/QGCToolWidget.cc \ + src/ui/designer/QGCParamSlider.cc \ + src/ui/designer/QGCCommandButton.cc \ + src/ui/designer/QGCToolWidgetItem.cc \ + src/ui/QGCMAVLinkLogPlayer.cc \ + src/comm/MAVLinkSimulationWaypointPlanner.cc \ + src/comm/MAVLinkSimulationMAV.cc \ + src/uas/QGCMAVLinkUASFactory.cc \ + src/ui/QGCWaypointListMulti.cc \ + src/ui/QGCUDPLinkConfiguration.cc \ + src/ui/QGCUDPClientLinkConfiguration.cc \ + src/ui/QGCTCPLinkConfiguration.cc \ + src/ui/QGCSettingsWidget.cc \ + src/uas/QGCUASParamManager.cc \ + src/ui/map/QGCMapWidget.cc \ + src/ui/map/MAV2DIcon.cc \ + src/ui/map/Waypoint2DIcon.cc \ + src/ui/map/QGCMapTool.cc \ + src/ui/map/QGCMapToolBar.cc \ + src/QGCGeo.cc \ + src/ui/QGCToolBar.cc \ + src/ui/QGCStatusBar.cc \ + src/ui/QGCMAVLinkInspector.cc \ + src/ui/WaypointViewOnlyView.cc \ + src/ui/WaypointEditableView.cc \ + src/ui/UnconnectedUASInfoWidget.cc \ + src/ui/QGCRGBDView.cc \ + src/ui/mavlink/QGCMAVLinkMessageSender.cc \ + src/ui/firmwareupdate/QGCFirmwareUpdateWidget.cc \ + src/ui/QGCPluginHost.cc \ + src/ui/firmwareupdate/QGCPX4FirmwareUpdate.cc \ + src/ui/mission/QGCMissionOther.cc \ + src/ui/mission/QGCMissionNavWaypoint.cc \ + src/ui/mission/QGCMissionDoJump.cc \ + src/ui/mission/QGCMissionDoSetServo.cc \ + src/ui/mission/QGCMissionDoRepeatServo.cc \ + src/ui/mission/QGCMissionDoDigicamControl.cc \ + src/ui/mission/QGCMissionDoChangeSpeed.cc \ + src/ui/mission/QGCMissionDoSetCamTriggDist.cc \ + src/ui/mission/QGCMissionDoSetHome.cc \ + src/ui/mission/QGCMissionDoSetRelay.cc \ + src/ui/mission/QGCMissionDoSetROI.cc \ + src/ui/mission/QGCMissionDoMountControl.cc \ + src/ui/mission/QGCMissionDoRepeatRelay.cc \ + src/ui/mission/QGCMissionConditionDelay.cc \ + src/ui/mission/QGCMissionConditionYaw.cc \ + src/ui/mission/QGCMissionConditionDistance.cc \ + src/ui/mission/QGCMissionNavLoiterUnlim.cc \ + src/ui/mission/QGCMissionNavLoiterTurns.cc \ + src/ui/mission/QGCMissionNavLoiterTime.cc \ + src/ui/mission/QGCMissionNavLoiterToAlt.cc \ + src/ui/mission/QGCMissionNavReturnToLaunch.cc \ + src/ui/mission/QGCMissionNavLand.cc \ + src/ui/mission/QGCMissionNavTakeoff.cc \ + src/ui/mission/QGCMissionNavSweep.cc \ + src/ui/mission/QGCMissionNavContinueChangeAlt.cc \ + src/ui/mission/QGCMissionDoStartSearch.cc \ + src/ui/mission/QGCMissionDoFinishSearch.cc \ + src/ui/QGCVehicleConfig.cc \ + src/ui/QGCHilConfiguration.cc \ + src/ui/QGCHilFlightGearConfiguration.cc \ + src/ui/QGCHilJSBSimConfiguration.cc \ +# src/ui/QGCHilXPlaneConfiguration.cc \ + src/ui/designer/QGCComboBox.cc \ + src/ui/designer/QGCTextLabel.cc \ + src/ui/submainwindow.cpp \ + src/ui/dockwidgettitlebareventfilter.cpp \ + src/ui/uas/UASQuickViewItem.cc \ + src/ui/uas/UASQuickView.cc \ + src/ui/uas/UASQuickViewTextItem.cc \ + src/ui/uas/UASQuickViewGaugeItem.cc \ + src/ui/uas/UASQuickViewItemSelect.cc \ + src/ui/uas/UASActionsWidget.cpp \ + src/ui/designer/QGCRadioChannelDisplay.cpp \ + src/ui/QGCTabbedInfoView.cpp \ + src/ui/UASRawStatusView.cpp \ + src/ui/PrimaryFlightDisplay.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/RangeFinderConfig.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/configuration/CopterPidConfig.cc \ + src/ui/ApmToolBar.cc \ + src/ui/configuration/PX4FirmwareUploader.cc \ + 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/configuration/TerminalConsole.cc \ + src/ui/configuration/LogConsole.cc \ + src/ui/configuration/Console.cc \ + src/ui/configuration/SerialSettingsDialog.cc \ + src/ui/configuration/ApmHighlighter.cc \ + src/ui/configuration/ApmFirmwareConfig.cc \ + src/ui/designer/QGCMouseWheelEventFilter.cc \ + src/ui/DebugOutput.cc \ + src/ui/configuration/APDoubleSpinBox.cc \ + src/ui/configuration/APSpinBox.cc \ + src/ui/configuration/Radio3DRSettings.cc \ + src/ui/configuration/SetupWarningMessage.cc \ + src/ui/uas/APMShortcutModesDialog.cpp \ + src/ui/configuration/DownloadRemoteParamsDialog.cc \ + src/ui/configuration/ParamCompareDialog.cpp \ + src/uas/UASParameter.cpp \ + src/output/kmlcreator.cc \ + src/output/logdata.cc \ + src/ui/AP2DataPlot2D.cpp \ + src/ui/AP2DataPlotThread.cc \ + src/ui/dataselectionscreen.cpp \ + src/ui/qcustomplot.cpp \ + src/globalobject.cc \ + src/ui/AboutDialog.cc \ + src/ui/uas/UASQuickViewTextLabel.cc \ + src/uas/ApmUiHelpers.cc \ + src/ui/AP2DataPlotAxisDialog.cc \ + src/comm/arduino_intelhex.cpp \ + src/comm/arduinoflash.cc \ + src/audio/AlsaAudio.cc \ + src/ui/AutoUpdateCheck.cc \ + src/ui/AutoUpdateDialog.cc \ + src/uas/LogDownloadDialog.cc \ + src/comm/TLogReplayLink.cc \ + src/ui/PrimaryFlightDisplayQML.cpp \ + src/ui/configuration/CompassMotorCalibrationDialog.cpp \ + src/comm/MAVLinkDecoder.cc \ + src/comm/MAVLinkProtocol.cc \ + src/ui/MissionElevationDisplay.cpp \ + src/ui/GoogleElevationData.cpp \ + src/ui/DroneshareUploadDialog.cpp \ + src/ui/DroneshareUpload.cpp \ + src/ui/DroneshareDialog.cc \ + src/ui/LoginDialog.cpp \ + src/ui/DroneshareAPIBroker.cpp \ + src/comm/UASObject.cc \ + src/comm/VehicleOverview.cc \ + src/comm/RelPositionOverview.cc \ + src/comm/AbsPositionOverview.cc \ + src/comm/MissionOverview.cc \ + src/ui/AP2DataPlot2DModel.cc \ + src/ui/uas/PreFlightCalibrationDialog.cpp \ + src/ui/configuration/RadioFlashWizard.cpp \ + src/ui/GraphTreeWidgetItem.cc \ + src/comm/LinkManagerFactory.cpp \ + src/versioncomparator.cc \ + src/ui/VibrationMonitor.cpp \ + src/ui/EKFMonitor.cpp \ + src/Settings.cpp + +MacBuild | WindowsBuild : contains(GOOGLEEARTH, enable) { #fix this to make sense ;) + message(Including support for Google Earth) + QT += webkit webkitwidgets + HEADERS += src/ui/map3D/QGCWebPage.h + SOURCES += src/ui/map3D/QGCWebPage.cc + +} else { + message(Skipping support for Google Earth) +} + +OTHER_FILES += \ + qml/components/DigitalDisplay.qml \ + qml/components/StatusDisplay.qml \ + qml/components/ModeDisplay.qml \ + qml/components/HeartbeatDisplay.qml \ + qml/PrimaryFlightDisplayQML.qml \ + qml/components/RollPitchIndicator.qml \ + qml/components/AltitudeIndicator.qml \ + qml/components/SpeedIndicator.qml \ + qml/components/CompassIndicator.qml \ + qml/components/PitchIndicator.qml \ + qml/components/StatusMessageIndicator.qml \ + qml/components/InformationOverlayIndicator.qml \ + +OTHER_FILES += \ + qml/ApmToolBar.qml \ + qml/components/Button.qml \ + qml/components/TextButton.qml \ + qml/resources/apmplanner/toolbar/connect.png \ + qml/resources/apmplanner/toolbar/flightplanner.png \ + qml/resources/apmplanner/toolbar/helpwizard.png \ + qml/resources/apmplanner/toolbar/light_initialsetup_icon.png \ + qml/resources/apmplanner/toolbar/terminal.png \ + qml/resources/apmplanner/toolbar/simulation.png \ + qml/resources/apmplanner/toolbar/light_tuningconfig_icon.png \ + qml/resources/apmplanner/toolbar/flightdata.png \ + qml/resources/apmplanner/toolbar/disconnect.png \ + qml/resources/apmplanner/toolbar/donate.png + +OTHER_FILES += \ + qml/VibrationMonitor.qml \ + qml/EKFMonitor.qml + +# Command Line Tools +OTHER_FILES += \ + libs/sik_uploader/sik_uploader.py + +#qmlcomponents.path += $${DESTDIR}$${TARGET}/components +#qmlcomponents.files += ./components/Button.qml + +#sources.files += ApmToolBar.qml +#sources.path += $$DESTDIR/qml +#target.path += apmplanner2 +#INSTALLS += sources target + +DISTFILES += \ + qml/components/BarGauge.qml + + diff --git a/libs/alglib/src/alglibinternal.cpp b/libs/alglib/src/alglibinternal.cpp index 4e4bbf74b8..bb888da3c2 100644 --- a/libs/alglib/src/alglibinternal.cpp +++ b/libs/alglib/src/alglibinternal.cpp @@ -379,6 +379,8 @@ This function returns value of COND. *************************************************************************/ ae_bool seterrorflag(ae_bool* flag, ae_bool cond, ae_state *_state) { + (void)_state; + ae_bool result; @@ -427,7 +429,8 @@ variables). *************************************************************************/ void touchint(ae_int_t* a, ae_state *_state) { - + (void)a; + (void)_state; } @@ -442,7 +445,8 @@ variables). *************************************************************************/ void touchreal(double* a, ae_state *_state) { - + (void)a; + (void)_state; } @@ -455,6 +459,7 @@ The function convert integer value to real value. *************************************************************************/ double inttoreal(ae_int_t a, ae_state *_state) { + (void)_state; double result; @@ -758,6 +763,7 @@ or both are False). *************************************************************************/ ae_bool aresameboolean(ae_bool v1, ae_bool v2, ae_state *_state) { + (void)_state; ae_bool result; @@ -1388,6 +1394,7 @@ No overflow is generated in any case. *************************************************************************/ double safeminposrv(double x, double y, double v, ae_state *_state) { + (void)_state; double r; double result; @@ -1547,7 +1554,7 @@ This function is used to increment value of integer variable *************************************************************************/ void inc(ae_int_t* v, ae_state *_state) { - + (void)_state; *v = *v+1; } @@ -1558,7 +1565,7 @@ This function is used to decrement value of integer variable *************************************************************************/ void dec(ae_int_t* v, ae_state *_state) { - + (void)_state; *v = *v-1; } @@ -1572,7 +1579,7 @@ It is used by some algorithms to decrease value of internal counters. *************************************************************************/ void countdown(ae_int_t* v, ae_state *_state) { - + (void)_state; if( *v>0 ) { @@ -1593,6 +1600,7 @@ void countdown(ae_int_t* v, ae_state *_state) *************************************************************************/ double boundval(double x, double b1, double b2, ae_state *_state) { + (void)_state; double result; @@ -1616,7 +1624,9 @@ Allocation of serializer: complex value *************************************************************************/ void alloccomplex(ae_serializer* s, ae_complex v, ae_state *_state) { - + (void)s; + (void)v; + (void)_state; ae_serializer_alloc_entry(s); ae_serializer_alloc_entry(s); @@ -1657,6 +1667,8 @@ void allocrealarray(ae_serializer* s, ae_int_t n, ae_state *_state) { + (void)_state; + ae_int_t i; @@ -1730,6 +1742,8 @@ void allocintegerarray(ae_serializer* s, ae_int_t n, ae_state *_state) { + (void)_state; + ae_int_t i; @@ -1804,6 +1818,8 @@ void allocrealmatrix(ae_serializer* s, ae_int_t n1, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t j; @@ -1986,6 +2002,8 @@ ae_int_t recsearch(/* Integer */ ae_vector* a, /* Integer */ ae_vector* b, ae_state *_state) { + (void)_state; + ae_int_t mididx; ae_int_t cflag; ae_int_t k; @@ -2209,6 +2227,9 @@ void _apbuffers_destroy(void* _p) ae_bool _sboolean_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + sboolean *p = (sboolean*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -2217,6 +2238,9 @@ ae_bool _sboolean_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _sboolean_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + sboolean *dst = (sboolean*)_dst; sboolean *src = (sboolean*)_src; dst->val = src->val; @@ -2276,6 +2300,9 @@ void _sbooleanarray_destroy(void* _p) ae_bool _sinteger_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + sinteger *p = (sinteger*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -2284,6 +2311,9 @@ ae_bool _sinteger_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _sinteger_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + sinteger *dst = (sinteger*)_dst; sinteger *src = (sinteger*)_src; dst->val = src->val; @@ -2343,6 +2373,9 @@ void _sintegerarray_destroy(void* _p) ae_bool _sreal_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + sreal *p = (sreal*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -2351,6 +2384,9 @@ ae_bool _sreal_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _sreal_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + sreal *dst = (sreal*)_dst; sreal *src = (sreal*)_src; dst->val = src->val; @@ -2410,6 +2446,9 @@ void _srealarray_destroy(void* _p) ae_bool _scomplex_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + scomplex *p = (scomplex*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -2418,6 +2457,9 @@ ae_bool _scomplex_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _scomplex_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + scomplex *dst = (scomplex*)_dst; scomplex *src = (scomplex*)_src; dst->val = src->val; @@ -2479,6 +2521,8 @@ void _scomplexarray_destroy(void* _p) ae_int_t getrdfserializationcode(ae_state *_state) { + (void)_state; + ae_int_t result; @@ -2489,6 +2533,8 @@ ae_int_t getrdfserializationcode(ae_state *_state) ae_int_t getkdtreeserializationcode(ae_state *_state) { + (void)_state; + ae_int_t result; @@ -2499,6 +2545,8 @@ ae_int_t getkdtreeserializationcode(ae_state *_state) ae_int_t getmlpserializationcode(ae_state *_state) { + (void)_state; + ae_int_t result; @@ -2509,6 +2557,8 @@ ae_int_t getmlpserializationcode(ae_state *_state) ae_int_t getmlpeserializationcode(ae_state *_state) { + (void)_state; + ae_int_t result; @@ -2519,6 +2569,8 @@ ae_int_t getmlpeserializationcode(ae_state *_state) ae_int_t getrbfserializationcode(ae_state *_state) { + (void)_state; + ae_int_t result; @@ -2956,6 +3008,8 @@ void tagsortmiddleir(/* Integer */ ae_vector* a, ae_int_t n, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t k; ae_int_t t; @@ -3070,6 +3124,8 @@ void tagheappushi(/* Real */ ae_vector* a, ae_int_t vb, ae_state *_state) { + (void)_state; + ae_int_t j; ae_int_t k; double v; @@ -3151,6 +3207,8 @@ void tagheapreplacetopi(/* Real */ ae_vector* a, ae_int_t vb, ae_state *_state) { + (void)_state; + ae_int_t j; ae_int_t k1; ae_int_t k2; @@ -3318,6 +3376,8 @@ ae_int_t lowerbound(/* Real */ ae_vector* a, double t, ae_state *_state) { + (void)_state; + ae_int_t l; ae_int_t half; ae_int_t first; @@ -3363,6 +3423,8 @@ ae_int_t upperbound(/* Real */ ae_vector* a, double t, ae_state *_state) { + (void)_state; + ae_int_t l; ae_int_t half; ae_int_t first; @@ -4070,6 +4132,7 @@ ae_bool cmatrixrank1f(ae_int_t m, ae_int_t iv, ae_state *_state) { + (void)_state; #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4100,6 +4163,7 @@ ae_bool rmatrixrank1f(ae_int_t m, ae_int_t iv, ae_state *_state) { + (void)_state; #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4131,6 +4195,17 @@ ae_bool cmatrixmvf(ae_int_t m, ae_int_t iy, ae_state *_state) { + (void)m; + (void)n; + (void)a; + (void)ia; + (void)ja; + (void)opa; + (void)x; + (void)ix; + (void)y; + (void)iy; + (void)_state; ae_bool result; @@ -4158,6 +4233,18 @@ ae_bool rmatrixmvf(ae_int_t m, ae_int_t iy, ae_state *_state) { + (void)m; + (void)n; + (void)a; + (void)ia; + (void)ja; + (void)opa; + (void)x; + (void)ix; + (void)y; + (void)iy; + (void)_state; + ae_bool result; @@ -4186,6 +4273,7 @@ ae_bool cmatrixrighttrsmf(ae_int_t m, ae_int_t j2, ae_state *_state) { + (void)_state; #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4218,6 +4306,8 @@ ae_bool cmatrixlefttrsmf(ae_int_t m, ae_int_t j2, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4250,6 +4340,8 @@ ae_bool rmatrixrighttrsmf(ae_int_t m, ae_int_t j2, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4282,6 +4374,8 @@ ae_bool rmatrixlefttrsmf(ae_int_t m, ae_int_t j2, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4315,6 +4409,8 @@ ae_bool cmatrixsyrkf(ae_int_t n, ae_bool isupper, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4348,6 +4444,8 @@ ae_bool rmatrixsyrkf(ae_int_t n, ae_bool isupper, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4385,6 +4483,8 @@ ae_bool rmatrixgemmf(ae_int_t m, ae_int_t jc, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -4422,6 +4522,8 @@ ae_bool cmatrixgemmf(ae_int_t m, ae_int_t jc, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_ABLAS ae_bool result; @@ -6025,7 +6127,22 @@ ae_bool rmatrixsyrkmkl(ae_int_t n, ae_bool isupper, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_MKL + (void)n; + (void)k; + (void)alpha; + (void)a; + (void)ia; + (void)ja; + (void)optypea; + (void)beta; + (void)c; + (void)ic; + (void)jc; + (void)isupper; + ae_bool result; @@ -6063,6 +6180,23 @@ ae_bool rmatrixgemmmkl(ae_int_t m, ae_state *_state) { #ifndef ALGLIB_INTERCEPTS_MKL + (void)m; + (void)n; + (void)k; + (void)alpha; + (void)a; + (void)ia; + (void)ja; + (void)optypea; + (void)b; + (void)ib; + (void)jb; + (void)optypeb; + (void)beta; + (void)c; + (void)ic; + (void)jc; + (void)_state; ae_bool result; @@ -6650,6 +6784,7 @@ void hermitianmatrixvectormultiply(/* Complex */ ae_matrix* a, /* Complex */ ae_vector* y, ae_state *_state) { + (void)_state; ae_int_t i; ae_int_t ba1; ae_int_t by1; @@ -6956,6 +7091,7 @@ void applyreflectionfromtheleft(/* Real */ ae_matrix* c, /* Real */ ae_vector* work, ae_state *_state) { + (void)_state; double t; ae_int_t i; @@ -7027,6 +7163,8 @@ void applyreflectionfromtheright(/* Real */ ae_matrix* c, /* Real */ ae_vector* work, ae_state *_state) { + (void)work; + double t; ae_int_t i; ae_int_t vm; @@ -7303,6 +7441,8 @@ void complexapplyreflectionfromtheright(/* Complex */ ae_matrix* c, /* Complex */ ae_vector* work, ae_state *_state) { + (void)_state; + ae_complex t; ae_int_t i; ae_int_t vm; @@ -7449,6 +7589,8 @@ void symmetricrank2update(/* Real */ ae_matrix* a, double alpha, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t tp1; ae_int_t tp2; @@ -7524,6 +7666,8 @@ void applyrotationsfromtheleft(ae_bool isforward, /* Real */ ae_vector* work, ae_state *_state) { + (void)_state; + ae_int_t j; ae_int_t jp1; double ctemp; @@ -7662,6 +7806,8 @@ void applyrotationsfromtheright(ae_bool isforward, /* Real */ ae_vector* work, ae_state *_state) { + (void)_state; + ae_int_t j; ae_int_t jp1; double ctemp; @@ -9078,6 +9224,8 @@ static double hsschur_extschursign(double a, double b, ae_state *_state) static ae_int_t hsschur_extschursigntoone(double b, ae_state *_state) { + (void)_state; + ae_int_t result; @@ -10837,7 +10985,21 @@ ae_bool hpcchunkedgradient(/* Real */ ae_vector* weights, ae_bool naturalerrorfunc, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_SSE2 + (void)weights; + (void)structinfo; + (void)columnmeans; + (void)columnsigmas; + (void)xy; + (void)cstart; + (void)csize; + (void)batch4buf; + (void)hpcbuf; + (void)e; + (void)naturalerrorfunc; + ae_bool result; @@ -10864,7 +11026,17 @@ ae_bool hpcchunkedprocess(/* Real */ ae_vector* weights, /* Real */ ae_vector* hpcbuf, ae_state *_state) { + (void)_state; #ifndef ALGLIB_INTERCEPTS_SSE2 + (void)weights; + (void)structinfo; + (void)columnmeans; + (void)columnsigmas; + (void)xy; + (void)cstart; + (void)csize; + (void)batch4buf; + (void)hpcbuf; ae_bool result; @@ -10888,7 +11060,12 @@ static ae_bool hpccores_hpcpreparechunkedgradientx(/* Real */ ae_vector* weig /* Real */ ae_vector* hpcbuf, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_SSE2 + (void)weights; + (void)wcount; + (void)hpcbuf; ae_bool result; @@ -10912,7 +11089,13 @@ static ae_bool hpccores_hpcfinalizechunkedgradientx(/* Real */ ae_vector* buf /* Real */ ae_vector* grad, ae_state *_state) { + (void)_state; + #ifndef ALGLIB_INTERCEPTS_SSE2 + (void)buf; + (void)wcount; + (void)grad; + ae_bool result; @@ -11891,6 +12074,8 @@ This is rcomm-based search function *************************************************************************/ ae_bool armijoiteration(armijostate* state, ae_state *_state) { + (void)_state; + double v; ae_int_t n; ae_bool result; @@ -12148,7 +12333,7 @@ void armijoresults(armijostate* state, double* f, ae_state *_state) { - + (void)_state; *info = state->info; *stp = state->stplen; @@ -12423,6 +12608,9 @@ static void linmin_mcstep(double* stx, ae_bool _linminstate_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)make_automatic; + (void)_state; + linminstate *p = (linminstate*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -12431,6 +12619,9 @@ ae_bool _linminstate_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _linminstate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)make_automatic; + (void)_state; + linminstate *dst = (linminstate*)_dst; linminstate *src = (linminstate*)_src; dst->brackt = src->brackt; @@ -12672,6 +12863,8 @@ void findprimitiverootandinverse(ae_int_t n, static ae_bool ntheory_isprime(ae_int_t n, ae_state *_state) { + (void)_state; + ae_int_t p; ae_bool result; @@ -12969,6 +13162,10 @@ void ftbasefactorize(ae_int_t n, ae_int_t* n2, ae_state *_state) { + (void)n; + (void)tasktype; + (void)_state; + ae_int_t j; *n1 = 0; @@ -13037,6 +13234,8 @@ Is number smooth? *************************************************************************/ ae_bool ftbaseissmooth(ae_int_t n, ae_state *_state) { + (void)_state; + ae_int_t i; ae_bool result; @@ -14926,6 +15125,9 @@ static void ftbase_ftbluesteinsfft(fasttransformplan* plan, /* Real */ ae_vector* bufd, ae_state *_state) { + (void)bufb; + (void)bufd; + ae_int_t op; ae_int_t i; double x; @@ -15042,6 +15244,8 @@ static void ftbase_ftprecomputeradersfft(ae_int_t n, ae_int_t offs, ae_state *_state) { + (void)rq; + ae_frame _frame_block; ae_int_t q; fasttransformplan plan; @@ -15239,6 +15443,8 @@ static void ftbase_ftfactorize(ae_int_t n, ae_int_t* n2, ae_state *_state) { + (void)isroot; + ae_int_t j; ae_int_t k; diff --git a/libs/alglib/src/alglibmisc.cpp b/libs/alglib/src/alglibmisc.cpp index cc4e09567d..db16d6c1fc 100644 --- a/libs/alglib/src/alglibmisc.cpp +++ b/libs/alglib/src/alglibmisc.cpp @@ -1405,6 +1405,7 @@ void hqrndseed(ae_int_t s1, hqrndstate* state, ae_state *_state) { + (void)_state; _hqrndstate_clear(state); @@ -1814,6 +1815,9 @@ static ae_int_t hqrnd_hqrndintegerbase(hqrndstate* state, ae_bool _hqrndstate_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + hqrndstate *p = (hqrndstate*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -1822,6 +1826,9 @@ ae_bool _hqrndstate_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _hqrndstate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + hqrndstate *dst = (hqrndstate*)_dst; hqrndstate *src = (hqrndstate*)_src; dst->s1 = src->s1; @@ -3425,7 +3432,7 @@ static void nearestneighbor_kdtreeallocdatasetindependent(kdtree* kdt, ae_int_t ny, ae_state *_state) { - + (void)ny; ae_assert(kdt->n>0, "KDTreeAllocDatasetIndependent: internal error", _state); ae_vector_set_length(&kdt->x, nx, _state); @@ -3481,7 +3488,7 @@ static void nearestneighbor_kdtreealloctemporaries(kdtree* kdt, ae_int_t ny, ae_state *_state) { - + (void)ny; ae_assert(n>0, "KDTreeAllocTemporaries: internal error", _state); ae_vector_set_length(&kdt->x, nx, _state); diff --git a/libs/alglib/src/ap.cpp b/libs/alglib/src/ap.cpp index cc8140eadc..b1dbd7075b 100644 --- a/libs/alglib/src/ap.cpp +++ b/libs/alglib/src/ap.cpp @@ -91,18 +91,6 @@ __declspec(align(AE_LOCK_ALIGNMENT)) volatile ae_int64_t _ae_dbg_lock_spinwaits __declspec(align(AE_LOCK_ALIGNMENT)) volatile ae_int64_t _ae_dbg_lock_yields = 0; #endif -/* - * These declarations are used to ensure that - * sizeof(ae_int32_t)==4, sizeof(ae_int64_t)==8, sizeof(ae_int_t)==sizeof(void*). - * they will lead to syntax error otherwise (array size will be negative). - * - * you can remove them, if you want - they are not used anywhere. - * - */ -static char _ae_int32_t_must_be_32_bits_wide[1-2*((int)(sizeof(ae_int32_t))-4)*((int)(sizeof(ae_int32_t))-4)]; -static char _ae_int64_t_must_be_64_bits_wide[1-2*((int)(sizeof(ae_int64_t))-8)*((int)(sizeof(ae_int64_t))-8)]; -static char _ae_int_t_must_be_pointer_sized [1-2*((int)(sizeof(ae_int_t))-(int)sizeof(void*))*((int)(sizeof(ae_int_t))-(int)(sizeof(void*)))]; - /* * This variable is used to prevent some tricky optimizations which may degrade multithreaded performance. * It is touched once in the ae_init_pool() function from smp.c in order to prevent optimizations. @@ -1519,26 +1507,31 @@ ae_bool ae_isneginf(double x,ae_state *state) double ae_fabs(double x, ae_state *state) { + (void)state; return fabs(x); } ae_int_t ae_iabs(ae_int_t x, ae_state *state) { + (void)state; return x>=0 ? x : -x; } double ae_sqr(double x, ae_state *state) { + (void)state; return x*x; } double ae_sqrt(double x, ae_state *state) { + (void)state; return sqrt(x); } ae_int_t ae_sign(double x, ae_state *state) { + (void)state; if( x>0 ) return 1; if( x<0 ) return -1; return 0; @@ -1556,31 +1549,37 @@ ae_int_t ae_trunc(double x, ae_state *state) ae_int_t ae_ifloor(double x, ae_state *state) { + (void)state; return (ae_int_t)(floor(x)); } ae_int_t ae_iceil(double x, ae_state *state) { + (void)state; return (ae_int_t)(ceil(x)); } ae_int_t ae_maxint(ae_int_t m1, ae_int_t m2, ae_state *state) { + (void)state; return m1>m2 ? m1 : m2; } ae_int_t ae_minint(ae_int_t m1, ae_int_t m2, ae_state *state) { + (void)state; return m1>m2 ? m2 : m1; } double ae_maxreal(double m1, double m2, ae_state *state) { + (void)state; return m1>m2 ? m1 : m2; } double ae_minreal(double m1, double m2, ae_state *state) { + (void)state; return m1>m2 ? m2 : m1; } @@ -1606,6 +1605,7 @@ ae_int_t ae_debugrng() double ae_randomreal(ae_state *state) { + (void)state; #ifdef AE_DEBUGRNG return ae_debugrng()/2147483563.0; #else @@ -1620,6 +1620,8 @@ double ae_randomreal(ae_state *state) ae_int_t ae_randominteger(ae_int_t maxv, ae_state *state) { + (void)state; + #ifdef AE_DEBUGRNG return (ae_debugrng()-1)%maxv; #else @@ -1629,65 +1631,78 @@ ae_int_t ae_randominteger(ae_int_t maxv, ae_state *state) double ae_sin(double x, ae_state *state) { + (void)state; return sin(x); } double ae_cos(double x, ae_state *state) { + (void)state; return cos(x); } double ae_tan(double x, ae_state *state) { + (void)state; return tan(x); } double ae_sinh(double x, ae_state *state) { + (void)state; return sinh(x); } double ae_cosh(double x, ae_state *state) { + (void)state; return cosh(x); } double ae_tanh(double x, ae_state *state) { + (void)state; return tanh(x); } double ae_asin(double x, ae_state *state) { + (void)state; return asin(x); } double ae_acos(double x, ae_state *state) { + (void)state; return acos(x); } double ae_atan(double x, ae_state *state) { + (void)state; return atan(x); } double ae_atan2(double y, double x, ae_state *state) { + (void)state; return atan2(y,x); } double ae_log(double x, ae_state *state) { + (void)state; return log(x); } double ae_pow(double x, double y, ae_state *state) { + (void)state; return pow(x,y); } double ae_exp(double x, ae_state *state) { + (void)state; return exp(x); } @@ -2380,6 +2395,8 @@ state ALGLIB environment state ************************************************************************/ void ae_bool2str(ae_bool v, char *buf, ae_state *state) { + (void)state; + char c = v ? '1' : '0'; ae_int_t i; for(i=0; imutex); +#else + (void)lock; #endif } @@ -3257,6 +3276,8 @@ void ae_shared_pool_clear_recycled( ae_shared_pool *pool, ae_state *state) { + (void)state; + ae_shared_pool_entry *ptr, *tmp; /* clear recycled objects */ @@ -3296,6 +3317,8 @@ void ae_shared_pool_first_recycled( ae_smart_ptr *pptr, ae_state *state) { + (void)state; + /* modify internal enumeration counter */ pool->enumeration_counter = pool->recycled_objects; @@ -3335,6 +3358,8 @@ void ae_shared_pool_next_recycled( ae_smart_ptr *pptr, ae_state *state) { + (void)state; + /* exit on end of list */ if( pool->enumeration_counter==NULL ) { @@ -3372,6 +3397,8 @@ void ae_shared_pool_reset( ae_shared_pool *pool, ae_state *state) { + (void)state; + /* clear seed and lists */ ae_shared_pool_internalclear(pool); @@ -3399,6 +3426,7 @@ void ae_serializer_init(ae_serializer *serializer) void ae_serializer_clear(ae_serializer *serializer) { + (void)serializer; } void ae_serializer_alloc_start(ae_serializer *serializer) @@ -3598,6 +3626,7 @@ void ae_serializer_unserialize_double(ae_serializer *serializer, double *v, ae_s void ae_serializer_stop(ae_serializer *serializer) { + (void)serializer; } @@ -3622,6 +3651,8 @@ ae_complex ae_c_neg(ae_complex lhs) ae_complex ae_c_conj(ae_complex lhs, ae_state *state) { + (void)state; + ae_complex result; result.x = +lhs.x; result.y = -lhs.y; @@ -3630,6 +3661,8 @@ ae_complex ae_c_conj(ae_complex lhs, ae_state *state) ae_complex ae_c_sqr(ae_complex lhs, ae_state *state) { + (void)state; + ae_complex result; result.x = lhs.x*lhs.x-lhs.y*lhs.y; result.y = 2*lhs.x*lhs.y; @@ -3638,6 +3671,8 @@ ae_complex ae_c_sqr(ae_complex lhs, ae_state *state) double ae_c_abs(ae_complex z, ae_state *state) { + (void)state; + double w; double xabs; double yabs; @@ -4873,7 +4908,7 @@ std::string alglib::complex::tostring(int _dps) const return std::string("0"); } -const bool alglib::operator==(const alglib::complex& lhs, const alglib::complex& rhs) +bool alglib::operator==(const alglib::complex& lhs, const alglib::complex& rhs) { volatile double x1 = lhs.x; volatile double x2 = rhs.x; @@ -4882,7 +4917,7 @@ const bool alglib::operator==(const alglib::complex& lhs, const alglib::complex& return x1==x2 && y1==y2; } -const bool alglib::operator!=(const alglib::complex& lhs, const alglib::complex& rhs) +bool alglib::operator!=(const alglib::complex& lhs, const alglib::complex& rhs) { return !(lhs==rhs); } const alglib::complex alglib::operator+(const alglib::complex& lhs) @@ -4995,6 +5030,8 @@ void alglib::setnworkers(alglib::ae_int_t nworkers) { #ifdef AE_HPC alglib_impl::ae_set_cores_to_use(nworkers); +#else + (void)nworkers; #endif } diff --git a/libs/alglib/src/ap.h b/libs/alglib/src/ap.h index 3d50e00901..4a5032b993 100644 --- a/libs/alglib/src/ap.h +++ b/libs/alglib/src/ap.h @@ -944,8 +944,8 @@ class complex }; const alglib::complex operator/(const alglib::complex& lhs, const alglib::complex& rhs); -const bool operator==(const alglib::complex& lhs, const alglib::complex& rhs); -const bool operator!=(const alglib::complex& lhs, const alglib::complex& rhs); +bool operator==(const alglib::complex& lhs, const alglib::complex& rhs); +bool operator!=(const alglib::complex& lhs, const alglib::complex& rhs); const alglib::complex operator+(const alglib::complex& lhs); const alglib::complex operator-(const alglib::complex& lhs); const alglib::complex operator+(const alglib::complex& lhs, const alglib::complex& rhs); diff --git a/libs/alglib/src/diffequations.cpp b/libs/alglib/src/diffequations.cpp index 268ecd0035..b3600378cc 100644 --- a/libs/alglib/src/diffequations.cpp +++ b/libs/alglib/src/diffequations.cpp @@ -1152,6 +1152,9 @@ void _odesolverstate_destroy(void* _p) ae_bool _odesolverreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + odesolverreport *p = (odesolverreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -1160,6 +1163,9 @@ ae_bool _odesolverreport_init(void* _p, ae_state *_state, ae_bool make_automatic ae_bool _odesolverreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + odesolverreport *dst = (odesolverreport*)_dst; odesolverreport *src = (odesolverreport*)_src; dst->nfev = src->nfev; diff --git a/libs/alglib/src/integration.cpp b/libs/alglib/src/integration.cpp index f35b744368..c0d910c389 100644 --- a/libs/alglib/src/integration.cpp +++ b/libs/alglib/src/integration.cpp @@ -3211,6 +3211,7 @@ void autogkresults(autogkstate* state, autogkreport* rep, ae_state *_state) { + (void)_state; *v = 0; _autogkreport_clear(rep); @@ -3676,6 +3677,8 @@ static void autogk_mheappop(/* Real */ ae_matrix* heap, ae_int_t heapwidth, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t p; double t; @@ -3726,6 +3729,8 @@ static void autogk_mheappush(/* Real */ ae_matrix* heap, ae_int_t heapwidth, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t p; double t; @@ -3788,6 +3793,9 @@ static void autogk_mheapresize(/* Real */ ae_matrix* heap, ae_bool _autogkreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + autogkreport *p = (autogkreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -3796,6 +3804,9 @@ ae_bool _autogkreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _autogkreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + autogkreport *dst = (autogkreport*)_dst; autogkreport *src = (autogkreport*)_src; dst->terminationtype = src->terminationtype; diff --git a/libs/alglib/src/interpolation.cpp b/libs/alglib/src/interpolation.cpp index 08ed432b33..e6c5dc66cd 100644 --- a/libs/alglib/src/interpolation.cpp +++ b/libs/alglib/src/interpolation.cpp @@ -11026,6 +11026,8 @@ static double idwint_idwcalcq(idwinterpolant* z, ae_int_t k, ae_state *_state) { + (void)_state; + ae_int_t nx; ae_int_t i; ae_int_t j; @@ -11086,6 +11088,7 @@ static void idwint_idwinit1(ae_int_t n, idwinterpolant* z, ae_state *_state) { + (void)nq; z->debugsolverfailures = 0; @@ -17809,6 +17812,7 @@ static void spline1d_hermitecalc(double p0, double* ds, ae_state *_state) { + (void)_state; *s = 0; *ds = 0; @@ -17857,6 +17861,8 @@ static double spline1d_rescaleval(double a0, double t, ae_state *_state) { + (void)_state; + double result; @@ -20730,7 +20736,7 @@ value of fitting function) are reported. *************************************************************************/ void lsfitsetxrep(lsfitstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -22544,7 +22550,7 @@ Internal subroutine static void lsfit_lsfitclearrequestfields(lsfitstate* state, ae_state *_state) { - + (void)_state; state->needf = ae_false; state->needfg = ae_false; @@ -23570,6 +23576,9 @@ static void lsfit_estimateerrors(/* Real */ ae_matrix* f1, ae_bool _polynomialfitreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + polynomialfitreport *p = (polynomialfitreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -23578,6 +23587,9 @@ ae_bool _polynomialfitreport_init(void* _p, ae_state *_state, ae_bool make_autom ae_bool _polynomialfitreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + polynomialfitreport *dst = (polynomialfitreport*)_dst; polynomialfitreport *src = (polynomialfitreport*)_src; dst->taskrcond = src->taskrcond; @@ -23605,6 +23617,9 @@ void _polynomialfitreport_destroy(void* _p) ae_bool _barycentricfitreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + barycentricfitreport *p = (barycentricfitreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -23613,6 +23628,9 @@ ae_bool _barycentricfitreport_init(void* _p, ae_state *_state, ae_bool make_auto ae_bool _barycentricfitreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + barycentricfitreport *dst = (barycentricfitreport*)_dst; barycentricfitreport *src = (barycentricfitreport*)_src; dst->taskrcond = src->taskrcond; @@ -23641,6 +23659,9 @@ void _barycentricfitreport_destroy(void* _p) ae_bool _spline1dfitreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + spline1dfitreport *p = (spline1dfitreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -23649,6 +23670,9 @@ ae_bool _spline1dfitreport_init(void* _p, ae_state *_state, ae_bool make_automat ae_bool _spline1dfitreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + spline1dfitreport *dst = (spline1dfitreport*)_dst; spline1dfitreport *src = (spline1dfitreport*)_src; dst->taskrcond = src->taskrcond; @@ -25411,7 +25435,7 @@ NOTE: this function has some serialization-related subtleties. We *************************************************************************/ void rbfsetlinterm(rbfmodel* s, ae_state *_state) { - + (void)_state; s->aterm = 1; } @@ -25434,7 +25458,7 @@ NOTE: this function has some serialization-related subtleties. We *************************************************************************/ void rbfsetconstterm(rbfmodel* s, ae_state *_state) { - + (void)_state; s->aterm = 2; } @@ -25457,7 +25481,7 @@ NOTE: this function has some serialization-related subtleties. We *************************************************************************/ void rbfsetzeroterm(rbfmodel* s, ae_state *_state) { - + (void)_state; s->aterm = 3; } @@ -26634,7 +26658,7 @@ NOTE: this function has some serialization-related subtleties. We *************************************************************************/ static void rbf_rbfgridpoints(rbfmodel* s, ae_state *_state) { - + (void)_state; s->gridtype = 2; } @@ -26910,6 +26934,8 @@ static void rbf_buildrbfmodellsqr(/* Real */ ae_matrix* x, ae_int_t* nmv, ae_state *_state) { + (void)x; + ae_frame _frame_block; linlsqrstate state; linlsqrreport lsqrrep; @@ -27608,6 +27634,9 @@ void _rbfmodel_destroy(void* _p) ae_bool _rbfreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + rbfreport *p = (rbfreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -27616,6 +27645,9 @@ ae_bool _rbfreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _rbfreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + rbfreport *dst = (rbfreport*)_dst; rbfreport *src = (rbfreport*)_src; dst->arows = src->arows; diff --git a/libs/alglib/src/linalg.cpp b/libs/alglib/src/linalg.cpp index 1ef178c529..3ad4e93bfd 100644 --- a/libs/alglib/src/linalg.cpp +++ b/libs/alglib/src/linalg.cpp @@ -7071,8 +7071,7 @@ bool rmatrixschur(real_2d_array &a, const ae_int_t n, real_2d_array &s) ///////////////////////////////////////////////////////////////////////// namespace alglib_impl { -static ae_int_t ablas_rgemmparallelsize = 64; -static ae_int_t ablas_cgemmparallelsize = 64; + static void ablas_ablasinternalsplitlength(ae_int_t n, ae_int_t nb, ae_int_t* n1, @@ -7694,6 +7693,8 @@ INPUT PARAMETERS *************************************************************************/ ae_int_t ablasblocksize(/* Real */ ae_matrix* a, ae_state *_state) { + (void)a; + (void)_state; ae_int_t result; @@ -7712,6 +7713,9 @@ Block size for complex subroutines. ae_int_t ablascomplexblocksize(/* Complex */ ae_matrix* a, ae_state *_state) { + (void)a; + (void)_state; + ae_int_t result; @@ -7729,6 +7733,8 @@ Microblock size *************************************************************************/ ae_int_t ablasmicroblocksize(ae_state *_state) { + (void)_state; + ae_int_t result; @@ -7874,6 +7880,8 @@ void rmatrixenforcesymmetricity(/* Real */ ae_matrix* a, ae_bool isupper, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t j; @@ -7924,6 +7932,8 @@ void cmatrixcopy(ae_int_t m, ae_int_t jb, ae_state *_state) { + (void)_state; + ae_int_t i; @@ -7961,6 +7971,8 @@ void rmatrixcopy(ae_int_t m, ae_int_t jb, ae_state *_state) { + (void)_state; + ae_int_t i; @@ -9264,6 +9276,8 @@ static void ablas_ablasinternalsplitlength(ae_int_t n, ae_int_t* n2, ae_state *_state) { + (void)_state; + ae_int_t r; *n1 = 0; @@ -13594,6 +13608,8 @@ static void ortfac_rmatrixblockreflector(/* Real */ ae_matrix* a, /* Real */ ae_vector* work, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t j; ae_int_t k; @@ -13705,6 +13721,8 @@ static void ortfac_cmatrixblockreflector(/* Complex */ ae_matrix* a, /* Complex */ ae_vector* work, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t k; ae_complex v; @@ -13936,6 +13954,8 @@ static ae_bool bdsvd_bidiagonalsvddecompositioninternal(/* Real */ ae_vector* ae_int_t ncvt, ae_state *_state) { + (void)isfractionalaccuracyrequired; + ae_frame _frame_block; ae_vector _e; ae_int_t i; @@ -19424,6 +19444,10 @@ static void evd_internaldlaebz(ae_int_t ijob, ae_int_t* info, ae_state *_state) { + (void)e; + (void)work; + (void)iwork; + ae_int_t itmp1; ae_int_t itmp2; ae_int_t j; @@ -27187,7 +27211,7 @@ static void rcond_internalcomplexrcondsaveall(/* Integer */ ae_vector* isave, double* temp, ae_state *_state) { - + (void)_state; isave->ptr.p_int[0] = *i; isave->ptr.p_int[1] = *iter; @@ -27214,7 +27238,7 @@ static void rcond_internalcomplexrcondloadall(/* Integer */ ae_vector* isave, double* temp, ae_state *_state) { - + (void)_state; *i = isave->ptr.p_int[0]; *iter = isave->ptr.p_int[1]; @@ -29009,6 +29033,9 @@ static void matinv_hpdmatrixcholeskyinverserec(/* Complex */ ae_matrix* a, ae_bool _matinvreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + matinvreport *p = (matinvreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -29017,6 +29044,9 @@ ae_bool _matinvreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _matinvreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + matinvreport *dst = (matinvreport*)_dst; matinvreport *src = (matinvreport*)_src; dst->r1 = src->r1; @@ -31172,6 +31202,7 @@ OUTPUT PARAMETERS *************************************************************************/ void sparsefree(sparsematrix* s, ae_state *_state) { + (void)_state; _sparsematrix_clear(s); @@ -31193,6 +31224,8 @@ RESULT: number of rows of a sparse matrix. *************************************************************************/ ae_int_t sparsegetnrows(sparsematrix* s, ae_state *_state) { + (void)_state; + ae_int_t result; @@ -31211,6 +31244,8 @@ RESULT: number of columns of a sparse matrix. *************************************************************************/ ae_int_t sparsegetncols(sparsematrix* s, ae_state *_state) { + (void)_state; + ae_int_t result; @@ -32512,6 +32547,7 @@ void normestimatorresults(normestimatorstate* state, double* nrm, ae_state *_state) { + (void)_state; *nrm = 0; diff --git a/libs/alglib/src/optimization.cpp b/libs/alglib/src/optimization.cpp index 0b43330e64..8ac0a056fa 100644 --- a/libs/alglib/src/optimization.cpp +++ b/libs/alglib/src/optimization.cpp @@ -6090,6 +6090,8 @@ void trimfunction(double* f, double threshold, ae_state *_state) { + (void)_state; + ae_int_t i; @@ -6142,6 +6144,8 @@ ae_bool enforceboundaryconstraints(/* Real */ ae_vector* x, ae_int_t nslack, ae_state *_state) { + (void)_state; + ae_int_t i; ae_bool result; @@ -6624,6 +6628,8 @@ ae_int_t numberofchangedconstraints(/* Real */ ae_vector* x, ae_int_t nslack, ae_state *_state) { + (void)_state; + ae_int_t i; ae_bool statuschanged; ae_int_t result; @@ -7739,7 +7745,7 @@ INPUT PARAMETERS: *************************************************************************/ void cqmdropa(convexquadraticmodel* s, ae_state *_state) { - + (void)_state; s->alpha = 0.0; s->ismaintermchanged = ae_true; @@ -8376,6 +8382,8 @@ void cqmscalevector(convexquadraticmodel* s, /* Real */ ae_vector* x, ae_state *_state) { + (void)_state; + ae_int_t n; ae_int_t i; double v; @@ -11672,7 +11680,7 @@ NOTE: this function can be called many times for optimizer which was *************************************************************************/ void sasstopoptimization(sactiveset* state, ae_state *_state) { - + (void)_state; state->algostate = 0; } @@ -13039,7 +13047,7 @@ provided to MinCGOptimize(). *************************************************************************/ void mincgsetxrep(mincgstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -13062,7 +13070,7 @@ may cause program failure. *************************************************************************/ void mincgsetdrep(mincgstate* state, ae_bool needdrep, ae_state *_state) { - + (void)_state; state->drep = needdrep; } @@ -13178,7 +13186,7 @@ iterations. *************************************************************************/ void mincgsetprecdefault(mincgstate* state, ae_state *_state) { - + (void)_state; state->prectype = 0; state->innerresetneeded = ae_true; @@ -13247,7 +13255,7 @@ iterations. *************************************************************************/ void mincgsetprecscale(mincgstate* state, ae_state *_state) { - + (void)_state; state->prectype = 3; state->innerresetneeded = ae_true; @@ -14239,6 +14247,8 @@ void mincgsetprecvarpart(mincgstate* state, /* Real */ ae_vector* d2, ae_state *_state) { + (void)_state; + ae_int_t i; ae_int_t n; @@ -14316,7 +14326,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) *************************************************************************/ static void mincg_clearrequestfields(mincgstate* state, ae_state *_state) { - + (void)_state; state->needf = ae_false; state->needfg = ae_false; @@ -14689,6 +14699,9 @@ void _mincgstate_destroy(void* _p) ae_bool _mincgreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + mincgreport *p = (mincgreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -14697,6 +14710,9 @@ ae_bool _mincgreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _mincgreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + mincgreport *dst = (mincgreport*)_dst; mincgreport *src = (mincgreport*)_src; dst->iterationscount = src->iterationscount; @@ -15173,7 +15189,7 @@ INPUT PARAMETERS: *************************************************************************/ void minbleicsetprecdefault(minbleicstate* state, ae_state *_state) { - + (void)_state; state->prectype = 0; } @@ -15241,7 +15257,7 @@ INPUT PARAMETERS: *************************************************************************/ void minbleicsetprecscale(minbleicstate* state, ae_state *_state) { - + (void)_state; state->prectype = 3; } @@ -15264,7 +15280,7 @@ void minbleicsetxrep(minbleicstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -15289,7 +15305,7 @@ void minbleicsetdrep(minbleicstate* state, ae_bool needdrep, ae_state *_state) { - + (void)_state; state->drep = needdrep; } @@ -17039,7 +17055,7 @@ Clears request fileds (to be sure that we don't forget to clear something) static void minbleic_clearrequestfields(minbleicstate* state, ae_state *_state) { - + (void)_state; state->needf = ae_false; state->needfg = ae_false; @@ -17126,7 +17142,7 @@ static void minbleic_updateestimateofgoodstep(double* estimate, double newstep, ae_state *_state) { - + (void)_state; if( ae_fp_eq(*estimate,0) ) { @@ -17394,6 +17410,9 @@ void _minbleicstate_destroy(void* _p) ae_bool _minbleicreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minbleicreport *p = (minbleicreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -17402,6 +17421,9 @@ ae_bool _minbleicreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _minbleicreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minbleicreport *dst = (minbleicreport*)_dst; minbleicreport *src = (minbleicreport*)_src; dst->iterationscount = src->iterationscount; @@ -17654,7 +17676,7 @@ void minlbfgssetxrep(minlbfgsstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -17818,7 +17840,7 @@ iterations. *************************************************************************/ void minlbfgssetprecdefault(minlbfgsstate* state, ae_state *_state) { - + (void)_state; state->prectype = 0; } @@ -17944,7 +17966,7 @@ INPUT PARAMETERS: *************************************************************************/ void minlbfgssetprecscale(minlbfgsstate* state, ae_state *_state) { - + (void)_state; state->prectype = 3; } @@ -18778,7 +18800,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) static void minlbfgs_clearrequestfields(minlbfgsstate* state, ae_state *_state) { - + (void)_state; state->needf = ae_false; state->needfg = ae_false; @@ -18935,6 +18957,9 @@ void _minlbfgsstate_destroy(void* _p) ae_bool _minlbfgsreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minlbfgsreport *p = (minlbfgsreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -18943,6 +18968,9 @@ ae_bool _minlbfgsreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _minlbfgsreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minlbfgsreport *dst = (minlbfgsreport*)_dst; minlbfgsreport *src = (minlbfgsreport*)_src; dst->iterationscount = src->iterationscount; @@ -19305,7 +19333,7 @@ INPUT PARAMETERS: *************************************************************************/ void minqpsetalgocholesky(minqpstate* state, ae_state *_state) { - + (void)_state; state->algokind = 1; } @@ -20542,7 +20570,7 @@ void minqpsetlineartermfast(minqpstate* state, /* Real */ ae_vector* b, ae_state *_state) { - + (void)_state; ae_v_move(&state->b.ptr.p_double[0], 1, &b->ptr.p_double[0], 1, ae_v_len(0,state->n-1)); } @@ -20640,6 +20668,8 @@ void minqpsetstartingpointfast(minqpstate* state, /* Real */ ae_vector* x, ae_state *_state) { + (void)_state; + ae_int_t n; @@ -20660,6 +20690,8 @@ void minqpsetoriginfast(minqpstate* state, /* Real */ ae_vector* xorigin, ae_state *_state) { + (void)_state; + ae_int_t n; @@ -21131,6 +21163,9 @@ void _minqpstate_destroy(void* _p) ae_bool _minqpreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minqpreport *p = (minqpreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -21139,6 +21174,9 @@ ae_bool _minqpreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _minqpreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minqpreport *dst = (minqpreport*)_dst; minqpreport *src = (minqpreport*)_src; dst->inneriterationscount = src->inneriterationscount; @@ -21542,7 +21580,7 @@ iterations are reported. *************************************************************************/ void minlmsetxrep(minlmstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -23115,7 +23153,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) *************************************************************************/ static void minlm_clearrequestfields(minlmstate* state, ae_state *_state) { - + (void)_state; state->needf = ae_false; state->needfg = ae_false; @@ -23487,6 +23525,9 @@ void _minlmstate_destroy(void* _p) ae_bool _minlmreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minlmreport *p = (minlmreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -23495,6 +23536,9 @@ ae_bool _minlmreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _minlmreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minlmreport *dst = (minlmreport*)_dst; minlmreport *src = (minlmreport*)_src; dst->iterationscount = src->iterationscount; @@ -23569,7 +23613,9 @@ void minbleicsetbarrierwidth(minbleicstate* state, double mu, ae_state *_state) { - + (void)state; + (void)mu; + (void)_state; } @@ -23585,7 +23631,9 @@ void minbleicsetbarrierdecay(minbleicstate* state, double mudecay, ae_state *_state) { - + (void)state; + (void)mudecay; + (void)_state; } @@ -23691,7 +23739,7 @@ Was replaced by MinBLEIC subpackage. *************************************************************************/ void minasasetxrep(minasastate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -24834,7 +24882,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) static void mincomp_clearrequestfields(minasastate* state, ae_state *_state) { - + (void)_state; state->needfg = ae_false; state->xupdated = ae_false; @@ -24997,6 +25045,9 @@ void _minasastate_destroy(void* _p) ae_bool _minasareport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minasareport *p = (minasareport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -25005,6 +25056,9 @@ ae_bool _minasareport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _minasareport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + minasareport *dst = (minasareport*)_dst; minasareport *src = (minasareport*)_src; dst->iterationscount = src->iterationscount; diff --git a/libs/alglib/src/solvers.cpp b/libs/alglib/src/solvers.cpp index f1632cd25e..33bb9047a4 100644 --- a/libs/alglib/src/solvers.cpp +++ b/libs/alglib/src/solvers.cpp @@ -4817,6 +4817,9 @@ static void densesolver_spdmatrixcholeskysolveinternal(/* Real */ ae_matrix* /* Real */ ae_matrix* x, ae_state *_state) { + (void)a; + (void)havea; + ae_frame _frame_block; ae_int_t i; ae_int_t j; @@ -5146,6 +5149,9 @@ static void densesolver_hpdmatrixcholeskysolveinternal(/* Complex */ ae_matrix* /* Complex */ ae_matrix* x, ae_state *_state) { + (void)a; + (void)havea; + ae_frame _frame_block; ae_int_t i; ae_int_t j; @@ -5274,6 +5280,11 @@ static ae_int_t densesolver_densesolverrfsmax(ae_int_t n, double rinf, ae_state *_state) { + (void)n; + (void)r1; + (void)rinf; + (void)_state; + ae_int_t result; @@ -5296,6 +5307,8 @@ static ae_int_t densesolver_densesolverrfsmaxv2(ae_int_t n, double r2, ae_state *_state) { + (void)r2; + ae_int_t result; @@ -5322,6 +5335,8 @@ static void densesolver_rbasiclusolve(/* Real */ ae_matrix* lua, /* Real */ ae_vector* tmp, ae_state *_state) { + (void)_state; + ae_int_t i; double v; @@ -5368,6 +5383,8 @@ static void densesolver_spdbasiccholeskysolve(/* Real */ ae_matrix* cha, /* Real */ ae_vector* tmp, ae_state *_state) { + (void)_state; + ae_int_t i; double v; @@ -5459,6 +5476,8 @@ static void densesolver_cbasiclusolve(/* Complex */ ae_matrix* lua, /* Complex */ ae_vector* tmp, ae_state *_state) { + (void)_state; + ae_int_t i; ae_complex v; @@ -5580,6 +5599,9 @@ static void densesolver_hpdbasiccholeskysolve(/* Complex */ ae_matrix* cha, ae_bool _densesolverreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + densesolverreport *p = (densesolverreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -5588,6 +5610,9 @@ ae_bool _densesolverreport_init(void* _p, ae_state *_state, ae_bool make_automat ae_bool _densesolverreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + densesolverreport *dst = (densesolverreport*)_dst; densesolverreport *src = (densesolverreport*)_src; dst->r1 = src->r1; @@ -6521,7 +6546,7 @@ void linlsqrsetxrep(linlsqrstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -6549,7 +6574,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) *************************************************************************/ static void linlsqr_clearrfields(linlsqrstate* state, ae_state *_state) { - + (void)_state; state->xupdated = ae_false; state->needmv = ae_false; @@ -6724,6 +6749,9 @@ void _linlsqrstate_destroy(void* _p) ae_bool _linlsqrreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + linlsqrreport *p = (linlsqrreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -6732,6 +6760,9 @@ ae_bool _linlsqrreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _linlsqrreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + linlsqrreport *dst = (linlsqrreport*)_dst; linlsqrreport *src = (linlsqrreport*)_src; dst->iterationscount = src->iterationscount; @@ -7659,7 +7690,7 @@ provided to MinCGOptimize(). *************************************************************************/ void lincgsetxrep(lincgstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -7687,7 +7718,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) *************************************************************************/ static void lincg_clearrfields(lincgstate* state, ae_state *_state) { - + (void)_state; state->xupdated = ae_false; state->needmv = ae_false; @@ -7703,7 +7734,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) *************************************************************************/ static void lincg_updateitersdata(lincgstate* state, ae_state *_state) { - + (void)_state; state->repiterationscount = 0; state->repnmv = 0; @@ -7849,6 +7880,9 @@ void _lincgstate_destroy(void* _p) ae_bool _lincgreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + lincgreport *p = (lincgreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -7857,6 +7891,9 @@ ae_bool _lincgreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _lincgreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + lincgreport *dst = (lincgreport*)_dst; lincgreport *src = (lincgreport*)_src; dst->iterationscount = src->iterationscount; @@ -8038,7 +8075,7 @@ provided to NLEQSolve(). *************************************************************************/ void nleqsetxrep(nleqstate* state, ae_bool needxrep, ae_state *_state) { - + (void)_state; state->xrep = needxrep; } @@ -8511,7 +8548,7 @@ Clears request fileds (to be sure that we don't forgot to clear something) *************************************************************************/ static void nleq_clearrequestfields(nleqstate* state, ae_state *_state) { - + (void)_state; state->needf = ae_false; state->needfij = ae_false; @@ -8672,6 +8709,9 @@ void _nleqstate_destroy(void* _p) ae_bool _nleqreport_init(void* _p, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + nleqreport *p = (nleqreport*)_p; ae_touch_ptr((void*)p); return ae_true; @@ -8680,6 +8720,9 @@ ae_bool _nleqreport_init(void* _p, ae_state *_state, ae_bool make_automatic) ae_bool _nleqreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic) { + (void)_state; + (void)make_automatic; + nleqreport *dst = (nleqreport*)_dst; nleqreport *src = (nleqreport*)_src; dst->iterationscount = src->iterationscount; diff --git a/libs/alglib/src/specialfunctions.cpp b/libs/alglib/src/specialfunctions.cpp index bd786b6779..b342e86769 100644 --- a/libs/alglib/src/specialfunctions.cpp +++ b/libs/alglib/src/specialfunctions.cpp @@ -5238,7 +5238,7 @@ static void bessel_besselmfirstcheb(double c, double* b2, ae_state *_state) { - + (void)_state; *b0 = c; *b1 = 0.0; @@ -5259,7 +5259,7 @@ static void bessel_besselmnextcheb(double x, double* b2, ae_state *_state) { - + (void)_state; *b2 = *b1; *b1 = *b0; @@ -5279,7 +5279,7 @@ static void bessel_besselm1firstcheb(double c, double* b2, ae_state *_state) { - + (void)_state; *b0 = c; *b1 = 0.0; @@ -5300,7 +5300,7 @@ static void bessel_besselm1nextcheb(double x, double* b2, ae_state *_state) { - + (void)_state; *b2 = *b1; *b1 = *b0; @@ -5313,6 +5313,8 @@ static void bessel_besselasympt0(double x, double* qzero, ae_state *_state) { + (void)_state; + double xsq; double p2; double q2; @@ -5361,6 +5363,8 @@ static void bessel_besselasympt1(double x, double* qzero, ae_state *_state) { + (void)_state; + double xsq; double p2; double q2; @@ -6648,6 +6652,8 @@ double chebyshevcalculate(ae_int_t r, double x, ae_state *_state) { + (void)_state; + ae_int_t i; double a; double b; @@ -6720,6 +6726,8 @@ double chebyshevsum(/* Real */ ae_vector* c, double x, ae_state *_state) { + (void)_state; + double b1; double b2; ae_int_t i; @@ -7004,6 +7012,8 @@ Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier *************************************************************************/ double dawsonintegral(double x, ae_state *_state) { + (void)_state; + double x2; double y; ae_int_t sg; @@ -8295,6 +8305,8 @@ Calculation of the value of the Hermite polynomial. *************************************************************************/ double hermitecalculate(ae_int_t n, double x, ae_state *_state) { + (void)_state; + ae_int_t i; double a; double b; @@ -8354,6 +8366,8 @@ double hermitesum(/* Real */ ae_vector* c, double x, ae_state *_state) { + (void)_state; + double b1; double b2; ae_int_t i; @@ -8553,6 +8567,8 @@ Calculation of the value of the Laguerre polynomial. *************************************************************************/ double laguerrecalculate(ae_int_t n, double x, ae_state *_state) { + (void)_state; + double a; double b; double i; @@ -8595,6 +8611,8 @@ double laguerresum(/* Real */ ae_vector* c, double x, ae_state *_state) { + (void)_state; + double b1; double b2; ae_int_t i; @@ -8654,6 +8672,8 @@ Calculation of the value of the Legendre polynomial Pn. *************************************************************************/ double legendrecalculate(ae_int_t n, double x, ae_state *_state) { + (void)_state; + double a; double b; ae_int_t i; @@ -8701,6 +8721,8 @@ double legendresum(/* Real */ ae_vector* c, double x, ae_state *_state) { + (void)_state; + double b1; double b2; ae_int_t i; @@ -9624,7 +9646,7 @@ static void trigintegrals_chebiterationshichi(double x, double* b2, ae_state *_state) { - + (void)_state; *b2 = *b1; *b1 = *b0; diff --git a/libs/opmapcontrol/src/internals/projections/lks94projection.cpp b/libs/opmapcontrol/src/internals/projections/lks94projection.cpp index f8a37c0be4..929af69b77 100644 --- a/libs/opmapcontrol/src/internals/projections/lks94projection.cpp +++ b/libs/opmapcontrol/src/internals/projections/lks94projection.cpp @@ -93,16 +93,8 @@ QVector LKS94Projection::DTM10(const QVector & lonlat) double es; // Eccentricity squared : (a^2 - b^2)/a^2 double semiMajor = 6378137.0; // major axis double semiMinor = 6356752.3142451793; // minor axis - double ab; // Semi_major / semi_minor - double ba; // Semi_minor / semi_major - double ses; // Second eccentricity squared : (a^2 - b^2)/b^2 es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); //e^2 - ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2); - ba = semiMinor / semiMajor; - ab = semiMajor / semiMinor; - - // ... double lon = DegreesToRadians(lonlat[0]); double lat = DegreesToRadians(lonlat[1]); @@ -126,16 +118,10 @@ QVector LKS94Projection::MTD10(QVector & pnt) double es; // Eccentricity squared : (a^2 - b^2)/a^2 double semiMajor = 6378137.0; // major axis double semiMinor = 6356752.3141403561; // minor axis - double ab; // Semi_major / semi_minor - double ba; // Semi_minor / semi_major double ses; // Second eccentricity squared : (a^2 - b^2)/b^2 es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); //e^2 ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2); - ba = semiMinor / semiMajor; - ab = semiMajor / semiMinor; - - // ... bool AtPole = false; // is location in polar region double Z = pnt.count() < 3 ? 0 : (pnt[2] != pnt[2]) ? 0 : pnt[2];//TODO NaN @@ -228,11 +214,10 @@ QVector LKS94Projection::DTM00(QVector & lonlat) double metersPerUnit = 1.0; double e0, e1, e2, e3; // eccentricity constants - double e, es, esp; // eccentricity constants + double es, esp; // eccentricity constants double ml0; // small value m es = 1.0 - pow(semiMinor / semiMajor, 2); - e = sqrt(es); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); @@ -292,16 +277,8 @@ QVector LKS94Projection::DTM01(QVector & lonlat) double es; // Eccentricity squared : (a^2 - b^2)/a^2 double semiMajor = 6378137.0; // major axis double semiMinor = 6356752.3141403561; // minor axis - double ab; // Semi_major / semi_minor - double ba; // Semi_minor / semi_major - double ses; // Second eccentricity squared : (a^2 - b^2)/b^2 es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); - ses = (pow(semiMajor, 2) -pow(semiMinor, 2)) / pow(semiMinor, 2); - ba = semiMinor / semiMajor; - ab = semiMajor / semiMinor; - - // ... double lon = DegreesToRadians(lonlat[0]); double lat = DegreesToRadians(lonlat[1]); @@ -324,14 +301,10 @@ QVector LKS94Projection::MTD01(QVector & pnt) double es; // Eccentricity squared : (a^2 - b^2)/a^2 double semiMajor = 6378137.0; // major axis double semiMinor = 6356752.3142451793; // minor axis - double ab; // Semi_major / semi_minor - double ba; // Semi_minor / semi_major double ses; // Second eccentricity squared : (a^2 - b^2)/b^2 es = 1.0 - (semiMinor * semiMinor) / (semiMajor * semiMajor); ses = (pow(semiMajor, 2) - pow(semiMinor, 2)) / pow(semiMinor, 2); - ba = semiMinor / semiMajor; - ab = semiMajor / semiMinor; // ... @@ -430,12 +403,11 @@ QVector LKS94Projection::MTD11(QVector & p) double metersPerUnit = 1.0; double e0, e1, e2, e3; // eccentricity constants - double e, es, esp; // eccentricity constants + double es, esp; // eccentricity constants double ml0; // small value m es =(semiMinor * semiMinor) / (semiMajor * semiMajor); es=1.0-es; - e = sqrt(es); e0 = e0fn(es); e1 = e1fn(es); e2 = e2fn(es); diff --git a/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp b/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp index a6a2ba3066..4dcc9d2867 100644 --- a/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp +++ b/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp @@ -59,11 +59,6 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const } internals::PointLatLng MercatorProjectionYandex::FromPixelToLatLng(const int &x, const int &y, const int &zoom) { - Size s = GetTileMatrixSizePixel(zoom); - - //double mapSizeX = s.Width(); - //double mapSizeY = s.Height(); - double a = 6378137; double c1 = 0.00335655146887969; double c2 = 0.00000657187271079536; diff --git a/qgcunittest.pro b/qgcunittest.pro index b8b8a5d564..c8abeac4c3 100644 --- a/qgcunittest.pro +++ b/qgcunittest.pro @@ -17,608 +17,28 @@ # along with QGroundControl. If not, see . # ------------------------------------------------- - # Qt configuration CONFIG += qt \ thread \ console -QT += network \ - opengl \ - svg \ - xml \ - phonon \ - webkit \ - sql \ - testlib \ - -TEMPLATE = app -TARGET = qgcunittest -BASEDIR = $${IN_PWD} -TESTDIR = $$BASEDIR/src/qgcunittest -linux-g++|linux-g++-64{ - debug { - TARGETDIR = $${OUT_PWD}/debug - BUILDDIR = $${OUT_PWD}/build-debug - } - release { - TARGETDIR = $${OUT_PWD}/release - BUILDDIR = $${OUT_PWD}/build-release - } -} else { - TARGETDIR = $${OUT_PWD} - BUILDDIR = $${OUT_PWD}/build -} -LANGUAGE = C++ -OBJECTS_DIR = $${BUILDDIR}/obj -MOC_DIR = $${BUILDDIR}/moc -UI_DIR = $${BUILDDIR}/ui -RCC_DIR = $${BUILDDIR}/rcc -MAVLINK_CONF = "" -MAVLINKPATH = $$BASEDIR/libs/mavlink/include/mavlink/v1.0 -DEFINES += MAVLINK_NO_DATA - -win32 { - QMAKE_INCDIR_QT = $$(QTDIR)/include - QMAKE_LIBDIR_QT = $$(QTDIR)/lib - QMAKE_UIC = "$$(QTDIR)/bin/uic.exe" - QMAKE_MOC = "$$(QTDIR)/bin/moc.exe" - QMAKE_RCC = "$$(QTDIR)/bin/rcc.exe" - QMAKE_QMAKE = "$$(QTDIR)/bin/qmake.exe" - # Build QAX for GoogleEarth API access - !exists( $(QTDIR)/src/activeqt/Makefile ) { - message( Making QAx (ONE TIME) ) - system( cd $$(QTDIR)\\src\\activeqt && $$(QTDIR)\\bin\\qmake.exe ) - system( cd $$(QTDIR)\\src\\activeqt\\container && $$(QTDIR)\\bin\\qmake.exe ) - system( cd $$(QTDIR)\\src\\activeqt\\control && $$(QTDIR)\\bin\\qmake.exe ) - } -} - - - -################################################################# -# EXTERNAL LIBRARY CONFIGURATION - -# EIGEN matrix library (header-only) -INCLUDEPATH += libs/eigen - -# OPMapControl library (from OpenPilot) -include(libs/utils/utils_external.pri) -include(libs/opmapcontrol/opmapcontrol_external.pri) -DEPENDPATH += \ - libs/utils \ - libs/utils/src \ - libs/opmapcontrol \ - libs/opmapcontrol/src \ - libs/opmapcontrol/src/mapwidget - -INCLUDEPATH += \ - libs/utils \ - libs \ - libs/opmapcontrol - -# If the user config file exists, it will be included. -# if the variable MAVLINK_CONF contains the name of an -# additional project, QGroundControl includes the support -# of custom MAVLink messages of this project -exists(user_config.pri) { - include(user_config.pri) - message("----- USING CUSTOM USER QGROUNDCONTROL CONFIG FROM user_config.pri -----") - message("Adding support for additional MAVLink messages for: " $$MAVLINK_CONF) - message("------------------------------------------------------------------------") -} -INCLUDEPATH += $$MAVLINKPATH -isEmpty(MAVLINK_CONF) { - INCLUDEPATH += $$MAVLINKPATH/common -} else { - INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF - #DEFINES += 'MAVLINK_CONF="$${MAVLINK_CONF}.h"' - DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF)) -} - -# Include general settings for QGroundControl -# necessary as last include to override any non-acceptable settings -# done by the plugins above -include(qgroundcontrol.pri) -# Reset QMAKE_POST_LINK to prevent file copy operations -QMAKE_POST_LINK = "" - -# Include MAVLink generator -# has been deprecated -DEPENDPATH += \ - src/apps/mavlinkgen - -INCLUDEPATH += \ - src/apps/mavlinkgen \ - src/apps/mavlinkgen/ui \ - src/apps/mavlinkgen/generator - -include(src/apps/mavlinkgen/mavlinkgen.pri) - - +QT += testlib -# Include QWT plotting library -include(libs/qwt/qwt.pri) -DEPENDPATH += . \ - plugins \ - libs/thirdParty/qserialport/include \ - libs/thirdParty/qserialport/include/QtSerialPort \ - libs/thirdParty/qserialport \ - libs/qextserialport - -INCLUDEPATH += . \ - libs/thirdParty/qserialport/include \ - libs/thirdParty/qserialport/include/QtSerialPort \ - libs/thirdParty/qserialport/src \ - libs/qextserialport - -# Include serial port library (QSerial) -include(qserialport.pri) - -# Serial port detection (ripped-off from qextserialport library) -macx|macx-g++|macx-g++42::SOURCES += libs/qextserialport/qextserialenumerator_osx.cpp -linux-g++::SOURCES += libs/qextserialport/qextserialenumerator_unix.cpp -linux-g++-64::SOURCES += libs/qextserialport/qextserialenumerator_unix.cpp -win32::SOURCES += libs/qextserialport/qextserialenumerator_win.cpp -win32-msvc2008|win32-msvc2010::SOURCES += libs/qextserialport/qextserialenumerator_win.cpp - -# Input -FORMS += src/ui/MainWindow.ui \ - src/ui/CommSettings.ui \ - src/ui/SerialSettings.ui \ - src/ui/UASControl.ui \ - src/ui/UASList.ui \ - src/ui/UASInfo.ui \ - src/ui/Linechart.ui \ - src/ui/UASView.ui \ - src/ui/ParameterInterface.ui \ - src/ui/WaypointList.ui \ - src/ui/ObjectDetectionView.ui \ - src/ui/JoystickWidget.ui \ - src/ui/DebugConsole.ui \ - src/ui/HDDisplay.ui \ - src/ui/MAVLinkSettingsWidget.ui \ - src/ui/AudioOutputWidget.ui \ - src/ui/QGCSensorSettingsWidget.ui \ - src/ui/watchdog/WatchdogControl.ui \ - src/ui/watchdog/WatchdogProcessView.ui \ - src/ui/watchdog/WatchdogView.ui \ - src/ui/QGCFirmwareUpdate.ui \ - src/ui/QGCPxImuFirmwareUpdate.ui \ - src/ui/QGCDataPlot2D.ui \ - src/ui/QGCRemoteControlView.ui \ - src/ui/QMap3D.ui \ - src/ui/QGCWebView.ui \ - src/ui/map3D/QGCGoogleEarthView.ui \ - src/ui/SlugsDataSensorView.ui \ - src/ui/SlugsHilSim.ui \ - src/ui/SlugsPadCameraControl.ui \ - src/ui/uas/QGCUnconnectedInfoWidget.ui \ - src/ui/designer/QGCToolWidget.ui \ - src/ui/designer/QGCParamSlider.ui \ - src/ui/designer/QGCActionButton.ui \ - src/ui/designer/QGCCommandButton.ui \ - src/ui/QGCMAVLinkLogPlayer.ui \ - src/ui/QGCWaypointListMulti.ui \ - src/ui/QGCUDPLinkConfiguration.ui \ - src/ui/QGCTCPLinkConfiguration.ui \ - src/ui/QGCSettingsWidget.ui \ - src/ui/UASControlParameters.ui \ - src/ui/map/QGCMapTool.ui \ - src/ui/map/QGCMapToolBar.ui \ - src/ui/QGCMAVLinkInspector.ui \ - src/ui/WaypointViewOnlyView.ui \ - src/ui/WaypointEditableView.ui \ - src/ui/UnconnectedUASInfoWidget.ui \ - src/ui/mavlink/QGCMAVLinkMessageSender.ui \ - src/ui/firmwareupdate/QGCFirmwareUpdateWidget.ui \ - src/ui/QGCPluginHost.ui \ - src/ui/firmwareupdate/QGCPX4FirmwareUpdate.ui \ - src/ui/mission/QGCMissionOther.ui \ - src/ui/mission/QGCMissionNavWaypoint.ui \ - src/ui/mission/QGCMissionDoJump.ui \ - src/ui/mission/QGCMissionConditionDelay.ui \ - src/ui/mission/QGCMissionNavLoiterUnlim.ui \ - src/ui/mission/QGCMissionNavLoiterTurns.ui \ - src/ui/mission/QGCMissionNavLoiterTime.ui \ - src/ui/mission/QGCMissionNavReturnToLaunch.ui \ - src/ui/mission/QGCMissionNavLand.ui \ - src/ui/mission/QGCMissionNavTakeoff.ui \ - -INCLUDEPATH += src \ - src/ui \ - src/ui/linechart \ - src/ui/uas \ - src/ui/map \ - src/uas \ - src/comm \ - include/ui \ - src/input \ - src/lib/qmapcontrol \ - src/ui/mavlink \ - src/ui/param \ - src/ui/watchdog \ - src/ui/map3D \ - src/ui/mission \ - src/ui/designer -HEADERS += src/MG.h \ - src/QGCCore.h \ - src/uas/UASInterface.h \ - src/uas/UAS.h \ - src/uas/UASManager.h \ - src/comm/LinkManager.h \ - src/comm/LinkInterface.h \ - src/comm/SerialLinkInterface.h \ - src/comm/SerialLink.h \ - src/comm/ProtocolInterface.h \ - src/comm/MAVLinkProtocol.h \ - src/comm/QGCFlightGearLink.h \ - src/ui/CommConfigurationWindow.h \ - src/ui/SerialConfigurationWindow.h \ - src/ui/MainWindow.h \ - src/ui/uas/UASControlWidget.h \ - src/ui/uas/UASListWidget.h \ - src/ui/uas/UASInfoWidget.h \ - src/ui/HUD.h \ - src/ui/linechart/LinechartWidget.h \ - src/ui/linechart/LinechartPlot.h \ - src/ui/linechart/Scrollbar.h \ - src/ui/linechart/ScrollZoomer.h \ - src/configuration.h \ - src/ui/uas/UASView.h \ - src/ui/CameraView.h \ - src/comm/MAVLinkSimulationLink.h \ - src/comm/UDPLink.h \ - src/ui/ParameterInterface.h \ - src/ui/WaypointList.h \ - src/Waypoint.h \ - src/ui/ObjectDetectionView.h \ - src/input/JoystickInput.h \ - src/ui/JoystickWidget.h \ - src/ui/DebugConsole.h \ - src/ui/HDDisplay.h \ - src/ui/MAVLinkSettingsWidget.h \ - src/ui/AudioOutputWidget.h \ - src/GAudioOutput.h \ - src/LogCompressor.h \ - src/ui/QGCParamWidget.h \ - src/ui/QGCSensorSettingsWidget.h \ - src/ui/linechart/Linecharts.h \ - src/uas/SlugsMAV.h \ - src/uas/PxQuadMAV.h \ - src/uas/ArduPilotMegaMAV.h \ - src/uas/senseSoarMAV.h \ - src/ui/watchdog/WatchdogControl.h \ - src/ui/watchdog/WatchdogProcessView.h \ - src/ui/watchdog/WatchdogView.h \ - src/uas/UASWaypointManager.h \ - src/ui/HSIDisplay.h \ - src/QGC.h \ - src/ui/QGCFirmwareUpdate.h \ - src/ui/QGCPxImuFirmwareUpdate.h \ - src/ui/QGCDataPlot2D.h \ - src/ui/linechart/IncrementalPlot.h \ - src/ui/QGCRemoteControlView.h \ - src/ui/RadioCalibration/RadioCalibrationData.h \ - src/ui/RadioCalibration/RadioCalibrationWindow.h \ - src/ui/RadioCalibration/AirfoilServoCalibrator.h \ - src/ui/RadioCalibration/SwitchCalibrator.h \ - src/ui/RadioCalibration/CurveCalibrator.h \ - src/ui/RadioCalibration/AbstractCalibrator.h \ - src/comm/QGCMAVLink.h \ - src/ui/QGCWebView.h \ - src/ui/map3D/QGCWebPage.h \ - src/ui/map3D/PixhawkCheetahNode.cc \ - src/ui/SlugsDataSensorView.h \ - src/ui/SlugsHilSim.h \ - src/ui/SlugsPadCameraControl.h \ - src/ui/QGCMainWindowAPConfigurator.h \ - src/comm/MAVLinkSwarmSimulationLink.h \ - src/ui/uas/QGCUnconnectedInfoWidget.h \ - src/ui/designer/QGCToolWidget.h \ - src/ui/designer/QGCParamSlider.h \ - src/ui/designer/QGCCommandButton.h \ - src/ui/designer/QGCToolWidgetItem.h \ - src/ui/QGCMAVLinkLogPlayer.h \ - src/comm/MAVLinkSimulationWaypointPlanner.h \ - src/comm/MAVLinkSimulationMAV.h \ - src/uas/QGCMAVLinkUASFactory.h \ - src/ui/QGCWaypointListMulti.h \ - src/ui/QGCUDPLinkConfiguration.h \ - src/ui/QGCTCPLinkConfiguration.h \ - src/ui/QGCSettingsWidget.h \ - src/ui/uas/UASControlParameters.h \ - src/uas/QGCUASParamManager.h \ - src/ui/map/QGCMapWidget.h \ - src/ui/map/MAV2DIcon.h \ - src/ui/map/Waypoint2DIcon.h \ - src/ui/map/QGCMapTool.h \ - src/ui/map/QGCMapToolBar.h \ - src/ui/mission/QGCMissionOther.h \ - src/ui/mission/QGCMissionConditionDelay.h \ - src/ui/mission/QGCMissionDoJump.h \ - src/ui/mission/QGCMissionNavReturnToLaunch.h \ - src/ui/mission/QGCMissionNavLoiterUnlim.h \ - src/ui/mission/QGCMissionNavLoiterTurns.h \ - src/ui/mission/QGCMissionNavTakeoff.h \ - src/ui/mission/QGCMissionNavLand.h \ - src/ui/mission/QGCMissionNavWaypoint.h \ - src/ui/mission/QGCMissionNavLoiterTime.h \ - libs/qextserialport/qextserialenumerator.h \ - src/QGCGeo.h \ - src/ui/QGCToolBar.h \ - src/ui/QGCMAVLinkInspector.h \ - src/ui/MAVLinkDecoder.h \ - src/ui/WaypointViewOnlyView.h \ - src/ui/WaypointViewOnlyView.h \ - src/ui/WaypointEditableView.h \ - src/ui/UnconnectedUASInfoWidget.h \ - src/ui/QGCRGBDView.h \ - src/ui/mavlink/QGCMAVLinkMessageSender.h \ - src/ui/firmwareupdate/QGCFirmwareUpdateWidget.h \ - src/ui/QGCPluginHost.h \ - src/ui/firmwareupdate/QGCPX4FirmwareUpdate.h \ - src/ui/mission/QGCMissionOther.h \ - src/ui/mission/QGCMissionNavWaypoint.h \ - src/ui/mission/QGCMissionDoJump.h \ - src/ui/mission/QGCMissionConditionDelay.h \ - src/ui/mission/QGCMissionNavLoiterUnlim.h \ - src/ui/mission/QGCMissionNavLoiterTurns.h \ - src/ui/mission/QGCMissionNavLoiterTime.h \ - src/ui/mission/QGCMissionNavReturnToLaunch.h \ - src/ui/mission/QGCMissionNavLand.h \ - src/ui/mission/QGCMissionNavTakeoff.h \ - $$TESTDIR/AutoTest.h \ - $$TESTDIR/UASUnitTest.h \ - -# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler -macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::HEADERS += src/ui/map3D/QGCGoogleEarthView.h - -contains(DEPENDENCIES_PRESENT, osg) { - message("Including headers for OpenSceneGraph") - - # Enable only if OpenSceneGraph is available - HEADERS += src/ui/map3D/gpl.h \ - src/ui/map3D/CameraParams.h \ - src/ui/map3D/ViewParamWidget.h \ - src/ui/map3D/SystemContainer.h \ - src/ui/map3D/SystemViewParams.h \ - src/ui/map3D/GlobalViewParams.h \ - src/ui/map3D/SystemGroupNode.h \ - src/ui/map3D/Q3DWidget.h \ - src/ui/map3D/GCManipulator.h \ - src/ui/map3D/ImageWindowGeode.h \ - src/ui/map3D/PixhawkCheetahGeode.h \ - src/ui/map3D/Pixhawk3DWidget.h \ - src/ui/map3D/Q3DWidgetFactory.h \ - src/ui/map3D/WebImageCache.h \ - src/ui/map3D/WebImage.h \ - src/ui/map3D/TextureCache.h \ - src/ui/map3D/Texture.h \ - src/ui/map3D/Imagery.h \ - src/ui/map3D/HUDScaleGeode.h \ - src/ui/map3D/WaypointGroupNode.h \ - src/ui/map3D/TerrainParamDialog.h \ - src/ui/map3D/ImageryParamDialog.h -} -contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) { - message("Including headers for Protocol Buffers") - - # Enable only if protobuf is available - HEADERS += libs/mavlink/include/v1.0/pixhawk/pixhawk.pb.h \ - src/ui/map3D/ObstacleGroupNode.h \ - src/ui/map3D/GLOverlayGeode.h -} -contains(DEPENDENCIES_PRESENT, libfreenect) { - message("Including headers for libfreenect") - - # Enable only if libfreenect is available - HEADERS += src/input/Freenect.h -} - -SOURCES += src/QGCCore.cc \ - src/uas/UASManager.cc \ - src/uas/UAS.cc \ - src/comm/LinkManager.cc \ - src/comm/LinkInterface.cpp \ - src/comm/SerialLink.cc \ - src/comm/MAVLinkProtocol.cc \ - src/comm/QGCFlightGearLink.cc \ - src/ui/CommConfigurationWindow.cc \ - src/ui/SerialConfigurationWindow.cc \ - src/ui/MainWindow.cc \ - src/ui/uas/UASControlWidget.cc \ - src/ui/uas/UASListWidget.cc \ - src/ui/uas/UASInfoWidget.cc \ - src/ui/HUD.cc \ - src/ui/linechart/LinechartWidget.cc \ - src/ui/linechart/LinechartPlot.cc \ - src/ui/linechart/Scrollbar.cc \ - src/ui/linechart/ScrollZoomer.cc \ - src/ui/uas/UASView.cc \ - src/ui/CameraView.cc \ - src/comm/MAVLinkSimulationLink.cc \ - src/comm/UDPLink.cc \ - src/ui/ParameterInterface.cc \ - src/ui/WaypointList.cc \ - src/Waypoint.cc \ - src/ui/ObjectDetectionView.cc \ - src/input/JoystickInput.cc \ - src/ui/JoystickWidget.cc \ - src/ui/DebugConsole.cc \ - src/ui/HDDisplay.cc \ - src/ui/MAVLinkSettingsWidget.cc \ - src/ui/AudioOutputWidget.cc \ - src/GAudioOutput.cc \ - src/LogCompressor.cc \ - src/ui/QGCParamWidget.cc \ - src/ui/QGCSensorSettingsWidget.cc \ - src/ui/linechart/Linecharts.cc \ - src/uas/SlugsMAV.cc \ - src/uas/PxQuadMAV.cc \ - src/uas/ArduPilotMegaMAV.cc \ - src/uas/senseSoarMAV.cpp \ - src/ui/watchdog/WatchdogControl.cc \ - src/ui/watchdog/WatchdogProcessView.cc \ - src/ui/watchdog/WatchdogView.cc \ - src/uas/UASWaypointManager.cc \ - src/ui/HSIDisplay.cc \ - src/QGC.cc \ - src/ui/QGCFirmwareUpdate.cc \ - src/ui/QGCPxImuFirmwareUpdate.cc \ - src/ui/QGCDataPlot2D.cc \ - src/ui/linechart/IncrementalPlot.cc \ - src/ui/QGCRemoteControlView.cc \ - src/ui/RadioCalibration/RadioCalibrationWindow.cc \ - src/ui/RadioCalibration/AirfoilServoCalibrator.cc \ - src/ui/RadioCalibration/SwitchCalibrator.cc \ - src/ui/RadioCalibration/CurveCalibrator.cc \ - src/ui/RadioCalibration/AbstractCalibrator.cc \ - src/ui/RadioCalibration/RadioCalibrationData.cc \ - src/ui/QGCWebView.cc \ - src/ui/map3D/QGCWebPage.cc \ - src/ui/SlugsDataSensorView.cc \ - src/ui/SlugsHilSim.cc \ - src/ui/SlugsPadCameraControl.cpp \ - src/ui/QGCMainWindowAPConfigurator.cc \ - src/comm/MAVLinkSwarmSimulationLink.cc \ - src/ui/uas/QGCUnconnectedInfoWidget.cc \ - src/ui/designer/QGCToolWidget.cc \ - src/ui/designer/QGCParamSlider.cc \ - src/ui/designer/QGCCommandButton.cc \ - src/ui/designer/QGCToolWidgetItem.cc \ - src/ui/QGCMAVLinkLogPlayer.cc \ - src/comm/MAVLinkSimulationWaypointPlanner.cc \ - src/comm/MAVLinkSimulationMAV.cc \ - src/uas/QGCMAVLinkUASFactory.cc \ - src/ui/QGCWaypointListMulti.cc \ - src/ui/QGCUDPLinkConfiguration.cc \ - src/ui/QGCTCPLinkConfiguration.cc \ - src/ui/QGCSettingsWidget.cc \ - src/ui/uas/UASControlParameters.cpp \ - src/uas/QGCUASParamManager.cc \ - src/ui/map/QGCMapWidget.cc \ - src/ui/map/MAV2DIcon.cc \ - src/ui/map/Waypoint2DIcon.cc \ - src/ui/map/QGCMapTool.cc \ - src/ui/map/QGCMapToolBar.cc \ - src/ui/mission/QGCMissionOther.cc \ - src/ui/mission/QGCMissionConditionDelay.cc \ - src/ui/mission/QGCMissionDoJump.cc \ - src/ui/mission/QGCMissionNavReturnToLaunch.cc \ - src/ui/mission/QGCMissionNavLoiterUnlim.cc \ - src/ui/mission/QGCMissionNavLoiterTurns.cc \ - src/ui/mission/QGCMissionNavTakeoff.cc \ - src/ui/mission/QGCMissionNavLand.cc \ - src/ui/mission/QGCMissionNavWaypoint.cc \ - src/ui/mission/QGCMissionNavLoiterTime.cc \ - src/ui/QGCToolBar.cc \ - src/ui/QGCMAVLinkInspector.cc \ - src/ui/MAVLinkDecoder.cc \ - src/ui/WaypointViewOnlyView.cc \ - src/ui/WaypointEditableView.cc \ - src/ui/UnconnectedUASInfoWidget.cc \ - src/ui/QGCRGBDView.cc \ - src/ui/mavlink/QGCMAVLinkMessageSender.cc \ - src/ui/firmwareupdate/QGCFirmwareUpdateWidget.cc \ - src/ui/QGCPluginHost.cc \ - src/ui/firmwareupdate/QGCPX4FirmwareUpdate.cc \ - $$TESTDIR/testSuite.cc \ - $$TESTDIR/UASUnitTest.cc - -# Enable Google Earth only on Mac OS and Windows with Visual Studio compiler -macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc - -# Enable OSG only if it has been found -contains(DEPENDENCIES_PRESENT, osg) { - message("Including sources for OpenSceneGraph") - - # Enable only if OpenSceneGraph is available - SOURCES += src/ui/map3D/gpl.cc \ - src/ui/map3D/CameraParams.cc \ - src/ui/map3D/ViewParamWidget.cc \ - src/ui/map3D/SystemContainer.cc \ - src/ui/map3D/SystemViewParams.cc \ - src/ui/map3D/GlobalViewParams.cc \ - src/ui/map3D/SystemGroupNode.cc \ - src/ui/map3D/Q3DWidget.cc \ - src/ui/map3D/ImageWindowGeode.cc \ - src/ui/map3D/GCManipulator.cc \ - src/ui/map3D/PixhawkCheetahNode.cc \ - src/ui/map3D/Pixhawk3DWidget.cc \ - src/ui/map3D/Q3DWidgetFactory.cc \ - src/ui/map3D/WebImageCache.cc \ - src/ui/map3D/WebImage.cc \ - src/ui/map3D/TextureCache.cc \ - src/ui/map3D/Texture.cc \ - src/ui/map3D/Imagery.cc \ - src/ui/map3D/HUDScaleGeode.cc \ - src/ui/map3D/WaypointGroupNode.cc \ - src/ui/map3D/TerrainParamDialog.cc \ - src/ui/map3D/ImageryParamDialog.cc - - contains(DEPENDENCIES_PRESENT, osgearth) { - message("Including sources for osgEarth") - - # Enable only if OpenSceneGraph is available - SOURCES += src/ui/map3D/QMap3D.cc - } +LinuxBuild { + message("Adding coverage information") + QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage + QMAKE_LFLAGS += -fprofile-arcs + LIBS += -lgcov } -contains(DEPENDENCIES_PRESENT, protobuf):contains(MAVLINK_CONF, pixhawk) { - message("Including sources for Protocol Buffers") - # Enable only if protobuf is available - SOURCES += libs/mavlink/share/mavlink/src/v1.0/pixhawk/pixhawk.pb.cc \ - src/ui/map3D/ObstacleGroupNode.cc \ - src/ui/map3D/GLOverlayGeode.cc -} -contains(DEPENDENCIES_PRESENT, libfreenect) { - message("Including sources for libfreenect") - - # Enable only if libfreenect is available - SOURCES += src/input/Freenect.cc -} +BASEDIR = $${IN_PWD} +TESTDIR = $$BASEDIR/src/qgcunittest -# Add icons and other resources -RESOURCES += qgroundcontrol.qrc +HEADERS += $$TESTDIR/AutoTest.h \ + $$TESTDIR/GAudioOutputTest.h \ + $$TESTDIR/TestFrameworkTest.h \ + $$TESTDIR/versioncomparatortest.h -# Include RT-LAB Library -win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin) { - message("Building support for Opal-RT") - LIBS += -LC:/OPAL-RT/RT-LAB7.2.4/Common/bin \ - -lOpalApi - INCLUDEPATH += src/lib/opalrt - HEADERS += src/comm/OpalRT.h \ - src/comm/OpalLink.h \ - src/comm/Parameter.h \ - src/comm/QGCParamID.h \ - src/comm/ParameterList.h \ - src/ui/OpalLinkConfigurationWindow.h - SOURCES += src/comm/OpalRT.cc \ - src/comm/OpalLink.cc \ - src/comm/Parameter.cc \ - src/comm/QGCParamID.cc \ - src/comm/ParameterList.cc \ - src/ui/OpalLinkConfigurationWindow.cc - FORMS += src/ui/OpalLinkSettings.ui - DEFINES += OPAL_RT -} -TRANSLATIONS += es-MX.ts \ - en-US.ts - -# xbee support -# libxbee only supported by linux and windows systems -win32-msvc2008|win32-msvc2010|linux { - HEADERS += src/comm/XbeeLinkInterface.h \ - src/comm/XbeeLink.h \ - src/comm/HexSpinBox.h \ - src/ui/XbeeConfigurationWindow.h \ - src/comm/CallConv.h - SOURCES += src/comm/XbeeLink.cpp \ - src/comm/HexSpinBox.cpp \ - src/ui/XbeeConfigurationWindow.cpp - DEFINES += XBEELINK - INCLUDEPATH += libs/thirdParty/libxbee -# TO DO: build library when it does not exist already - LIBS += -Llibs/thirdParty/libxbee/lib \ - -llibxbee -} +SOURCES += $$TESTDIR/testSuite.cc \ + $$TESTDIR/GAudioOutputTest.cc \ + $$TESTDIR/TestFrameworkTest.cc \ + $$TESTDIR/versioncomparatortest.cc diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index b1ed69fe5e..b0787d47b8 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -22,928 +22,20 @@ # along with QGroundControl. If not, see . # ------------------------------------------------- +include(apmplanner_core.pro) -message(Qt version $$[QT_VERSION]) +test { + message("Building unit tests") -# Setup our supported build types. We do this once here and then use the defined config scopes -# to allow us to easily modify suported build types in one place instead of duplicated throughout -# the project file. + TEMPLATE = app + TARGET = apmplanner2_test -linux-g++-64 { - message(Linux build x64_86) - CONFIG += LinuxBuild - DEFINES += Q_LINUX_64 - DISTRO = $$system(lsb_release -i) - contains( DISTRO, "Ubuntu" ) { - DEFINES += Q_UBUNTU - } -} else: linux-g++ { - message(Linux build x86) - CONFIG += LinuxBuild - DEFINES += Q_LINUX_32 - DISTRO = $$system(lsb_release -i) - contains( DISTRO, "Ubuntu" ) { - DEFINES += Q_UBUNTU - } + include(qgcunittest.pro) +} else: { + message("Building main application") -} else : win32-msvc2008 | win32-msvc2010 | win32-msvc2012 { - message(Windows build) - CONFIG += WindowsBuild -} else : win32-x-g++|win64-x-g++ { - message(Windows Cross Build) - CONFIG += WindowsCrossBuild -} else : macx-clang | macx-g++ { - message(Mac build) - CONFIG += MacBuild -} else { - error(Unsupported build type) -} - -# Setup our supported build flavors - -CONFIG(debug, debug|release) { - message(Debug flavor) - CONFIG += DebugBuild -} else:CONFIG(release, debug|release) { - message(Release flavor) - CONFIG += ReleaseBuild -} else { - error(Unsupported build flavor) -} - -# Setup our build directories - -BASEDIR = $${IN_PWD} -DebugBuild { - DESTDIR = $${OUT_PWD}/debug - BUILDDIR = $${OUT_PWD}/build-debug -} -ReleaseBuild { - DESTDIR = $${OUT_PWD}/release - BUILDDIR = $${OUT_PWD}/build-release -} -OBJECTS_DIR = $${BUILDDIR}/obj -MOC_DIR = $${BUILDDIR}/moc -UI_DIR = $${BUILDDIR}/ui -RCC_DIR = $${BUILDDIR}/rcc -LANGUAGE = C++ - -TEMPLATE = app -TARGET = apmplanner2 - -message(BASEDIR $$BASEDIR DESTDIR $$DESTDIR TARGET $$TARGET) - -# Qt configuration -CONFIG += qt \ - thread - -QT += network \ - opengl \ - svg \ - xml \ - sql \ - widgets \ - serialport \ - script\ - quick \ - printsupport \ - qml \ - quickwidgets - -## testlib is needed even in release flavor for QSignalSpy support -QT += testlib - -!NOTOUCH { - gittouch.commands = touch qgroundcontrol.pro - QMAKE_EXTRA_TARGETS += gittouch - POST_TARGETDEPS += gittouch -} - -# Turn off serial port warnings -DEFINES += _TTY_NOWARN_ - -#Turn on camera view -#DEFINES += AMERAVIEW -# -# Logging Library -# -include (QsLog/QsLog.pri) -#include (libs/mavlink/include/mavlink/v1.0-qt/mavlink.pri) -# -# OS Specific settings -# - -RaspberryPiBuild { - DEFINES -= CAMERAVIEW -} - -MacBuild { - QT += multimedia - - QMAKE_INFO_PLIST = Custom-Info.plist - CONFIG += x86_64 - CONFIG -= x86 -# QMAKE_MAC_SDK = macosx10.11 # Required for Xcode7.0 - QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 - ICON = $$BASEDIR/files/APMIcons/icon.icns - QMAKE_INFO_PLIST = APMPlanner.plist # Sets the pretty name for the build - - DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) - DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) - - LIBS += -lz - LIBS += -lssl -lcrypto - LIBS += -framework ApplicationServices -} - -LinuxBuild { - DEFINES += __STDC_LIMIT_MACROS - - DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) - DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) - - LIBS += -lsndfile -lasound - LIBS += -lz - LIBS += -lssl -lcrypto - DEFINES += OPENSSL -} - -WindowsBuild { - DEFINES += __STDC_LIMIT_MACROS - - # Specify multi-process compilation within Visual Studio. - # (drastically improves compilation times for multi-core computers) - QMAKE_CXXFLAGS_DEBUG += -MP - QMAKE_CXXFLAGS_RELEASE += -MP - - # QWebkit is not needed on MS-Windows compilation environment - CONFIG -= webkit - - RC_FILE = $$BASEDIR/qgroundcontrol.rc - - DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) - DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) -} - -WindowsCrossBuild { - QT += script - # Windows version cross compiled on linux using - DEFINES += __STDC_LIMIT_MACROS - - # QWebkit is not needed on MS-Windows compilation environment - CONFIG -= webkit - - RC_FILE = $$BASEDIR/qgroundcontrol.rc - LIBS += -lz - CONFIG += exceptions rtti - - DEFINES += GIT_COMMIT=$$system(git describe --dirty=-DEV --always) - DEFINES += GIT_HASH=$$system(git log -n 1 --pretty=format:%H) -} + TEMPLATE = app + TARGET = apmplanner2 -# -# Build flavor specific settings -# - -DebugBuild { -#Let console be defined by the IDE/Build process. - #CONFIG += console -} - -ReleaseBuild { - DEFINES += QT_NO_DEBUG - - WindowsBuild { - # Use link time code generation for beteer optimization (I believe this is supported in msvc express, but not 100% sure) - QMAKE_LFLAGS_LTCG = /LTCG - QMAKE_CFLAGS_LTCG = -GL - } + SOURCES += src/main.cc } - -# -# Unit Test specific configuration goes here (debug only) -# - -#DebugBuild { -# INCLUDEPATH += \ -# src/qgcunittest - -# HEADERS += \ -# src/qgcunittest/AutoTest.h \ -# src/qgcunittest/UASUnitTest.h \ -# src/qgcunittest/MockUASManager.h \ -# src/qgcunittest/MockUAS.h \ -# src/qgcunittest/MockQGCUASParamManager.h \ -# src/qgcunittest/MultiSignalSpy.h \ -# src/qgcunittest/TCPLinkTest.h \ -# src/qgcunittest/FlightModeConfigTest.h - -# SOURCES += \ -# src/qgcunittest/UASUnitTest.cc \ -# src/qgcunittest/MockUASManager.cc \ -# src/qgcunittest/MockUAS.cc \ -# src/qgcunittest/MockQGCUASParamManager.cc \ -# src/qgcunittest/MultiSignalSpy.cc \ -# src/qgcunittest/TCPLinkTest.cc \ -# src/qgcunittest/FlightModeConfigTest.cc -#} - -# -# External library configuration -# - -include(QGCExternalLibs.pri) - -# -# Post link configuration -# - -include(QGCSetup.pri) - -# -# Main QGroundControl portion of project file -# - -RESOURCES += qgroundcontrol.qrc - -TRANSLATIONS += \ - es-MX.ts \ - en-US.ts - -DEPENDPATH += \ - . \ - plugins - -INCLUDEPATH += . - -INCLUDEPATH += \ - src \ - src/ui \ - src/ui/linechart \ - src/ui/uas \ - src/ui/map \ - src/uas \ - src/comm \ - include/ui \ - src/input \ - src/lib/qmapcontrol \ - src/ui/mavlink \ - src/ui/param \ - src/ui/watchdog \ - src/ui/map3D \ - src/ui/mission \ - src/ui/designer \ - src/ui/configuration \ - src/output - -FORMS += \ - src/ui/MainWindow.ui \ - src/ui/CommSettings.ui \ - src/ui/SerialSettings.ui \ - src/ui/UASControl.ui \ - src/ui/UASList.ui \ - src/ui/UASInfo.ui \ - src/ui/UASView.ui \ - src/ui/ParameterInterface.ui \ - src/ui/WaypointList.ui \ - src/ui/ObjectDetectionView.ui \ - src/ui/JoystickWidget.ui \ - src/ui/HDDisplay.ui \ - src/ui/MAVLinkSettingsWidget.ui \ - src/ui/AudioOutputWidget.ui \ - src/ui/QGCSensorSettingsWidget.ui \ - src/ui/watchdog/WatchdogControl.ui \ - src/ui/watchdog/WatchdogProcessView.ui \ - src/ui/watchdog/WatchdogView.ui \ - src/ui/QGCFirmwareUpdate.ui \ - src/ui/QGCPxImuFirmwareUpdate.ui \ - src/ui/QMap3D.ui \ - src/ui/SlugsDataSensorView.ui \ - src/ui/SlugsHilSim.ui \ - src/ui/SlugsPadCameraControl.ui \ - src/ui/uas/QGCUnconnectedInfoWidget.ui \ - src/ui/designer/QGCToolWidget.ui \ - src/ui/designer/QGCParamSlider.ui \ - src/ui/designer/QGCActionButton.ui \ - src/ui/designer/QGCCommandButton.ui \ - src/ui/QGCMAVLinkLogPlayer.ui \ - src/ui/QGCWaypointListMulti.ui \ - src/ui/QGCUDPLinkConfiguration.ui \ - src/ui/QGCUDPClientLinkConfiguration.ui \ - src/ui/QGCTCPLinkConfiguration.ui \ - src/ui/QGCSettingsWidget.ui \ - src/ui/map/QGCMapTool.ui \ - src/ui/map/QGCMapToolBar.ui \ - src/ui/QGCMAVLinkInspector.ui \ - src/ui/WaypointViewOnlyView.ui \ - src/ui/WaypointEditableView.ui \ - src/ui/UnconnectedUASInfoWidget.ui \ - src/ui/mavlink/QGCMAVLinkMessageSender.ui \ - src/ui/firmwareupdate/QGCFirmwareUpdateWidget.ui \ - src/ui/QGCPluginHost.ui \ - src/ui/firmwareupdate/QGCPX4FirmwareUpdate.ui \ - src/ui/mission/QGCMissionOther.ui \ - src/ui/mission/QGCMissionNavWaypoint.ui \ - src/ui/mission/QGCMissionDoJump.ui \ - src/ui/mission/QGCMissionDoSetServo.ui \ - src/ui/mission/QGCMissionDoRepeatServo.ui \ - src/ui/mission/QGCMissionDoDigicamControl.ui \ - src/ui/mission/QGCMissionDoChangeSpeed.ui \ - src/ui/mission/QGCMissionDoSetCamTriggDist.ui \ - src/ui/mission/QGCMissionDoSetHome.ui \ - src/ui/mission/QGCMissionDoSetRelay.ui \ - src/ui/mission/QGCMissionDoSetROI.ui \ - src/ui/mission/QGCMissionDoMountControl.ui \ - src/ui/mission/QGCMissionDoRepeatRelay.ui \ - src/ui/mission/QGCMissionConditionDelay.ui \ - src/ui/mission/QGCMissionConditionYaw.ui \ - src/ui/mission/QGCMissionConditionDistance.ui \ - src/ui/mission/QGCMissionNavLoiterUnlim.ui \ - src/ui/mission/QGCMissionNavLoiterTurns.ui \ - src/ui/mission/QGCMissionNavLoiterTime.ui \ - src/ui/mission/QGCMissionNavLoiterToAlt.ui \ - src/ui/mission/QGCMissionNavReturnToLaunch.ui \ - src/ui/mission/QGCMissionNavLand.ui \ - src/ui/mission/QGCMissionNavTakeoff.ui \ - src/ui/mission/QGCMissionNavSweep.ui \ - src/ui/mission/QGCMissionNavContinueChangeAlt.ui \ - src/ui/mission/QGCMissionDoStartSearch.ui \ - src/ui/mission/QGCMissionDoFinishSearch.ui \ - src/ui/QGCVehicleConfig.ui \ - src/ui/QGCHilConfiguration.ui \ - src/ui/QGCHilFlightGearConfiguration.ui \ - src/ui/QGCHilJSBSimConfiguration.ui \ -# src/ui/QGCHilXPlaneConfiguration.ui \ - src/ui/designer/QGCComboBox.ui \ - src/ui/designer/QGCTextLabel.ui \ - src/ui/uas/UASQuickView.ui \ - src/ui/uas/UASQuickViewItemSelect.ui \ - src/ui/uas/UASActionsWidget.ui \ - src/ui/QGCTabbedInfoView.ui \ - src/ui/UASRawStatusView.ui \ - src/ui/uas/QGCMessageView.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/RangeFinderConfig.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/CopterPidConfig.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/configuration/TerminalConsole.ui \ - src/ui/configuration/LogConsole.ui \ - src/ui/configuration/SerialSettingsDialog.ui \ - src/ui/configuration/ApmFirmwareConfig.ui \ - src/ui/DebugOutput.ui \ - src/ui/configuration/SetupWarningMessage.ui \ - src/ui/uas/APMShortcutModesDialog.ui \ - src/ui/configuration/DownloadRemoteParamsDialog.ui \ - src/ui/configuration/ParamCompareDialog.ui \ - src/ui/AP2DataPlot2D.ui \ - src/ui/dataselectionscreen.ui \ - src/ui/AboutDialog.ui \ - src/ui/AP2DataPlotAxisDialog.ui \ - src/ui/AutoUpdateDialog.ui \ - src/uas/LogDownloadDialog.ui \ - src/ui/configuration/CompassMotorCalibrationDialog.ui \ - src/ui/MissionElevationDisplay.ui \ - src/ui/DroneshareUploadDialog.ui \ - src/ui/DroneshareDialog.ui \ - src/ui/uas/PreFlightCalibrationDialog.ui \ - src/ui/configuration/RadioFlashWizard.ui - -HEADERS += \ - src/MG.h \ - src/QGCCore.h \ - src/uas/UASInterface.h \ - src/uas/UAS.h \ - src/uas/UASManager.h \ - src/comm/LinkManager.h \ - src/comm/LinkInterface.h \ - src/comm/SerialLinkInterface.h \ - src/comm/ProtocolInterface.h \ - src/comm/QGCFlightGearLink.h \ - src/comm/QGCJSBSimLink.h \ -# src/comm/QGCXPlaneLink.h \ - src/comm/serialconnection.h \ - src/ui/CommConfigurationWindow.h \ - src/ui/SerialConfigurationWindow.h \ - src/ui/MainWindow.h \ - src/ui/uas/UASControlWidget.h \ - src/ui/uas/UASListWidget.h \ - src/ui/uas/UASInfoWidget.h \ - src/ui/HUD.h \ - src/configuration.h \ - src/ui/uas/UASView.h \ -#if defined(CAMERAVIEW) - src/ui/CameraView.h \ -#endif - src/comm/MAVLinkSimulationLink.h \ - src/comm/UDPLink.h \ - src/comm/UDPClientLink.h \ - src/comm/TCPLink.h \ - src/ui/ParameterInterface.h \ - src/ui/WaypointList.h \ - src/ui/WaypointNavigation.h \ - src/Waypoint.h \ - src/ui/ObjectDetectionView.h \ - src/input/JoystickInput.h \ - src/ui/JoystickWidget.h \ - src/ui/HDDisplay.h \ - src/ui/MAVLinkSettingsWidget.h \ - src/ui/AudioOutputWidget.h \ - src/GAudioOutput.h \ - src/LogCompressor.h \ - src/ui/QGCParamWidget.h \ - src/ui/QGCSensorSettingsWidget.h \ - src/uas/SlugsMAV.h \ - src/uas/PxQuadMAV.h \ - src/uas/ArduPilotMegaMAV.h \ - src/uas/senseSoarMAV.h \ - src/ui/watchdog/WatchdogControl.h \ - src/ui/watchdog/WatchdogProcessView.h \ - src/ui/watchdog/WatchdogView.h \ - src/uas/UASWaypointManager.h \ - src/ui/HSIDisplay.h \ - src/QGC.h \ - src/ui/QGCFirmwareUpdate.h \ - src/ui/QGCPxImuFirmwareUpdate.h \ - src/ui/RadioCalibration/RadioCalibrationData.h \ - src/comm/QGCMAVLink.h \ - src/ui/SlugsDataSensorView.h \ - src/ui/SlugsHilSim.h \ - src/ui/SlugsPadCameraControl.h \ - src/ui/QGCMainWindowAPConfigurator.h \ - src/comm/MAVLinkSwarmSimulationLink.h \ - src/ui/uas/QGCUnconnectedInfoWidget.h \ - src/ui/designer/QGCToolWidget.h \ - src/ui/designer/QGCParamSlider.h \ - src/ui/designer/QGCCommandButton.h \ - src/ui/designer/QGCToolWidgetItem.h \ - src/ui/QGCMAVLinkLogPlayer.h \ - src/comm/MAVLinkSimulationWaypointPlanner.h \ - src/comm/MAVLinkSimulationMAV.h \ - src/uas/QGCMAVLinkUASFactory.h \ - src/ui/QGCWaypointListMulti.h \ - src/ui/QGCUDPLinkConfiguration.h \ - src/ui/QGCUDPClientLinkConfiguration.h \ - src/ui/QGCTCPLinkConfiguration.h \ - src/ui/QGCSettingsWidget.h \ - src/uas/QGCUASParamManager.h \ - src/ui/map/QGCMapWidget.h \ - src/ui/map/MAV2DIcon.h \ - src/ui/map/Waypoint2DIcon.h \ - src/ui/map/QGCMapTool.h \ - src/ui/map/QGCMapToolBar.h \ - src/QGCGeo.h \ - src/ui/QGCToolBar.h \ - src/ui/QGCStatusBar.h \ - src/ui/QGCMAVLinkInspector.h \ - src/ui/WaypointViewOnlyView.h \ - src/ui/WaypointEditableView.h \ - src/ui/UnconnectedUASInfoWidget.h \ - src/ui/QGCRGBDView.h \ - src/ui/mavlink/QGCMAVLinkMessageSender.h \ - src/ui/firmwareupdate/QGCFirmwareUpdateWidget.h \ - src/ui/QGCPluginHost.h \ - src/ui/firmwareupdate/QGCPX4FirmwareUpdate.h \ - src/ui/mission/QGCMissionOther.h \ - src/ui/mission/QGCMissionNavWaypoint.h \ - src/ui/mission/QGCMissionDoJump.h \ - src/ui/mission/QGCMissionDoSetServo.h \ - src/ui/mission/QGCMissionDoRepeatServo.h \ - src/ui/mission/QGCMissionDoDigicamControl.h \ - src/ui/mission/QGCMissionDoChangeSpeed.h \ - src/ui/mission/QGCMissionDoSetCamTriggDist.h \ - src/ui/mission/QGCMissionDoSetHome.h \ - src/ui/mission/QGCMissionDoSetRelay.h \ - src/ui/mission/QGCMissionDoSetROI.h \ - src/ui/mission/QGCMissionDoMountControl.h \ - src/ui/mission/QGCMissionDoRepeatRelay.h \ - src/ui/mission/QGCMissionConditionDelay.h \ - src/ui/mission/QGCMissionConditionYaw.h \ - src/ui/mission/QGCMissionConditionDistance.h \ - src/ui/mission/QGCMissionNavLoiterUnlim.h \ - src/ui/mission/QGCMissionNavLoiterTurns.h \ - src/ui/mission/QGCMissionNavLoiterTime.h \ - src/ui/mission/QGCMissionNavLoiterToAlt.h \ - src/ui/mission/QGCMissionNavReturnToLaunch.h \ - src/ui/mission/QGCMissionNavLand.h \ - src/ui/mission/QGCMissionNavTakeoff.h \ - src/ui/mission/QGCMissionNavSweep.h \ - src/ui/mission/QGCMissionNavContinueChangeAlt.h \ - src/ui/mission/QGCMissionDoStartSearch.h \ - src/ui/mission/QGCMissionDoFinishSearch.h \ - src/ui/QGCVehicleConfig.h \ - src/comm/QGCHilLink.h \ - src/ui/QGCHilConfiguration.h \ - src/ui/QGCHilFlightGearConfiguration.h \ - src/ui/QGCHilJSBSimConfiguration.h \ -# src/ui/QGCHilXPlaneConfiguration.h \ - src/ui/designer/QGCComboBox.h \ - src/ui/designer/QGCTextLabel.h \ - src/ui/submainwindow.h \ - src/ui/dockwidgettitlebareventfilter.h \ - src/ui/uas/UASQuickView.h \ - src/ui/uas/UASQuickViewItem.h \ - src/ui/uas/UASQuickViewItemSelect.h \ - src/ui/uas/UASQuickViewTextItem.h \ - src/ui/uas/UASQuickViewGaugeItem.h \ - src/ui/uas/UASActionsWidget.h \ - src/ui/designer/QGCRadioChannelDisplay.h \ - src/ui/QGCTabbedInfoView.h \ - src/ui/UASRawStatusView.h \ - src/ui/PrimaryFlightDisplay.h \ - src/ui/uas/QGCMessageView.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/RangeFinderConfig.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/configuration/CopterPidConfig.h \ - src/ui/ApmToolBar.h \ - src/ui/configuration/PX4FirmwareUploader.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/configuration/Console.h \ - src/ui/configuration/SerialSettingsDialog.h \ - src/ui/configuration/TerminalConsole.h \ - src/ui/configuration/LogConsole.h \ - src/ui/configuration/ApmHighlighter.h \ - src/ui/configuration/ApmFirmwareConfig.h \ - src/ui/designer/QGCMouseWheelEventFilter.h \ - src/ui/DebugOutput.h \ - src/ui/configuration/APDoubleSpinBox.h \ - src/ui/configuration/APSpinBox.h \ - src/ui/configuration/Radio3DRSettings.h \ - src/ui/configuration/SetupWarningMessage.h \ - src/ui/uas/APMShortcutModesDialog.h \ - src/ui/configuration/DownloadRemoteParamsDialog.h \ - src/ui/configuration/ParamCompareDialog.h \ - src/uas/UASParameter.h \ - src/output/kmlcreator.h \ - src/output/logdata.h \ - src/ui/AP2DataPlot2D.h \ - src/ui/AP2DataPlotThread.h \ - src/ui/dataselectionscreen.h \ - src/ui/qcustomplot.h \ - src/globalobject.h \ - src/ui/AboutDialog.h \ - src/ui/uas/UASQuickViewTextLabel.h \ - src/uas/ApmUiHelpers.h \ - src/ui/AP2DataPlotAxisDialog.h \ - src/comm/arduino_intelhex.h \ - src/comm/arduinoflash.h \ - src/audio/AlsaAudio.h \ - src/ui/AutoUpdateCheck.h \ - src/ui/AutoUpdateDialog.h \ - src/uas/LogDownloadDialog.h \ - src/comm/TLogReplayLink.h \ - src/ui/PrimaryFlightDisplayQML.h \ - src/ui/configuration/CompassMotorCalibrationDialog.h \ - src/comm/MAVLinkDecoder.h \ - src/comm/MAVLinkProtocol.h \ - src/ui/MissionElevationDisplay.h \ - src/ui/GoogleElevationData.h \ - src/ui/DroneshareUploadDialog.h \ - src/ui/DroneshareUpload.h \ - src/ui/DroneshareDialog.h \ - src/ui/LoginDialog.h \ - src/ui/DroneshareAPIBroker.h \ - src/comm/UASObject.h \ - src/comm/VehicleOverview.h \ - src/comm/RelPositionOverview.h \ - src/comm/AbsPositionOverview.h \ - src/comm/MissionOverview.h \ - src/ui/AP2DataPlot2DModel.h \ - src/ui/uas/PreFlightCalibrationDialog.h \ - src/ui/configuration/RadioFlashWizard.h \ - src/ui/GraphTreeWidgetItem.h \ - src/comm/LinkManagerFactory.h \ - src/ui/VibrationMonitor.h \ - src/ui/EKFMonitor.h \ - src/Settings.h - -SOURCES += src/main.cc \ - src/QGCCore.cc \ - src/uas/UASManager.cc \ - src/uas/UAS.cc \ - src/comm/LinkManager.cc \ - src/comm/LinkInterface.cpp \ - src/comm/QGCFlightGearLink.cc \ - src/comm/QGCJSBSimLink.cc \ -# src/comm/QGCXPlaneLink.cc \ - src/comm/serialconnection.cc \ - src/ui/CommConfigurationWindow.cc \ - src/ui/SerialConfigurationWindow.cc \ - src/ui/MainWindow.cc \ - src/ui/uas/UASControlWidget.cc \ - src/ui/uas/UASListWidget.cc \ - src/ui/uas/UASInfoWidget.cc \ - src/ui/HUD.cc \ - src/ui/uas/UASView.cc \ -#ifdef CAMERAVIEW - src/ui/CameraView.cc \ -#endif - src/comm/MAVLinkSimulationLink.cc \ - src/comm/UDPLink.cc \ - src/comm/UDPClientLink.cc \ - src/comm/TCPLink.cc \ - src/ui/ParameterInterface.cc \ - src/ui/WaypointList.cc \ - src/ui/WaypointNavigation.cc \ - src/Waypoint.cc \ - src/ui/ObjectDetectionView.cc \ - src/input/JoystickInput.cc \ - src/ui/JoystickWidget.cc \ - src/ui/HDDisplay.cc \ - src/ui/MAVLinkSettingsWidget.cc \ - src/ui/AudioOutputWidget.cc \ - src/GAudioOutput.cc \ - src/LogCompressor.cc \ - src/ui/QGCParamWidget.cc \ - src/ui/QGCSensorSettingsWidget.cc \ - src/uas/SlugsMAV.cc \ - src/uas/PxQuadMAV.cc \ - src/uas/ArduPilotMegaMAV.cc \ - src/uas/senseSoarMAV.cpp \ - src/ui/watchdog/WatchdogControl.cc \ - src/ui/watchdog/WatchdogProcessView.cc \ - src/ui/watchdog/WatchdogView.cc \ - src/uas/UASWaypointManager.cc \ - src/ui/HSIDisplay.cc \ - src/QGC.cc \ - src/ui/QGCFirmwareUpdate.cc \ - src/ui/QGCPxImuFirmwareUpdate.cc \ - src/ui/RadioCalibration/RadioCalibrationData.cc \ - src/ui/SlugsDataSensorView.cc \ - src/ui/SlugsHilSim.cc \ - src/ui/SlugsPadCameraControl.cpp \ - src/ui/QGCMainWindowAPConfigurator.cc \ - src/comm/MAVLinkSwarmSimulationLink.cc \ - src/ui/uas/QGCUnconnectedInfoWidget.cc \ - src/ui/designer/QGCToolWidget.cc \ - src/ui/designer/QGCParamSlider.cc \ - src/ui/designer/QGCCommandButton.cc \ - src/ui/designer/QGCToolWidgetItem.cc \ - src/ui/QGCMAVLinkLogPlayer.cc \ - src/comm/MAVLinkSimulationWaypointPlanner.cc \ - src/comm/MAVLinkSimulationMAV.cc \ - src/uas/QGCMAVLinkUASFactory.cc \ - src/ui/QGCWaypointListMulti.cc \ - src/ui/QGCUDPLinkConfiguration.cc \ - src/ui/QGCUDPClientLinkConfiguration.cc \ - src/ui/QGCTCPLinkConfiguration.cc \ - src/ui/QGCSettingsWidget.cc \ - src/uas/QGCUASParamManager.cc \ - src/ui/map/QGCMapWidget.cc \ - src/ui/map/MAV2DIcon.cc \ - src/ui/map/Waypoint2DIcon.cc \ - src/ui/map/QGCMapTool.cc \ - src/ui/map/QGCMapToolBar.cc \ - src/QGCGeo.cc \ - src/ui/QGCToolBar.cc \ - src/ui/QGCStatusBar.cc \ - src/ui/QGCMAVLinkInspector.cc \ - src/ui/WaypointViewOnlyView.cc \ - src/ui/WaypointEditableView.cc \ - src/ui/UnconnectedUASInfoWidget.cc \ - src/ui/QGCRGBDView.cc \ - src/ui/mavlink/QGCMAVLinkMessageSender.cc \ - src/ui/firmwareupdate/QGCFirmwareUpdateWidget.cc \ - src/ui/QGCPluginHost.cc \ - src/ui/firmwareupdate/QGCPX4FirmwareUpdate.cc \ - src/ui/mission/QGCMissionOther.cc \ - src/ui/mission/QGCMissionNavWaypoint.cc \ - src/ui/mission/QGCMissionDoJump.cc \ - src/ui/mission/QGCMissionDoSetServo.cc \ - src/ui/mission/QGCMissionDoRepeatServo.cc \ - src/ui/mission/QGCMissionDoDigicamControl.cc \ - src/ui/mission/QGCMissionDoChangeSpeed.cc \ - src/ui/mission/QGCMissionDoSetCamTriggDist.cc \ - src/ui/mission/QGCMissionDoSetHome.cc \ - src/ui/mission/QGCMissionDoSetRelay.cc \ - src/ui/mission/QGCMissionDoSetROI.cc \ - src/ui/mission/QGCMissionDoMountControl.cc \ - src/ui/mission/QGCMissionDoRepeatRelay.cc \ - src/ui/mission/QGCMissionConditionDelay.cc \ - src/ui/mission/QGCMissionConditionYaw.cc \ - src/ui/mission/QGCMissionConditionDistance.cc \ - src/ui/mission/QGCMissionNavLoiterUnlim.cc \ - src/ui/mission/QGCMissionNavLoiterTurns.cc \ - src/ui/mission/QGCMissionNavLoiterTime.cc \ - src/ui/mission/QGCMissionNavLoiterToAlt.cc \ - src/ui/mission/QGCMissionNavReturnToLaunch.cc \ - src/ui/mission/QGCMissionNavLand.cc \ - src/ui/mission/QGCMissionNavTakeoff.cc \ - src/ui/mission/QGCMissionNavSweep.cc \ - src/ui/mission/QGCMissionNavContinueChangeAlt.cc \ - src/ui/mission/QGCMissionDoStartSearch.cc \ - src/ui/mission/QGCMissionDoFinishSearch.cc \ - src/ui/QGCVehicleConfig.cc \ - src/ui/QGCHilConfiguration.cc \ - src/ui/QGCHilFlightGearConfiguration.cc \ - src/ui/QGCHilJSBSimConfiguration.cc \ -# src/ui/QGCHilXPlaneConfiguration.cc \ - src/ui/designer/QGCComboBox.cc \ - src/ui/designer/QGCTextLabel.cc \ - src/ui/submainwindow.cpp \ - src/ui/dockwidgettitlebareventfilter.cpp \ - src/ui/uas/UASQuickViewItem.cc \ - src/ui/uas/UASQuickView.cc \ - src/ui/uas/UASQuickViewTextItem.cc \ - src/ui/uas/UASQuickViewGaugeItem.cc \ - src/ui/uas/UASQuickViewItemSelect.cc \ - src/ui/uas/UASActionsWidget.cpp \ - src/ui/designer/QGCRadioChannelDisplay.cpp \ - src/ui/QGCTabbedInfoView.cpp \ - src/ui/UASRawStatusView.cpp \ - src/ui/PrimaryFlightDisplay.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/RangeFinderConfig.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/configuration/CopterPidConfig.cc \ - src/ui/ApmToolBar.cc \ - src/ui/configuration/PX4FirmwareUploader.cc \ - 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/configuration/TerminalConsole.cc \ - src/ui/configuration/LogConsole.cc \ - src/ui/configuration/Console.cc \ - src/ui/configuration/SerialSettingsDialog.cc \ - src/ui/configuration/ApmHighlighter.cc \ - src/ui/configuration/ApmFirmwareConfig.cc \ - src/ui/designer/QGCMouseWheelEventFilter.cc \ - src/ui/DebugOutput.cc \ - src/ui/configuration/APDoubleSpinBox.cc \ - src/ui/configuration/APSpinBox.cc \ - src/ui/configuration/Radio3DRSettings.cc \ - src/ui/configuration/SetupWarningMessage.cc \ - src/ui/uas/APMShortcutModesDialog.cpp \ - src/ui/configuration/DownloadRemoteParamsDialog.cc \ - src/ui/configuration/ParamCompareDialog.cpp \ - src/uas/UASParameter.cpp \ - src/output/kmlcreator.cc \ - src/output/logdata.cc \ - src/ui/AP2DataPlot2D.cpp \ - src/ui/AP2DataPlotThread.cc \ - src/ui/dataselectionscreen.cpp \ - src/ui/qcustomplot.cpp \ - src/globalobject.cc \ - src/ui/AboutDialog.cc \ - src/ui/uas/UASQuickViewTextLabel.cc \ - src/uas/ApmUiHelpers.cc \ - src/ui/AP2DataPlotAxisDialog.cc \ - src/comm/arduino_intelhex.cpp \ - src/comm/arduinoflash.cc \ - src/audio/AlsaAudio.cc \ - src/ui/AutoUpdateCheck.cc \ - src/ui/AutoUpdateDialog.cc \ - src/uas/LogDownloadDialog.cc \ - src/comm/TLogReplayLink.cc \ - src/ui/PrimaryFlightDisplayQML.cpp \ - src/ui/configuration/CompassMotorCalibrationDialog.cpp \ - src/comm/MAVLinkDecoder.cc \ - src/comm/MAVLinkProtocol.cc \ - src/ui/MissionElevationDisplay.cpp \ - src/ui/GoogleElevationData.cpp \ - src/ui/DroneshareUploadDialog.cpp \ - src/ui/DroneshareUpload.cpp \ - src/ui/DroneshareDialog.cc \ - src/ui/LoginDialog.cpp \ - src/ui/DroneshareAPIBroker.cpp \ - src/comm/UASObject.cc \ - src/comm/VehicleOverview.cc \ - src/comm/RelPositionOverview.cc \ - src/comm/AbsPositionOverview.cc \ - src/comm/MissionOverview.cc \ - src/ui/AP2DataPlot2DModel.cc \ - src/ui/uas/PreFlightCalibrationDialog.cpp \ - src/ui/configuration/RadioFlashWizard.cpp \ - src/ui/GraphTreeWidgetItem.cc \ - src/comm/LinkManagerFactory.cpp \ - src/ui/VibrationMonitor.cpp \ - src/ui/EKFMonitor.cpp \ - src/Settings.cpp - -MacBuild | WindowsBuild : contains(GOOGLEEARTH, enable) { #fix this to make sense ;) - message(Including support for Google Earth) - QT += webkit webkitwidgets - HEADERS += src/ui/map3D/QGCWebPage.h - SOURCES += src/ui/map3D/QGCWebPage.cc - -} else { - message(Skipping support for Google Earth) -} - -OTHER_FILES += \ - qml/components/DigitalDisplay.qml \ - qml/components/StatusDisplay.qml \ - qml/components/ModeDisplay.qml \ - qml/components/HeartbeatDisplay.qml \ - qml/PrimaryFlightDisplayQML.qml \ - qml/components/RollPitchIndicator.qml \ - qml/components/AltitudeIndicator.qml \ - qml/components/SpeedIndicator.qml \ - qml/components/CompassIndicator.qml \ - qml/components/PitchIndicator.qml \ - qml/components/StatusMessageIndicator.qml \ - qml/components/InformationOverlayIndicator.qml \ - -OTHER_FILES += \ - qml/ApmToolBar.qml \ - qml/components/Button.qml \ - qml/components/TextButton.qml \ - qml/resources/apmplanner/toolbar/connect.png \ - qml/resources/apmplanner/toolbar/flightplanner.png \ - qml/resources/apmplanner/toolbar/helpwizard.png \ - qml/resources/apmplanner/toolbar/light_initialsetup_icon.png \ - qml/resources/apmplanner/toolbar/terminal.png \ - qml/resources/apmplanner/toolbar/simulation.png \ - qml/resources/apmplanner/toolbar/light_tuningconfig_icon.png \ - qml/resources/apmplanner/toolbar/flightdata.png \ - qml/resources/apmplanner/toolbar/disconnect.png \ - qml/resources/apmplanner/toolbar/donate.png - -OTHER_FILES += \ - qml/VibrationMonitor.qml \ - qml/EKFMonitor.qml - -# Command Line Tools -OTHER_FILES += \ - libs/sik_uploader/sik_uploader.py - -#qmlcomponents.path += $${DESTDIR}$${TARGET}/components -#qmlcomponents.files += ./components/Button.qml - -#sources.files += ApmToolBar.qml -#sources.path += $$DESTDIR/qml -#target.path += apmplanner2 -#INSTALLS += sources target - -DISTFILES += \ - qml/components/BarGauge.qml - - diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index 489cfad36a..244d601053 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -62,6 +62,7 @@ extern CComModule _Module; #ifdef Q_OS_LINUX extern "C" { #include + cst_voice* register_cmu_us_kal(const char* voxdir); }; #endif @@ -238,7 +239,7 @@ bool GAudioOutput::say(QString text, int severity) if (file.open(QIODevice::ReadWrite)) { QLOG_INFO() << file.fileName() << " file not exist, create a new one"; - cst_voice *v = new_voice(); + cst_voice *v = register_cmu_us_kal(NULL); cst_wave *wav = flite_text_to_wave(text.toStdString().c_str(), v); cst_wave_save(wav, file.fileName().toStdString().c_str(), "riff"); file.close(); diff --git a/src/comm/AbsPositionOverview.cc b/src/comm/AbsPositionOverview.cc index 1f58bd3121..45b25a06fc 100644 --- a/src/comm/AbsPositionOverview.cc +++ b/src/comm/AbsPositionOverview.cc @@ -2,12 +2,11 @@ AbsPositionOverview::AbsPositionOverview(QObject *parent) : QObject(parent), - m_alt(0.0), m_cog (0.0), m_eph (0.0),m_epv (0), - m_fixType (0.0), m_hdg (0.0), m_lat (0.0), m_lon (0), - m_relativeAlt (0.0), m_satellitesVisible (0.0), - m_timeBootMs (0.0) , m_timeUsec (0.0), m_vel (0.0), - m_vx (0.0), m_vy (0.0),m_vz (0.0) - + m_timeUsec (0.0), m_lat (0.0), m_lon (0), m_alt(0.0), + m_eph (0.0),m_epv (0), m_vel (0.0), m_cog (0.0), + m_fixType (0.0), m_satellitesVisible (0.0), m_timeBootMs (0.0), + m_relativeAlt (0.0), + m_vx (0.0), m_vy (0.0),m_vz (0.0), m_hdg (0.0) { /* The defaults above are used to ensure the variables are * initalised to known values and dont cause random errors. diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 3cffc81e1b..62dee6500a 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -124,7 +124,6 @@ void LinkManager::loadSettings() for (int i=0;igetId(),"Connected to link, but unable to receive any mavlink packets, (link is silent). Disconnecting"); diff --git a/src/comm/MAVLinkSimulationWaypointPlanner.cc b/src/comm/MAVLinkSimulationWaypointPlanner.cc index 1df77e13bc..bdc4c651ab 100644 --- a/src/comm/MAVLinkSimulationWaypointPlanner.cc +++ b/src/comm/MAVLinkSimulationWaypointPlanner.cc @@ -453,8 +453,6 @@ MAVLinkSimulationWaypointPlanner::MAVLinkSimulationWaypointPlanner(MAVLinkSimula compid(MAV_COMP_ID_MISSIONPLANNER), setpointDelay(10), yawTolerance(0.4f), - verbose(true), - debug(false), silent(false) { connect(parent, SIGNAL(messageReceived(mavlink_message_t)), this, SLOT(handleMessage(mavlink_message_t))); @@ -478,9 +476,7 @@ void MAVLinkSimulationWaypointPlanner::send_waypoint_ack(uint8_t target_systemid mavlink_msg_mission_ack_encode(systemid, compid, &msg, &wpa); link->sendMAVLinkMessage(&msg); - - - if (verbose) QLOG_INFO() << "Sent waypoint ack (%u) to ID" << wpa.type << wpa.target_system << "\n"; + QLOG_INFO() << "Sent waypoint ack (%u) to ID" << wpa.type << wpa.target_system << "\n"; } /* @@ -505,9 +501,7 @@ void MAVLinkSimulationWaypointPlanner::send_waypoint_current(uint16_t seq) mavlink_msg_mission_current_encode(systemid, compid, &msg, &wpc); link->sendMAVLinkMessage(&msg); - - - if (verbose) QLOG_INFO() << "Broadcasted new current waypoint " << wpc.seq << "\n"; + QLOG_INFO() << "Broadcasted new current waypoint " << wpc.seq << "\n"; } } @@ -526,24 +520,10 @@ void MAVLinkSimulationWaypointPlanner::send_setpoint(uint16_t seq) // send new set point to local IMU if (cur->frame == MAV_FRAME_LOCAL_NED || cur->frame == MAV_FRAME_LOCAL_ENU) { - mavlink_message_t msg; -// [REMOVED from AP2] mavlink_set_local_position_setpoint_t PControlSetPoint; - -// PControlSetPoint.target_system = systemid; -// PControlSetPoint.target_component = MAV_COMP_ID_IMU; -// PControlSetPoint.x = cur->x; -// PControlSetPoint.y = cur->y; -// PControlSetPoint.z = cur->z; -// PControlSetPoint.yaw = cur->param4; -// PControlSetPoint.coordinate_frame = cur->frame; - -// mavlink_msg_set_local_position_setpoint_encode(systemid, compid, &msg, &PControlSetPoint); -// link->sendMAVLinkMessage(&msg); -// emit messageSent(msg); uint64_t now = QGC::groundTimeMilliseconds(); timestamp_last_send_setpoint = now; - } else if (verbose) { + } else { qDebug("No new set point sent to IMU because the new waypoint %u had no local coordinates\n", cur->seq); } @@ -562,8 +542,8 @@ void MAVLinkSimulationWaypointPlanner::send_waypoint_count(uint8_t target_system mavlink_msg_mission_count_encode(systemid, compid, &msg, &wpc); link->sendMAVLinkMessage(&msg); - if (verbose) QLOG_INFO() << "Sent waypoint count (" << wpc.count - << " << ) to ID " << wpc.target_system << "\n"; + QLOG_INFO() << "Sent waypoint count (" << wpc.count + << " << ) to ID " << wpc.target_system << "\n"; } @@ -576,18 +556,18 @@ void MAVLinkSimulationWaypointPlanner::send_waypoint(uint8_t target_systemid, ui wp->target_system = target_systemid; wp->target_component = target_compid; - if (verbose) QLOG_INFO() << "Sent waypoint " << wp->seq << " (" << wp->target_system << " / " + QLOG_INFO() << "Sent waypoint " << wp->seq << " (" << wp->target_system << " / " << wp->target_component << " / " << wp->seq << " / " << wp->frame << " / " << wp->command << " / " << wp->param3 << " / " << wp->param1 << " / " << wp->param2 << " / " << wp->current << " / " << wp->x << " / " << wp->y << " / " << wp->z << " / " << wp->param4 << " / " << wp->autocontinue << ")\n"; mavlink_msg_mission_item_encode(systemid, compid, &msg, wp); link->sendMAVLinkMessage(&msg); - if (verbose) QLOG_INFO() << "Sent waypoint " << wp->seq << "to ID " << wp->target_system << "\n"; + QLOG_INFO() << "Sent waypoint " << wp->seq << "to ID " << wp->target_system << "\n"; } else { - if (verbose) QLOG_INFO() << "ERROR: index out of bounds\n"; + QLOG_INFO() << "ERROR: index out of bounds\n"; } } @@ -600,7 +580,7 @@ void MAVLinkSimulationWaypointPlanner::send_waypoint_request(uint8_t target_syst wpr.seq = seq; mavlink_msg_mission_request_encode(systemid, compid, &msg, &wpr); link->sendMAVLinkMessage(&msg); - if (verbose) QLOG_INFO() << "Sent waypoint request " << wpr.seq << " to ID "<< wpr.target_system << "\n"; + QLOG_INFO() << "Sent waypoint request " << wpr.seq << " to ID "<< wpr.target_system << "\n"; } @@ -622,7 +602,7 @@ void MAVLinkSimulationWaypointPlanner::send_waypoint_reached(uint16_t seq) mavlink_msg_mission_item_reached_encode(systemid, compid, &msg, &wp_reached); link->sendMAVLinkMessage(&msg); - if (verbose) QLOG_INFO() << "Sent waypoint " << wp_reached.seq << " reached message\n"; + QLOG_INFO() << "Sent waypoint " << wp_reached.seq << " reached message\n"; } @@ -697,7 +677,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* uint64_t now = QGC::groundTimeMilliseconds(); if (now-protocol_timestamp_lastaction > protocol_timeout && current_state != PX_WPP_IDLE) { - if (verbose) QLOG_INFO() << "Last operation (state=%u) timed out, changing state to PX_WPP_IDLE" << current_state; + QLOG_INFO() << "Last operation (state=%u) timed out, changing state to PX_WPP_IDLE" << current_state; current_state = PX_WPP_IDLE; protocol_current_count = 0; protocol_current_partner_systemid = 0; @@ -816,7 +796,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* mavlink_command_long_t action; mavlink_msg_command_long_decode(msg, &action); if(action.target_system == systemid) { - if (verbose) QLOG_INFO() << "Waypoint: received message with action " << action.command << "\n"; + QLOG_INFO() << "Waypoint: received message with action " << action.command << "\n"; // switch (action.action) { // case MAV_ACTION_LAUNCH: // if (verbose) std::cerr << "Launch received" << std::endl; @@ -858,7 +838,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if (current_state == PX_WPP_SENDLIST || current_state == PX_WPP_SENDLIST_SENDWPS) { if (protocol_current_wp_id == waypoints->size()-1) { - if (verbose) QLOG_INFO() << "Received Ack after having sent last waypoint, going to state PX_WPP_IDLE\n"; + QLOG_INFO() << "Received Ack after having sent last waypoint, going to state PX_WPP_IDLE\n"; current_state = PX_WPP_IDLE; protocol_current_wp_id = 0; } @@ -876,7 +856,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if (current_state == PX_WPP_IDLE) { if (wpc.seq < waypoints->size()) { - if (verbose) QLOG_INFO() << "Received MAVLINK_MSG_ID_MISSION_ITEM_SET_CURRENT\n"; + QLOG_INFO() << "Received MAVLINK_MSG_ID_MISSION_ITEM_SET_CURRENT\n"; current_active_wp_id = wpc.seq; uint32_t i; for(i = 0; i < waypoints->size(); i++) { @@ -886,14 +866,14 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* waypoints->at(i)->current = false; } } - if (verbose) QLOG_INFO() << "New current waypoint " << current_active_wp_id << "\n"; + QLOG_INFO() << "New current waypoint " << current_active_wp_id << "\n"; yawReached = false; posReached = false; send_waypoint_current(current_active_wp_id); send_setpoint(current_active_wp_id); timestamp_firstinside_orbit = 0; } else { - if (verbose) QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_SET_CURRENT: Index out of bounds\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_SET_CURRENT: Index out of bounds\n"; } } } else { @@ -912,28 +892,30 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if (current_state == PX_WPP_IDLE || current_state == PX_WPP_SENDLIST) { if (waypoints->size() > 0) { - if (verbose && current_state == PX_WPP_IDLE) - QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST from" - << msg->sysid <<" changing state to PX_WPP_SENDLIST\n"; - if (verbose && current_state == PX_WPP_SENDLIST) - QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST again from" - << msg->sysid << "staying in state PX_WPP_SENDLIST\n"; + if (current_state == PX_WPP_IDLE) { + QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST from" + << msg->sysid <<" changing state to PX_WPP_SENDLIST\n"; + } + if (current_state == PX_WPP_SENDLIST) { + QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST again from" + << msg->sysid << "staying in state PX_WPP_SENDLIST\n"; + } current_state = PX_WPP_SENDLIST; protocol_current_wp_id = 0; protocol_current_partner_systemid = msg->sysid; protocol_current_partner_compid = msg->compid; } else { - if (verbose) QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST from " - << msg->sysid << " but have no waypoints, staying in \n"; + QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST from " + << msg->sysid << " but have no waypoints, staying in \n"; } protocol_current_count = waypoints->size(); send_waypoint_count(msg->sysid,msg->compid, protocol_current_count); } else { - if (verbose) QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST because i'm doing something else already (state=" - << current_state << ").\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST because i'm doing something else already (state=" + << current_state << ").\n"; } } else { - if (verbose) QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST because not my systemid or compid.\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST_LIST because not my systemid or compid.\n"; } break; } @@ -952,54 +934,57 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* || (current_state == PX_WPP_SENDLIST_SENDWPS && (wpr.seq == protocol_current_wp_id || wpr.seq == protocol_current_wp_id + 1) && wpr.seq < waypoints->size())) { - if (verbose && current_state == PX_WPP_SENDLIST) + if (current_state == PX_WPP_SENDLIST) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST of waypoint" << wpr.seq << "from" << msg->sysid << "changing state to PX_WPP_SENDLIST_SENDWPS\n"; - if (verbose && current_state == PX_WPP_SENDLIST_SENDWPS - && wpr.seq == protocol_current_wp_id + 1) + } + if (current_state == PX_WPP_SENDLIST_SENDWPS + && wpr.seq == protocol_current_wp_id + 1) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST of waypoint " - << wpr.seq << " from " << msg->sysid << " staying in state PX_WPP_SENDLIST_SENDWPS\n"; - if (verbose && current_state == PX_WPP_SENDLIST_SENDWPS - && wpr.seq == protocol_current_wp_id) + << wpr.seq << " from " << msg->sysid << " staying in state PX_WPP_SENDLIST_SENDWPS\n"; + } + if (current_state == PX_WPP_SENDLIST_SENDWPS + && wpr.seq == protocol_current_wp_id) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_REQUEST of waypoint " << wpr.seq << "(again) from " << msg->sysid << " staying in state PX_WPP_SENDLIST_SENDWPS\n"; - + } current_state = PX_WPP_SENDLIST_SENDWPS; protocol_current_wp_id = wpr.seq; send_waypoint(protocol_current_partner_systemid, protocol_current_partner_compid, wpr.seq); } else { - if (verbose) { - if (!(current_state == PX_WPP_SENDLIST || current_state == PX_WPP_SENDLIST_SENDWPS)) { - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because i'm \ - doing something else already (state=" << current_state << ").\n"; - break; - } else if (current_state == PX_WPP_SENDLIST) { - if (wpr.seq != 0) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because the first requested waypoint ID (" - << wpr.seq << ") was not 0.\n"; - } else if (current_state == PX_WPP_SENDLIST_SENDWPS) { - if (wpr.seq != protocol_current_wp_id && wpr.seq != protocol_current_wp_id + 1) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because the requested waypoint ID (" - << wpr.seq << ") was not the expected (" - << protocol_current_wp_id << " or " << protocol_current_wp_id+1 << ").\n"; - else if (wpr.seq >= waypoints->size()) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because the requested waypoint ID (" - << wpr.seq << ") was out of bounds.\n"; - } else { - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST - FIXME: missed error description\n"; + + if (!(current_state == PX_WPP_SENDLIST || current_state == PX_WPP_SENDLIST_SENDWPS)) { + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because i'm \ + doing something else already (state=" << current_state << ").\n"; + break; + } else if (current_state == PX_WPP_SENDLIST) { + if (wpr.seq != 0) { + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because the first requested waypoint ID (" + << wpr.seq << ") was not 0.\n"; + } + } else if (current_state == PX_WPP_SENDLIST_SENDWPS) { + if (wpr.seq != protocol_current_wp_id && wpr.seq != protocol_current_wp_id + 1) + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because the requested waypoint ID (" + << wpr.seq << ") was not the expected (" + << protocol_current_wp_id << " or " << protocol_current_wp_id+1 << ").\n"; + else if (wpr.seq >= waypoints->size()) { + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST because the requested waypoint ID (" + << wpr.seq << ") was out of bounds.\n"; } + } else { + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST - FIXME: missed error description\n"; } + } } else { //we we're target but already communicating with someone else if((wpr.target_system == systemid && wpr.target_component == compid) && !(msg->sysid == protocol_current_partner_systemid && msg->compid == protocol_current_partner_compid)) { - if (verbose) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST from ID " - << msg->sysid << " because i'm already talking to ID " - << protocol_current_partner_systemid << ".\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_REQUEST from ID " + << msg->sysid << " because i'm already talking to ID " + << protocol_current_partner_systemid << ".\n"; } } break; @@ -1013,15 +998,16 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if (current_state == PX_WPP_IDLE || (current_state == PX_WPP_GETLIST && protocol_current_wp_id == 0)) { if (wpc.count > 0) { - if (verbose && current_state == PX_WPP_IDLE) + if (current_state == PX_WPP_IDLE) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_COUNT (" << wpc.count << ") from " << msg->sysid << " changing state to PX_WPP_GETLIST\n"; - if (verbose && current_state == PX_WPP_GETLIST) + } + if (current_state == PX_WPP_GETLIST) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_COUNT (" << wpc.count << ") again from " << msg->sysid << "\n"; - + } current_state = PX_WPP_GETLIST; protocol_current_wp_id = 0; protocol_current_partner_systemid = msg->sysid; @@ -1036,17 +1022,20 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* send_waypoint_request(protocol_current_partner_systemid, protocol_current_partner_compid, protocol_current_wp_id); } else { - if (verbose) QLOG_INFO() << "Ignoring MAVLINK_MSG_ID_MISSION_COUNT from " - << msg->sysid << " with count of " << wpc.count << "\n"; + QLOG_INFO() << "Ignoring MAVLINK_MSG_ID_MISSION_COUNT from " + << msg->sysid << " with count of " << wpc.count << "\n"; } } else { - if (verbose && !(current_state == PX_WPP_IDLE || current_state == PX_WPP_GETLIST)) + if (!(current_state == PX_WPP_IDLE || current_state == PX_WPP_GETLIST)) { QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_COUNT because i'm doing something else already (state=" << current_state << ").\n"; - else if (verbose && current_state == PX_WPP_GETLIST && protocol_current_wp_id != 0) + } else if (current_state == PX_WPP_GETLIST && protocol_current_wp_id != 0) { QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_COUNT because i'm already receiving waypoint " << protocol_current_wp_id << ".\n"; - else QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_COUNT - FIXME: missed error description\n"; + } + else { + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_COUNT - FIXME: missed error description\n"; + } } } break; @@ -1065,17 +1054,19 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if ((current_state == PX_WPP_GETLIST && wp.seq == 0) || (current_state == PX_WPP_GETLIST_GETWPS && wp.seq == protocol_current_wp_id && wp.seq < protocol_current_count)) { - if (verbose && current_state == PX_WPP_GETLIST) + if (current_state == PX_WPP_GETLIST) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM " << wp.seq << " from " << msg->sysid << " changing state to PX_WPP_GETLIST_GETWPS\n"; - if (verbose && current_state == PX_WPP_GETLIST_GETWPS && wp.seq == protocol_current_wp_id) + } + if (current_state == PX_WPP_GETLIST_GETWPS && wp.seq == protocol_current_wp_id) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM " << wp.seq << " from " << msg->sysid << "\n"; - if (verbose && current_state == PX_WPP_GETLIST_GETWPS && wp.seq-1 == protocol_current_wp_id) + } + if (current_state == PX_WPP_GETLIST_GETWPS && wp.seq-1 == protocol_current_wp_id) { QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM " << wp.seq << " (again) from " << msg->sysid << "\n"; - + } current_state = PX_WPP_GETLIST_GETWPS; protocol_current_wp_id = wp.seq + 1; mavlink_mission_item_t* newwp = new mavlink_mission_item_t; @@ -1083,7 +1074,6 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* waypoints_receive_buffer->push_back(newwp); if(protocol_current_wp_id == protocol_current_count && current_state == PX_WPP_GETLIST_GETWPS) { - if (verbose) QLOG_INFO() << "Got all " << protocol_current_count << " waypoints, changing state to PX_WPP_IDLE\n"; @@ -1130,44 +1120,42 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* send_waypoint_ack(protocol_current_partner_systemid, protocol_current_partner_compid, 0); QLOG_INFO() << "Received MAVLINK_MSG_ID_MISSION_ITEM while state=PX_WPP_IDLE, answered with WAYPOINT_ACK.\n"; } - if (verbose) { - if (!(current_state == PX_WPP_GETLIST || current_state == PX_WPP_GETLIST_GETWPS)) { + + if (!(current_state == PX_WPP_GETLIST || current_state == PX_WPP_GETLIST_GETWPS)) { + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " + << wp.seq << " because i'm doing something else already (state=" + << current_state << ").\n"; + break; + } else if (current_state == PX_WPP_GETLIST) { + if(!(wp.seq == 0)) + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM because the first waypoint ID (" + << wp.seq <<") was not 0.\n"; + else QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " - << wp.seq << " because i'm doing something else already (state=" - << current_state << ").\n"; - break; - } else if (current_state == PX_WPP_GETLIST) { - if(!(wp.seq == 0)) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM because the first waypoint ID (" - << wp.seq <<") was not 0.\n"; - else - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " - << wp.seq << " - FIXME: missed error description\n"; - } else if (current_state == PX_WPP_GETLIST_GETWPS) { - if (!(wp.seq == protocol_current_wp_id)) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM because the waypoint ID (" - << wp.seq << ") was not the expected " - << protocol_current_wp_id << ".\n"; - else if (!(wp.seq < protocol_current_count)) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM because the waypoint ID (" - << wp.seq << ") was out of bounds.\n"; - else QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " - << wp.seq << " - FIXME: missed error description\n"; - } else QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " - << wp.seq << " - FIXME: missed error description\n"; - } + << wp.seq << " - FIXME: missed error description\n"; + } else if (current_state == PX_WPP_GETLIST_GETWPS) { + if (!(wp.seq == protocol_current_wp_id)) + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM because the waypoint ID (" + << wp.seq << ") was not the expected " + << protocol_current_wp_id << ".\n"; + else if (!(wp.seq < protocol_current_count)) + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM because the waypoint ID (" + << wp.seq << ") was out of bounds.\n"; + else QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " + << wp.seq << " - FIXME: missed error description\n"; + } else QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " + << wp.seq << " - FIXME: missed error description\n"; } } else { // We're target but already communicating with someone else if((wp.target_system == systemid && wp.target_component == compid) && !(msg->sysid == protocol_current_partner_systemid && msg->compid == protocol_current_partner_compid) && current_state != PX_WPP_IDLE) { - if (verbose) - QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " - << wp.seq << " from ID " << msg->sysid << " because i'm already talking to ID " - << protocol_current_partner_systemid << ".\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " + << wp.seq << " from ID " << msg->sysid << " because i'm already talking to ID " + << protocol_current_partner_systemid << ".\n"; } else if(wp.target_system == systemid && wp.target_component == compid) { - if (verbose) QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " - << wp.seq << " from ID " - << msg->sysid << " because i have no idea what to do with it\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM " + << wp.seq << " from ID " + << msg->sysid << " because i have no idea what to do with it\n"; } } break; @@ -1180,7 +1168,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if(wpca.target_system == systemid && wpca.target_component == compid && current_state == PX_WPP_IDLE) { protocol_timestamp_lastaction = now; - if (verbose) QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_CLEAR_LIST from " + QLOG_INFO() << "Got MAVLINK_MSG_ID_MISSION_ITEM_CLEAR_LIST from " << msg->sysid << " deleting all waypoints\n"; while(waypoints->size() > 0) { delete waypoints->back(); @@ -1188,14 +1176,13 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* } current_active_wp_id = -1; } else if (wpca.target_system == systemid && wpca.target_component == compid && current_state != PX_WPP_IDLE) { - if (verbose) QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_CLEAR_LIST from " - << msg->sysid << " because i'm doing something else already (state=" << current_state << ").\n"; + QLOG_INFO() << "Ignored MAVLINK_MSG_ID_MISSION_ITEM_CLEAR_LIST from " + << msg->sysid << " because i'm doing something else already (state=" << current_state << ").\n"; } break; } default: { - if (debug) QLOG_INFO() << "Waypoint: received message of unknown type\n"; break; } } @@ -1207,7 +1194,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* if (timestamp_firstinside_orbit == 0) { // Announce that last waypoint was reached - if (verbose) QLOG_INFO() << "*** Reached waypoint " << cur_wp->seq << " ***\n"; + QLOG_INFO() << "*** Reached waypoint " << cur_wp->seq << " ***\n"; send_waypoint_reached(cur_wp->seq); timestamp_firstinside_orbit = now; } @@ -1232,7 +1219,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* waypoints->at(current_active_wp_id)->current = true; posReached = false; //yawReached = false; - if (verbose) QLOG_INFO() << "Set new waypoint (" << current_active_wp_id << ")\n"; + QLOG_INFO() << "Set new waypoint (" << current_active_wp_id << ")\n"; } } } diff --git a/src/comm/MAVLinkSimulationWaypointPlanner.h b/src/comm/MAVLinkSimulationWaypointPlanner.h index 03ba449090..273cd6b0de 100644 --- a/src/comm/MAVLinkSimulationWaypointPlanner.h +++ b/src/comm/MAVLinkSimulationWaypointPlanner.h @@ -54,8 +54,6 @@ public slots: uint8_t compid; unsigned int setpointDelay; float yawTolerance; - bool verbose; - bool debug; bool silent; void send_waypoint_ack(uint8_t target_systemid, uint8_t target_compid, uint8_t type); diff --git a/src/comm/MissionOverview.cc b/src/comm/MissionOverview.cc index 0704f37364..dd7f8f550f 100644 --- a/src/comm/MissionOverview.cc +++ b/src/comm/MissionOverview.cc @@ -35,6 +35,7 @@ MissionOverview::~MissionOverview() void MissionOverview::messageReceived(LinkInterface* link, mavlink_message_t message) { + Q_UNUSED(link) // ToDo [ Add mission handking code ] switch (message.msgid) { diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index ba058f9bb9..fa7fb1fac0 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -320,28 +320,6 @@ void QGCFlightGearLink::readBytes() ymag_ned = ymag_ned / tempMagLength; zmag_ned = zmag_ned / tempMagLength; - //transform magnetic measurement to body frame coordinates - double cosPhi = cos(roll); - double sinPhi = sin(roll); - double cosThe = cos(pitch); - double sinThe = sin(pitch); - double cosPsi = cos(yaw); - double sinPsi = sin(yaw); - - float R_B_N[3][3]; - - R_B_N[0][0] = cosThe * cosPsi; - R_B_N[0][1] = -cosPhi * sinPsi + sinPhi * sinThe * cosPsi; - R_B_N[0][2] = sinPhi * sinPsi + cosPhi * sinThe * cosPsi; - - R_B_N[1][0] = cosThe * sinPsi; - R_B_N[1][1] = cosPhi * cosPsi + sinPhi * sinThe * sinPsi; - R_B_N[1][2] = -sinPhi * cosPsi + cosPhi * sinThe * sinPsi; - - R_B_N[2][0] = -sinThe; - R_B_N[2][1] = sinPhi * cosThe; - R_B_N[2][2] = cosPhi * cosThe; - QMatrix3x3 R_B_N_M;// = Eigen::Map((float*)R_B_N).eval(); QVector3D mag_ned(xmag_ned, ymag_ned, zmag_ned); diff --git a/src/comm/RelPositionOverview.cc b/src/comm/RelPositionOverview.cc index 4fe1ca0349..d70cd2662d 100644 --- a/src/comm/RelPositionOverview.cc +++ b/src/comm/RelPositionOverview.cc @@ -1,9 +1,10 @@ #include "RelPositionOverview.h" RelPositionOverview::RelPositionOverview(QObject *parent) : - QObject(parent), m_airspeed (0.0), m_alt (0.0), m_climb (0.0), m_groundspeed (0.0), m_heading (0.0), - m_pitch (0.0), m_pitchspeed (0.0), m_roll (0.0), m_rollspeed (0.0), m_throttle (0.0), - m_timeBootMs (0.0), m_yawspeed (0.0),m_yaw (0.0) + QObject(parent), m_airspeed (0.0), m_groundspeed (0.0), m_alt (0.0), + m_climb (0.0), m_heading (0.0), m_throttle (0.0), m_timeBootMs (0.0), + m_roll (0.0), m_pitch (0.0), m_yaw (0.0), m_rollspeed (0.0), m_pitchspeed (0.0), + m_yawspeed (0.0) { /* The defaults above are used to ensure the variables are * initalised to known values and dont cause random errors. diff --git a/src/comm/TCPLink.cc b/src/comm/TCPLink.cc index bea2f980d5..29297d0c24 100644 --- a/src/comm/TCPLink.cc +++ b/src/comm/TCPLink.cc @@ -38,8 +38,8 @@ /// @author Don Gagne TCPLink::TCPLink(const QHostAddress &hostAddress, const QString &hostName, quint16 socketPort, bool asServer) : - _hostAddress(hostAddress), _name(hostName), + _hostAddress(hostAddress), _port(socketPort), _asServer(asServer), _socket(NULL) diff --git a/src/comm/UDPLink.cc b/src/comm/UDPLink.cc index 3a5098b0df..2aedc8bb87 100644 --- a/src/comm/UDPLink.cc +++ b/src/comm/UDPLink.cc @@ -119,11 +119,6 @@ void UDPLink::run() } } -void UDPLink::restartConnection() -{ - _shouldRestartConnection; -} - void UDPLink::setAddress(QHostAddress host) { this->host = host; diff --git a/src/comm/UDPLink.h b/src/comm/UDPLink.h index 948bf9b56b..616463b07f 100644 --- a/src/comm/UDPLink.h +++ b/src/comm/UDPLink.h @@ -129,7 +129,6 @@ public slots: private: bool hardwareConnect(void); - void restartConnection(); bool _running; QMutex _mutex; diff --git a/src/comm/VehicleOverview.cc b/src/comm/VehicleOverview.cc index 38bfb73826..af1477fb96 100644 --- a/src/comm/VehicleOverview.cc +++ b/src/comm/VehicleOverview.cc @@ -24,6 +24,8 @@ VehicleOverview::~VehicleOverview() void VehicleOverview::parseHeartbeat(LinkInterface* link,const mavlink_message_t &message, const mavlink_heartbeat_t &state) { + Q_UNUSED(link) + Q_UNUSED(message) // Set new type if it has changed if (m_type != state.type) { @@ -74,11 +76,13 @@ void VehicleOverview::parseHeartbeat(LinkInterface* link,const mavlink_message_t } void VehicleOverview::parseBattery(LinkInterface *link, const mavlink_battery_status_t &state) { - Q_UNUSED(state); + Q_UNUSED(state) + Q_UNUSED(link) } void VehicleOverview::parseSysStatus(LinkInterface *link, const mavlink_sys_status_t &state) { + Q_UNUSED(link) this->setOnboardControlSensorsEnabled(state.onboard_control_sensors_enabled); this->setOnboardControlSensorsHealth(state.onboard_control_sensors_health); this->setOnboardControlSensorsPresent(state.onboard_control_sensors_present); diff --git a/src/input/JoystickInput.cc b/src/input/JoystickInput.cc index c682ee02f0..214bec4d16 100644 --- a/src/input/JoystickInput.cc +++ b/src/input/JoystickInput.cc @@ -72,7 +72,7 @@ const QString JoystickInput::getActiveJoystickId() return QString::fromStdString(joystickId); } -const int JoystickInput::getNumberOfButtons() const +int JoystickInput::getNumberOfButtons() const { return SDL_JoystickNumButtons(joystick); } diff --git a/src/input/JoystickInput.h b/src/input/JoystickInput.h index bbf3842721..73a5d4c16d 100644 --- a/src/input/JoystickInput.h +++ b/src/input/JoystickInput.h @@ -61,7 +61,7 @@ class JoystickInput : public QThread const QString getActiveJoystickId(); - const int getNumberOfButtons() const; + int getNumberOfButtons() const; /** * @brief Load joystick settings diff --git a/src/output/kmlcreator.h b/src/output/kmlcreator.h index 6c95c07d3d..34f523fa8d 100644 --- a/src/output/kmlcreator.h +++ b/src/output/kmlcreator.h @@ -35,6 +35,8 @@ struct GPSRecord: DataLine { } static GPSRecord from(FormatLine& format, QString& line); + + virtual ~GPSRecord() {} }; /** @@ -54,6 +56,8 @@ struct Attitude: DataLine { } static Attitude from(FormatLine& format, QString& line); + + virtual ~Attitude() {} }; /** @@ -76,6 +80,8 @@ struct CommandedWaypoint: DataLine { } static CommandedWaypoint from(FormatLine& format, QString& line); + + virtual ~CommandedWaypoint() {} }; /** diff --git a/src/qgcunittest/GAudioOutputTest.cc b/src/qgcunittest/GAudioOutputTest.cc new file mode 100644 index 0000000000..1708f11c4f --- /dev/null +++ b/src/qgcunittest/GAudioOutputTest.cc @@ -0,0 +1,35 @@ +#include "GAudioOutputTest.h" + +#include + +#include +#include + +#include "configuration.h" +#include "globalobject.h" +#include "GAudioOutput.h" + +GAudioOutputTest::GAudioOutputTest() +{ + QSettings::setDefaultFormat(QSettings::IniFormat); + + int argc = 0; + char *args[] = {}; + + QApplication app(argc, args); + + app.setOrganizationName("diydrones"); + app.setApplicationName(QString(QGC_APPLICATION_NAME) + "_test"); + + GlobalObject::sharedInstance()->setAppDataDirectory("/tmp"); + GlobalObject::sharedInstance()->saveSettings(); +} + + +void GAudioOutputTest::sayNonExistingFileShallNotSegfault() +{ + QDir dir("/tmp/tmp_audio"); + dir.removeRecursively(); + + QCOMPARE(true, GAudioOutput::instance()->say("Non existing file")); +} diff --git a/src/qgcunittest/GAudioOutputTest.h b/src/qgcunittest/GAudioOutputTest.h new file mode 100644 index 0000000000..ff77e48bbd --- /dev/null +++ b/src/qgcunittest/GAudioOutputTest.h @@ -0,0 +1,19 @@ +#ifndef GAUDIOOUTPUTTEST_HPP +#define GAUDIOOUTPUTTEST_HPP + +#include + +#include "AutoTest.h" + +class GAudioOutputTest : public QObject +{ + Q_OBJECT +public: + GAudioOutputTest(); + +private slots: + void sayNonExistingFileShallNotSegfault(); +}; + +DECLARE_TEST(GAudioOutputTest) +#endif // GAUDIOOUTPUTTEST_HPP diff --git a/src/qgcunittest/TestFrameworkTest.cc b/src/qgcunittest/TestFrameworkTest.cc new file mode 100644 index 0000000000..9a2a5f95bf --- /dev/null +++ b/src/qgcunittest/TestFrameworkTest.cc @@ -0,0 +1,25 @@ +#include + +#include "TestFrameworkTest.h" + +//This function is called before every test +void TestFrameworkTest::init() +{ +} + +//this function is called after every test +void TestFrameworkTest::cleanup() +{ +} + +void TestFrameworkTest::testStringComparison() +{ + QString test("test"); + QVERIFY(test == "test"); +} + +void TestFrameworkTest::testIntComparison() +{ + int x = 5; + QVERIFY(x == 5); +} diff --git a/src/qgcunittest/TestFrameworkTest.h b/src/qgcunittest/TestFrameworkTest.h new file mode 100644 index 0000000000..c149a2a5c0 --- /dev/null +++ b/src/qgcunittest/TestFrameworkTest.h @@ -0,0 +1,23 @@ +#ifndef TESTFRAMEWORKTEST_H +#define TESTFRAMEWORKTEST_H + +#include + +#include "AutoTest.h" + +class TestFrameworkTest : public QObject +{ + Q_OBJECT + +private slots: + void init(); + void cleanup(); + +private slots: + void testStringComparison(); + + void testIntComparison(); +}; + +DECLARE_TEST(TestFrameworkTest) +#endif // TESTFRAMEWORKTEST_H diff --git a/src/qgcunittest/versioncomparatortest.cc b/src/qgcunittest/versioncomparatortest.cc new file mode 100644 index 0000000000..528910db63 --- /dev/null +++ b/src/qgcunittest/versioncomparatortest.cc @@ -0,0 +1,97 @@ +#include "versioncomparatortest.h" + +#include + +#include "versioncomparator.h" + + +VersionComparatorTest::VersionComparatorTest() +{ +} + +void VersionComparatorTest::testHigherMajorNumberIsNewer() +{ + const QString newVersion("v2.3.2-rc1"); + const QString currentVersion("v1.2.4"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), true); + QCOMPARE(VersionComparator::isVersionNewer(currentVersion, newVersion), false); +} + +void VersionComparatorTest::testEqualMajorNumberIsNotNewer() +{ + const QString newVersion("v1.0.0"); + const QString currentVersion("1.0.0"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), false); +} + +void VersionComparatorTest::testHigherMinorNumberIsNewer() +{ + const QString newVersion("v1.32.24-rc1"); + const QString currentVersion("1.31.4"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), true); + QCOMPARE(VersionComparator::isVersionNewer(currentVersion, newVersion), false); +} + +void VersionComparatorTest::testEqualMinorNumberIsNotNewer() +{ + const QString newVersion("v1.3.0"); + const QString currentVersion("1.3.0"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), false); +} + +void VersionComparatorTest::testHigherBuildNumberIsNewer() +{ + const QString newVersion("v2.3.24"); + const QString currentVersion("v2.3.20-rc1"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), true); + QCOMPARE(VersionComparator::isVersionNewer(currentVersion, newVersion), false); +} + +void VersionComparatorTest::testEqualBuildNumberIsNotNewer() +{ + const QString newVersion("2.3.3"); + const QString currentVersion("v2.3.3"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), false); +} + +void VersionComparatorTest::testExistingBuildNumberIsNewerThanNoBuildNumber() +{ + const QString newVersion("2.3.2"); + const QString currentVersion("v2.3"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), true); + QCOMPARE(VersionComparator::isVersionNewer(currentVersion, newVersion), false); +} + +void VersionComparatorTest::testNoReleaseCandidateIsNewerThanExistingReleaseCandidate() +{ + const QString newVersion("2.3.2"); + const QString currentVersion("2.3.2-rc1"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), true); + QCOMPARE(VersionComparator::isVersionNewer(currentVersion, newVersion), false); +} + +void VersionComparatorTest::testHigherReleaseCandidateIsNewer() +{ + const QString newVersion("2.3.2-rc3"); + const QString currentVersion("2.3.2-rc1"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), true); + QCOMPARE(VersionComparator::isVersionNewer(currentVersion, newVersion), false); +} + +void VersionComparatorTest::testInvalidNewVersionReturnsFalse() +{ + const QString newVersion("abcdef"); + const QString currentVersion("2.3.2-rc1"); + + QCOMPARE(VersionComparator::isVersionNewer(newVersion, currentVersion), false); +} + diff --git a/src/qgcunittest/versioncomparatortest.h b/src/qgcunittest/versioncomparatortest.h new file mode 100644 index 0000000000..4e1f8dc5d2 --- /dev/null +++ b/src/qgcunittest/versioncomparatortest.h @@ -0,0 +1,37 @@ +#ifndef VERSIONCOMPARATORTEST_H +#define VERSIONCOMPARATORTEST_H + +#include + +#include "AutoTest.h" + +class VersionComparatorTest : public QObject +{ + Q_OBJECT +public: + VersionComparatorTest(); + +private slots: + void testHigherMajorNumberIsNewer(); + + void testEqualMajorNumberIsNotNewer(); + + void testHigherMinorNumberIsNewer(); + + void testEqualMinorNumberIsNotNewer(); + + void testHigherBuildNumberIsNewer(); + + void testEqualBuildNumberIsNotNewer(); + + void testExistingBuildNumberIsNewerThanNoBuildNumber(); + + void testNoReleaseCandidateIsNewerThanExistingReleaseCandidate(); + + void testHigherReleaseCandidateIsNewer(); + + void testInvalidNewVersionReturnsFalse(); +}; + +DECLARE_TEST(VersionComparatorTest) +#endif // VERSIONCOMPARATORTEST_H diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 204febb135..7195908e1a 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -471,13 +471,10 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) playArmStateChangedAudioMessage(systemIsArmed); } - bool stateHasChanged = false; - bool modeHasChanged = false; bool customModeHasChanged = false; if ((state.system_status != static_cast(this->status))) { QLOG_DEBUG() << "UAS: new system_status" << state.system_status; - stateHasChanged = true; this->status = static_cast(state.system_status); getStatusForCode((int)state.system_status, uasState, stateDescription); emit statusChanged(this, uasState, stateDescription); @@ -488,7 +485,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) receivedMode = true; if (base_mode != state.base_mode) { QLOG_DEBUG() << "UAS: new base mode " << state.base_mode; - modeHasChanged = true; receivedMode = true; base_mode = state.base_mode; shortModeText = getShortModeTextFor(base_mode); @@ -2450,21 +2446,21 @@ void UAS::setParameter(const int compId, const QString& paramId, const QVariant& // TODO: This is a hack for MAV_AUTOPILOT_ARDUPILOTMEGA until the new version of MAVLink and a fix for their param handling. if (getAutopilotType() == MAV_AUTOPILOT_ARDUPILOTMEGA) { - switch (value.type()) + switch (static_cast(value.type())) { - case QVariant::Char: + case QMetaType::QChar: union_value.param_float = static_cast(value.toChar().toLatin1()); p.param_type = MAV_PARAM_TYPE_INT8; break; - case QVariant::Int: + case QMetaType::Int: union_value.param_float = value.toInt(); p.param_type = MAV_PARAM_TYPE_INT32; break; - case QVariant::UInt: + case QMetaType::UInt: union_value.param_float = value.toUInt(); p.param_type = MAV_PARAM_TYPE_UINT32; break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: union_value.param_float = value.toFloat(); p.param_type = MAV_PARAM_TYPE_REAL32; @@ -2476,21 +2472,21 @@ void UAS::setParameter(const int compId, const QString& paramId, const QVariant& } else { - switch (value.type()) + switch (static_cast(value.type())) { - case QVariant::Char: + case QMetaType::QChar: union_value.param_int8 = static_cast(value.toChar().toLatin1()); p.param_type = MAV_PARAM_TYPE_INT8; break; - case QVariant::Int: + case QMetaType::Int: union_value.param_int32 = value.toInt(); p.param_type = MAV_PARAM_TYPE_INT32; break; - case QVariant::UInt: + case QMetaType::UInt: union_value.param_uint32 = value.toUInt(); p.param_type = MAV_PARAM_TYPE_UINT32; break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: union_value.param_float = value.toFloat(); p.param_type = MAV_PARAM_TYPE_REAL32; @@ -3001,24 +2997,6 @@ uint16_t UAS::scaleJoystickToRC(double v, int channel) const return ppm; } -void UAS::setManual6DOFControlCommands(double x, double y, double z, double roll, double pitch, double yaw) -{ - // If system has manual inputs enabled and is armed - if(((base_mode & MAV_MODE_FLAG_DECODE_POSITION_MANUAL) && (base_mode & MAV_MODE_FLAG_DECODE_POSITION_SAFETY)) || (base_mode & MAV_MODE_FLAG_HIL_ENABLED)) - { -// mavlink_message_t message; -// mavlink_msg_setpoint_6dof_pack(systemId, componentId, &message, this->uasId, (float)x, (float)y, (float)z, (float)roll, (float)pitch, (float)yaw); -// sendMessage(message); -// QLOG_DEBUG() << __FILE__ << __LINE__ << ": SENT 6DOF CONTROL MESSAGE: x" << x << " y: " << y << " z: " << z << " roll: " << roll << " pitch: " << pitch << " yaw: " << yaw; - -// //emit attitudeThrustSetPointChanged(this, roll, pitch, yaw, thrust, QGC::groundTimeMilliseconds()); - } - else - { - QLOG_DEBUG() << "3DMOUSE/MANUAL CONTROL: IGNORING COMMANDS: Set mode to MANUAL to send 3DMouse commands first"; - } -} - void UAS::logRequestList(uint16_t start, uint16_t end) { QLOG_DEBUG() << "send logRequestList start:" << start << " end:" << end; @@ -3248,31 +3226,6 @@ void UAS::enableHilJSBSim(bool enable, QString options) } } -/** -* If enabled, connect the X-plane gear link. -*/ -void UAS::enableHilXPlane(bool enable) -{ -// QGCXPlaneLink* link = dynamic_cast(simulation); -// if (!link || !simulation) { -// if (simulation) { -// stopHil(); -// delete simulation; -// } -// QLOG_DEBUG() << "CREATED NEW XPLANE LINK"; -// simulation = new QGCXPlaneLink(this); -// } -// // Connect X-Plane Link -// if (enable) -// { -// startHil(); -// } -// else -// { -// stopHil(); -// } -} - /** * @param time_us Timestamp (microseconds since UNIX epoch or microseconds since system boot) * @param roll Roll angle (rad) diff --git a/src/uas/UAS.h b/src/uas/UAS.h index 19c8f8c424..b0ae94b04d 100644 --- a/src/uas/UAS.h +++ b/src/uas/UAS.h @@ -829,7 +829,6 @@ public slots: /** @brief Enable / disable HIL */ void enableHilFlightGear(bool enable, QString options, bool sensorHil, QObject * configuration); void enableHilJSBSim(bool enable, QString options); - void enableHilXPlane(bool enable); /** @brief Send the full HIL state to the MAV */ void sendHilState(quint64 time_us, float roll, float pitch, float yaw, float rollRotationRate, @@ -908,9 +907,6 @@ public slots: /** @brief Receive a button pressed event from an input device, e.g. joystick */ void receiveButton(int buttonIndex); - /** @brief Set the values for the 6dof manual control of the vehicle */ - void setManual6DOFControlCommands(double x, double y, double z, double roll, double pitch, double yaw); - /** @brief Add a link associated with this robot */ void addLink(LinkInterface* link); /** @brief Remove a link associated with this robot */ diff --git a/src/ui/AP2DataPlot2D.cpp b/src/ui/AP2DataPlot2D.cpp index faeeed38e7..e8ba369f05 100644 --- a/src/ui/AP2DataPlot2D.cpp +++ b/src/ui/AP2DataPlot2D.cpp @@ -768,7 +768,8 @@ void AP2DataPlot2D::updateValue(const int uasId, const QString& name, const QStr void AP2DataPlot2D::valueChanged(const int uasId, const QString& name, const QString& unit, const QVariant& value,const quint64 msec) { - if (value.type() == QVariant::Double || value.type() == QMetaType::Float) + QMetaType::Type metaType(static_cast(value.type())); + if (metaType == QMetaType::Double || metaType == QMetaType::Float) { updateValue(uasId,name,unit,value.toDouble(),msec,false); } diff --git a/src/ui/AP2DataPlot2D.ui b/src/ui/AP2DataPlot2D.ui index 420cb6ec2b..fc4e8e9d41 100644 --- a/src/ui/AP2DataPlot2D.ui +++ b/src/ui/AP2DataPlot2D.ui @@ -6,7 +6,7 @@ 0 0 - 1148 + 1550 600 @@ -61,7 +61,7 @@ - + QLayout::SetDefaultConstraint @@ -388,9 +388,6 @@ - - - horizontalSplitter diff --git a/src/ui/AP2DataPlot2DModel.cc b/src/ui/AP2DataPlot2DModel.cc index e5f5b80a53..fb1e595d3d 100644 --- a/src/ui/AP2DataPlot2DModel.cc +++ b/src/ui/AP2DataPlot2DModel.cc @@ -327,7 +327,7 @@ QMap AP2DataPlot2DModel::getModeValues() } } bool ok = false; - int modeint = mode.toInt(&ok); + if (!ok && !custom_mode) { if (record.contains("ModeNum")) @@ -380,10 +380,12 @@ QVariant AP2DataPlot2DModel::headerData ( int section, Qt::Orientation orientati } int AP2DataPlot2DModel::rowCount( const QModelIndex & parent) const { - return m_rowCount; + Q_UNUSED(parent) + return m_rowCount; } int AP2DataPlot2DModel::columnCount ( const QModelIndex & parent) const { + Q_UNUSED(parent) return m_columnCount; } QVariant AP2DataPlot2DModel::data ( const QModelIndex & index, int role) const @@ -447,6 +449,7 @@ QVariant AP2DataPlot2DModel::data ( const QModelIndex & index, int role) const } void AP2DataPlot2DModel::selectedRowChanged(QModelIndex current,QModelIndex previous) { + Q_UNUSED(previous) if (m_currentRow == current.row()) { return; @@ -459,7 +462,6 @@ void AP2DataPlot2DModel::selectedRowChanged(QModelIndex current,QModelIndex prev return; } //Grab the index - int rowid = data(createIndex(current.row(),0)).toString().toInt(); if (m_rowToTableMap.contains(current.row())) { diff --git a/src/ui/AutoUpdateCheck.cc b/src/ui/AutoUpdateCheck.cc index 03f42d71c3..050a603861 100644 --- a/src/ui/AutoUpdateCheck.cc +++ b/src/ui/AutoUpdateCheck.cc @@ -34,8 +34,7 @@ This file is part of the APM_PLANNER project #include #include #include "QGC.h" - -static const QString VersionCompareRegEx = "(\\d*\\.\\d+\\.?\\d+)-?(rc\\d)?"; +#include "versioncomparator.h" AutoUpdateCheck::AutoUpdateCheck(QObject *parent) : QObject(parent), @@ -170,100 +169,7 @@ void AutoUpdateCheck::updateDataReadProgress(qint64 bytesRead, qint64 totalBytes bool AutoUpdateCheck::compareVersionStrings(const QString& newVersion, const QString& currentVersion) { - // [TODO] DRY this out by creating global function for use in APM Firmware as well - int newMajor = 0,newMinor = 0,newBuild = 0; - int currentMajor = 0, currentMinor = 0,currentBuild = 0; - - QString newBuildSubMoniker, oldBuildSubMoniker; // holds if the build is a rc or dev build - - - QRegExp versionEx(VersionCompareRegEx); - QString versionstr = ""; - int pos = versionEx.indexIn(newVersion); - if (pos > -1) { - // Split first sub-element to get numercal major.minor.build version - QLOG_DEBUG() << "Detected newVersion:" << versionEx.capturedTexts()<< " count:" - << versionEx.captureCount(); - versionstr = versionEx.cap(1); - QStringList versionList = versionstr.split("."); - newMajor = versionList[0].toInt(); - newMinor = versionList[1].toInt(); - if (versionList.size() > 2){ - newBuild = versionList[2].toInt(); - } - // second subelement is either rcX candidate or developement build - if (versionEx.captureCount() == 2) - newBuildSubMoniker = versionEx.cap(2); - } - - QRegExp versionEx2(VersionCompareRegEx); - versionstr = ""; - pos = versionEx2.indexIn(currentVersion); - if (pos > -1) { - QLOG_DEBUG() << "Detected currentVersion:" << versionEx2.capturedTexts() << " count:" - << versionEx2.captureCount(); - versionstr = versionEx2.cap(1); - QStringList versionList = versionstr.split("."); - currentMajor = versionList[0].toInt(); - currentMinor = versionList[1].toInt(); - if (versionList.size() > 2){ - currentBuild = versionList[2].toInt(); - } - // second subelement is either rcX candidate or developement build - if (versionEx2.captureCount() == 2) - oldBuildSubMoniker = versionEx2.cap(2); - } - - QLOG_DEBUG() << "Verison Compare:" <currentMajor){ - // A Major release - return true; - } else if (newMajor == currentMajor){ - if (newMinor > currentMinor){ - // A minor release - return true; - } else if (newMinor == currentMinor){ - if (newBuild > currentBuild) - // new build (or tiny release) - return true; - else if (newBuild == currentBuild) { - // Check if RC is newer - // If the version isn't newer, it might be a new release candidate - int newRc = 0, oldRc = 0; - - if (newBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive) - && oldBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive)) { - QRegExp releaseNumber("\\d+"); - pos = releaseNumber.indexIn(newBuildSubMoniker); - if (pos > -1) { - QLOG_DEBUG() << "Detected newRc:" << versionEx.capturedTexts(); - newRc = releaseNumber.cap(0).toInt(); - } - - QRegExp releaseNumber2("\\d+"); - pos = releaseNumber2.indexIn(oldBuildSubMoniker); - if (pos > -1) { - QLOG_DEBUG() << "Detected oldRc:" << versionEx2.capturedTexts(); - oldRc = releaseNumber2.cap(0).toInt(); - } - - if (newRc > oldRc) - return true; - } - - if (newBuildSubMoniker.length() == 0 - && oldBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive)) { - QLOG_DEBUG() << "Stable build newer that last unstable release candidate "; - return true; // this means a new stable build of the unstable rc is available - } - } - } - } - - - - return false; + return VersionComparator::isVersionNewer(newVersion, currentVersion); } void AutoUpdateCheck::setSkipVersion(const QString& version) diff --git a/src/ui/CommSettings.ui b/src/ui/CommSettings.ui index 6d38c6c12c..4fc8a204fa 100644 --- a/src/ui/CommSettings.ui +++ b/src/ui/CommSettings.ui @@ -230,7 +230,6 @@ connectionStatusLabel advCheckBox protocolTypeGroupBox - verticalSpacer diff --git a/src/ui/DebugOutput.cc b/src/ui/DebugOutput.cc index d5e2a37bed..0acfa2c5f8 100644 --- a/src/ui/DebugOutput.cc +++ b/src/ui/DebugOutput.cc @@ -16,6 +16,7 @@ DebugOutput::~DebugOutput() } void DebugOutput::write(const QString& message, QsLogging::Level level) { + Q_UNUSED(level) ui.textBrowser->append(message); if (ui.autoScrollCheckBox->isChecked()) { diff --git a/src/ui/DroneshareUploadDialog.cpp b/src/ui/DroneshareUploadDialog.cpp index 3b618939ec..b73b4f0eed 100644 --- a/src/ui/DroneshareUploadDialog.cpp +++ b/src/ui/DroneshareUploadDialog.cpp @@ -259,5 +259,6 @@ void DroneshareUploadDialog::resetStatusText() void DroneshareUploadDialog::hideEvent(QHideEvent *evt) { + Q_UNUSED(evt) resetStatusText(); } diff --git a/src/ui/GoogleElevationData.cpp b/src/ui/GoogleElevationData.cpp index dc4a9103da..d7f133bee4 100644 --- a/src/ui/GoogleElevationData.cpp +++ b/src/ui/GoogleElevationData.cpp @@ -87,6 +87,8 @@ void GoogleElevationData::updateDataReadProgress(qint64 bytesRead, qint64 totalB void GoogleElevationData::requestElevationData(const QList &waypointList, int distance, int samples) { + Q_UNUSED(distance) + // Create the google request from the currentWaypointList if (waypointList.count() < 2){ QLOG_ERROR() << "Not enough waypoints to request elevation data."; diff --git a/src/ui/HDDisplay.cc b/src/ui/HDDisplay.cc index 20a2c7c29b..3deaa8b1b3 100644 --- a/src/ui/HDDisplay.cc +++ b/src/ui/HDDisplay.cc @@ -123,12 +123,15 @@ HDDisplay::HDDisplay(QStringList* plotList, QString title, QWidget *parent) : fontDatabase = QFontDatabase(); const QString fontFileName = ":/general/vera.ttf"; ///< Font file is part of the QRC file and compiled into the app const QString fontFamilyName = "Bitstream Vera Sans"; - if(!QFile::exists(fontFileName)) QLOG_DEBUG() << "ERROR! font file: " << fontFileName << " DOES NOT EXIST!"; + if(!QFile::exists(fontFileName)) { + QLOG_DEBUG() << "ERROR! font file: " << fontFileName << " DOES NOT EXIST!"; + } fontDatabase.addApplicationFont(fontFileName); font = fontDatabase.font(fontFamilyName, "Roman", qMax(5, (int)(10*scalingFactor*1.2f+0.5f))); - if (font.family() != fontFamilyName) QLOG_DEBUG() << "ERROR! Font not loaded: " << fontFamilyName; - + if (font.family() != fontFamilyName) { + QLOG_DEBUG() << "ERROR! Font not loaded: " << fontFamilyName; + } // Connect with UAS connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)), Qt::UniqueConnection); setActiveUAS(UASManager::instance()->getActiveUAS()); diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index fb0251c3cc..92efd761e9 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -59,6 +59,7 @@ This file is part of the QGROUNDCONTROL project */ HUD::HUD(int width, int height, QWidget* parent) : QLabel(parent), + image(NULL), uas(NULL), yawInt(0.0f), mode(tr("UNKNOWN MODE")), @@ -119,11 +120,10 @@ HUD::HUD(int width, int height, QWidget* parent) nextOfflineImage(""), HUDInstrumentsEnabled(false), videoEnabled(true), + imageLoggingEnabled(false), xImageFactor(1.0), yImageFactor(1.0), - imageRequested(false), - imageLoggingEnabled(false), - image(NULL) + imageRequested(false) { // Fill with black background QImage fill = QImage(width, height, QImage::Format_Indexed8); @@ -153,15 +153,18 @@ HUD::HUD(int width, int height, QWidget* parent) fontDatabase = QFontDatabase(); const QString fontFileName = ":/general/vera.ttf"; ///< Font file is part of the QRC file and compiled into the app const QString fontFamilyName = "Bitstream Vera Sans"; - if(!QFile::exists(fontFileName)) QLOG_DEBUG() << "ERROR! font file: " << fontFileName << " DOES NOT EXIST!"; - + if(!QFile::exists(fontFileName)) { + QLOG_DEBUG() << "ERROR! font file: " << fontFileName << " DOES NOT EXIST!"; + } fontDatabase.addApplicationFont(fontFileName); font = fontDatabase.font(fontFamilyName, "Roman", qMax(5,(int)(10.0f*scalingFactor*1.2f+0.5f))); QFont* fontPtr = &font; if (!fontPtr) { QLOG_DEBUG() << "ERROR! FONT NOT LOADED!"; } else { - if (font.family() != fontFamilyName) QLOG_DEBUG() << "ERROR! WRONG FONT LOADED: " << fontFamilyName; + if (font.family() != fontFamilyName) { + QLOG_DEBUG() << "ERROR! WRONG FONT LOADED: " << fontFamilyName; + } } // Connect with UAS @@ -466,21 +469,6 @@ void HUD::paintText(QString text, QColor color, float fontSize, float refX, floa painter->setPen(prevPen); } -/** - * @param referencePositionX horizontal position in the reference mm-unit space - * @param referencePositionY horizontal position in the reference mm-unit space - * @param referenceWidth width in the reference mm-unit space - * @param referenceHeight width in the reference mm-unit space - */ -void HUD::setupGLView(float referencePositionX, float referencePositionY, float referenceWidth, float referenceHeight) -{ - int pixelWidth = (int)(referenceWidth * scalingFactor); - int pixelHeight = (int)(referenceHeight * scalingFactor); - // Translate and scale the GL view in the virtual reference coordinate units on the screen - int pixelPositionX = (int)((referencePositionX * scalingFactor) + xCenterOffset); - int pixelPositionY = this->height() - (referencePositionY * scalingFactor) + yCenterOffset - pixelHeight; -} - void HUD::paintRollPitchStrips() { } @@ -488,7 +476,7 @@ void HUD::paintRollPitchStrips() void HUD::paintEvent(QPaintEvent *event) { - + Q_UNUSED(event) paintHUD(); } @@ -564,7 +552,6 @@ void HUD::paintHUD() xImageFactor = width() / (float)glImage.width(); yImageFactor = height() / (float)glImage.height(); - float imageFactor = qMin(xImageFactor, yImageFactor); // Resize to correct size and fill with image // FIXME diff --git a/src/ui/HUD.h b/src/ui/HUD.h index d38b8d135e..433006a171 100644 --- a/src/ui/HUD.h +++ b/src/ui/HUD.h @@ -103,8 +103,6 @@ protected slots: void paintPitchLines(float pitch, QPainter* painter); /** @brief Paint text on top of the image and OpenGL drawings */ void paintText(QString text, QColor color, float fontSize, float refX, float refY, QPainter* painter); - /** @brief Setup the OpenGL view for drawing a sub-component of the HUD */ - void setupGLView(float referencePositionX, float referencePositionY, float referenceWidth, float referenceHeight); void paintHUD(); void paintPitchLinePos(QString text, float refPosX, float refPosY, QPainter* painter); void paintPitchLineNeg(QString text, float refPosX, float refPosY, QPainter* painter); diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 30b06431a1..1eaaafb9f3 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -1908,6 +1908,8 @@ void MainWindow::addLink(int linkid) void MainWindow::linkError(int linkid,QString errorstring) { + Q_UNUSED(linkid) + QWidget* parent = QApplication::activeWindow(); if (!parent) { parent = this; diff --git a/src/ui/MissionElevationDisplay.cpp b/src/ui/MissionElevationDisplay.cpp index e5cf5cf81a..add037a80e 100644 --- a/src/ui/MissionElevationDisplay.cpp +++ b/src/ui/MissionElevationDisplay.cpp @@ -252,16 +252,13 @@ void MissionElevationDisplay::addWaypointLabels() QCustomPlot* customPlot = ui->customPlot; customPlot->clearItems(); double totalDistance = 0.0; - double homeAlt = 0.0; double distance = 0.0; Waypoint* previousWp = NULL; foreach(Waypoint* wp, m_waypointList){ - if(previousWp != NULL){ + if(previousWp != NULL) { distance = distanceBetweenLatLng(previousWp->getLatitude(), previousWp->getLongitude(), wp->getLatitude(), wp->getLongitude()); - } else { - homeAlt = wp->getAltitude(); } totalDistance += distance; @@ -275,13 +272,6 @@ void MissionElevationDisplay::addWaypointLabels() itemText->setText("WP" + (QString::number(wp->getId())) + " (+" + (QString::number(distance,'f', 1)) +"m)"); itemText->position->setParentAnchor(itemTracer->position); - double adjustedAlt = 0.0; - if (wp->getFrame() == MAV_FRAME_GLOBAL_RELATIVE_ALT){ - adjustedAlt = wp->getAltitude() + homeAlt + m_homeAltOffset; - } else { - adjustedAlt = wp->getAltitude(); - } - previousWp = wp; } } diff --git a/src/ui/PrimaryFlightDisplay.cc b/src/ui/PrimaryFlightDisplay.cc index fccbf9a8ac..1bb88ab139 100644 --- a/src/ui/PrimaryFlightDisplay.cc +++ b/src/ui/PrimaryFlightDisplay.cc @@ -673,6 +673,8 @@ void PrimaryFlightDisplay::drawPitchScale( bool drawNumbersRight ) { + Q_UNUSED(intrusion) + float displayPitch = this->pitch; if (displayPitch == UNKNOWN_ATTITUDE) displayPitch = 0; diff --git a/src/ui/QGCMAVLinkInspector.cc b/src/ui/QGCMAVLinkInspector.cc index 4e6b2c7d2a..a50983b328 100644 --- a/src/ui/QGCMAVLinkInspector.cc +++ b/src/ui/QGCMAVLinkInspector.cc @@ -477,6 +477,8 @@ void QGCMAVLinkInspector::receiveMessage(LinkInterface* link,mavlink_message_t m void QGCMAVLinkInspector::changeStreamInterval(int msgid, int interval) { + Q_UNUSED(msgid) + Q_UNUSED(interval) //REQUEST_DATA_STREAM if (selectedSystemID == 0 || selectedComponentID == 0) { return; diff --git a/src/ui/QGCMAVLinkLogPlayer.cc b/src/ui/QGCMAVLinkLogPlayer.cc index 33d32723b0..ec40ba7cc3 100644 --- a/src/ui/QGCMAVLinkLogPlayer.cc +++ b/src/ui/QGCMAVLinkLogPlayer.cc @@ -10,11 +10,11 @@ QGCMAVLinkLogPlayer::QGCMAVLinkLogPlayer(QWidget *parent): QWidget(parent), + m_sliderDown(false), + m_isPlaying(false), ui(new Ui::QGCMAVLinkLogPlayer), m_logLink(NULL), m_logLoaded(false), - m_isPlaying(false), - m_sliderDown(false), m_mavlinkDecoder(NULL), m_mavlinkInspector(NULL) { diff --git a/src/ui/QGCParamWidget.cc b/src/ui/QGCParamWidget.cc index 9159b97d16..ba77ee5226 100644 --- a/src/ui/QGCParamWidget.cc +++ b/src/ui/QGCParamWidget.cc @@ -325,17 +325,17 @@ void QGCParamWidget::saveParamsToFile(const QString &filename,ParamFileType type { QString paramValue("%1"); QString paramType("%1"); - switch (j.value().type()) + switch (static_cast(j.value().type())) { - case QVariant::Int: + case QMetaType::Int: paramValue = paramValue.arg(j.value().toInt()); paramType = paramType.arg(MAV_PARAM_TYPE_INT32); break; - case QVariant::UInt: + case QMetaType::UInt: paramValue = paramValue.arg(j.value().toUInt()); paramType = paramType.arg(MAV_PARAM_TYPE_UINT32); break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: paramValue = paramValue.arg(j.value().toDouble(), 25, 'g', 12); paramType = paramType.arg(MAV_PARAM_TYPE_REAL32); @@ -910,21 +910,21 @@ void QGCParamWidget::parameterItemChanged(QTreeWidgetItem* current, int column) current->setBackground(1, QBrush(QColor(QGC::colorOrange))); } - switch (parameters.value(key)->value(str).type()) + switch (static_cast(parameters.value(key)->value(str).type())) { - case QVariant::Int: + case QMetaType::Int: { QVariant fixedValue(value.toInt()); parameters.value(key)->insert(str, fixedValue); } break; - case QVariant::UInt: + case QMetaType::UInt: { QVariant fixedValue(value.toUInt()); parameters.value(key)->insert(str, fixedValue); } break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: { QVariant fixedValue(value.toFloat()); @@ -1044,21 +1044,21 @@ void QGCParamWidget::retransmissionGuardTick() if (count < retransmissionBurstRequestSize) { // Re-request write operation QVariant value = missingParams->value(key); - switch (parameters.value(component)->value(key).type()) + switch (static_cast(parameters.value(component)->value(key).type())) { - case QVariant::Int: + case QMetaType::Int: { QVariant fixedValue(value.toInt()); emit parameterChanged(component, key, fixedValue); } break; - case QVariant::UInt: + case QMetaType::UInt: { QVariant fixedValue(value.toUInt()); emit parameterChanged(component, key, fixedValue); } break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: { QVariant fixedValue(value.toFloat()); @@ -1122,30 +1122,30 @@ void QGCParamWidget::setParameter(int component, QString parameterName, QVariant return; } - switch (parameterList->value(parameterName).type()) + switch (static_cast(parameterList->value(parameterName).type())) { - case QVariant::Char: + case QMetaType::QChar: { QVariant fixedValue(QChar((unsigned char)value.toInt())); emit parameterChanged(component, parameterName, fixedValue); //QLOG_DEBUG() << "PARAM WIDGET SENT:" << fixedValue; } break; - case QVariant::Int: + case QMetaType::Int: { QVariant fixedValue(value.toInt()); emit parameterChanged(component, parameterName, fixedValue); //QLOG_DEBUG() << "PARAM WIDGET SENT:" << fixedValue; } break; - case QVariant::UInt: + case QMetaType::UInt: { QVariant fixedValue(value.toUInt()); emit parameterChanged(component, parameterName, fixedValue); //QLOG_DEBUG() << "PARAM WIDGET SENT:" << fixedValue; } break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: { QVariant fixedValue(value.toFloat()); diff --git a/src/ui/QGCSettingsWidget.cc b/src/ui/QGCSettingsWidget.cc index 509b837e59..69e1ec22fd 100644 --- a/src/ui/QGCSettingsWidget.cc +++ b/src/ui/QGCSettingsWidget.cc @@ -36,6 +36,8 @@ QGCSettingsWidget::QGCSettingsWidget(QWidget *parent, Qt::WindowFlags flags) : void QGCSettingsWidget::showEvent(QShowEvent *evt) { + Q_UNUSED(evt) + if (!m_init) { m_init = true; diff --git a/src/ui/QGCSettingsWidget.ui b/src/ui/QGCSettingsWidget.ui index 240386ec3a..ae17fae9c9 100644 --- a/src/ui/QGCSettingsWidget.ui +++ b/src/ui/QGCSettingsWidget.ui @@ -340,11 +340,6 @@ groupBox groupBox_2 - horizontalSpacer - horizontalSpacer_2 - horizontalSpacer_3 - verticalSpacer_2 - verticalSpacer diff --git a/src/ui/QGCToolBar.cc b/src/ui/QGCToolBar.cc index 1d287e6f7f..08fb70ea02 100644 --- a/src/ui/QGCToolBar.cc +++ b/src/ui/QGCToolBar.cc @@ -616,6 +616,7 @@ void QGCToolBar::updateLinkState(bool connected) void QGCToolBar::connectLink(bool connect) { + Q_UNUSED(connect) // No serial port yet present // XXX magic number /*if (connect && LinkManager::instance()->getLinks().count() < 3) diff --git a/src/ui/UASRawStatusView.cpp b/src/ui/UASRawStatusView.cpp index 28f23c5a34..1eb33825dd 100644 --- a/src/ui/UASRawStatusView.cpp +++ b/src/ui/UASRawStatusView.cpp @@ -72,6 +72,7 @@ void UASRawStatusView::updateTimerTick() void UASRawStatusView::addSource(MAVLinkDecoder *decoder) { + Q_UNUSED(decoder) // connect(decoder,SIGNAL(valueChanged(int,QString,QString,QVariant,quint64)),this,SLOT(valueChanged(int,QString,QString,QVariant,quint64))); } void UASRawStatusView::valueChanged(const int uasId, const QString& name, const QString& unit, const QVariant value, const quint64 msec) @@ -95,6 +96,8 @@ void UASRawStatusView::valueChanged(const int uasId, const QString& name, const } void UASRawStatusView::resizeEvent(QResizeEvent *event) { + Q_UNUSED(event) + m_tableDirty = true; } diff --git a/src/ui/configuration/AdvParameterList.cc b/src/ui/configuration/AdvParameterList.cc index e45ff61ebd..4f2fd7fc20 100644 --- a/src/ui/configuration/AdvParameterList.cc +++ b/src/ui/configuration/AdvParameterList.cc @@ -326,7 +326,8 @@ void AdvParameterList::saveDialogAccepted() { QVariant value; m_uas->getParamManager()->getParameterValue(1,paramnamelist[i],value); - if (value.type() == QVariant::Double || value.type() == QMetaType::Float) + QMetaType::Type metaType(static_cast(value.type())); + if (metaType == QMetaType::Double || metaType == QMetaType::Float) { file.write(paramnamelist[i].append(",").append(QString::number(value.toFloat(),'f',8)).append("\r\n").toLocal8Bit()); } @@ -358,7 +359,8 @@ void AdvParameterList::parameterChanged(int /*uas*/, int /*component*/, QString // Param value QString valstr = ""; - if (value.type() == QMetaType::Float || value.type() == QVariant::Double) + QMetaType::Type metaType(static_cast(value.type())); + if (metaType == QMetaType::Float || metaType == QMetaType::Double) { valstr = QString::number(value.toFloat(),'f',4); } @@ -434,7 +436,8 @@ void AdvParameterList::parameterChanged(int /*uas*/, int /*component*/, QString } QString valstr = ""; - if (value.type() == QMetaType::Float || value.type() == QVariant::Double) + QMetaType::Type metaType(static_cast(value.type())); + if (metaType == QMetaType::Float || metaType == QMetaType::Double) { valstr = QString::number(value.toFloat(),'f',6); } @@ -468,6 +471,8 @@ void AdvParameterList::parameterChanged(int /*uas*/, int /*component*/, QString void AdvParameterList::parameterChanged(int uas, int component, int parameterCount, int parameterId, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(parameterCount) // Create a parameter list model for comparison feature // [TODO] This needs to move to the global parameter model. diff --git a/src/ui/configuration/AdvancedParamConfig.cc b/src/ui/configuration/AdvancedParamConfig.cc index 4f15d0a1bf..96c7d4e3c5 100644 --- a/src/ui/configuration/AdvancedParamConfig.cc +++ b/src/ui/configuration/AdvancedParamConfig.cc @@ -75,9 +75,13 @@ void AdvancedParamConfig::allParamsAdded(void) void AdvancedParamConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (m_paramToWidgetMap.contains(parameterName)) { - if (value.type() == QVariant::Double || value.type() == QMetaType::Float) + QMetaType::Type metaType(static_cast(value.type())); + if (metaType == QMetaType::Double || metaType == QMetaType::Float) { m_paramToWidgetMap[parameterName]->setValue(value.toDouble()); } diff --git a/src/ui/configuration/ApmFirmwareConfig.cc b/src/ui/configuration/ApmFirmwareConfig.cc index c105326b26..70b54f5e3e 100644 --- a/src/ui/configuration/ApmFirmwareConfig.cc +++ b/src/ui/configuration/ApmFirmwareConfig.cc @@ -30,6 +30,7 @@ This file is part of the APM_PLANNER project #include "PX4FirmwareUploader.h" #include #include "arduino_intelhex.h" +#include "versioncomparator.h" #define ATMEGA2560CHIPID QByteArray().append(0x1E).append(0x98).append(0x01) @@ -921,8 +922,10 @@ QString ApmFirmwareConfig::processPortInfo(const QSerialPortInfo &info) void ApmFirmwareConfig::firmwareListError(QNetworkReply::NetworkError error) { - QNetworkReply *reply = qobject_cast(sender()); - QLOG_ERROR() << "Error!" << reply->errorString(); + if (error != QNetworkReply::NoError) { + QNetworkReply *reply = qobject_cast(sender()); + QLOG_ERROR() << "Error!" << reply->errorString(); + } } bool ApmFirmwareConfig::stripVersionFromGitReply(QString url, QString reply,QString type,QString stable,QString *out) @@ -1058,98 +1061,7 @@ bool ApmFirmwareConfig::versionIsGreaterThan(QString verstr,double version) bool ApmFirmwareConfig::compareVersionStrings(const QString& newVersion, const QString& currentVersion) { - int newMajor,newMinor,newBuild = 0; - int currentMajor, currentMinor,currentBuild = 0; - - QString newBuildSubMoniker, oldBuildSubMoniker; // holds if the build is a rc or dev build - - QRegExp versionEx("(\\d*\\.\\d+\\.?\\d?)-?(rc\\d)?"); - QString versionstr = ""; - int pos = versionEx.indexIn(newVersion); - if (pos > -1) { - // Split first sub-element to get numercal major.minor.build version - QLOG_DEBUG() << "Detected newVersion:" << versionEx.capturedTexts()<< " count:" - << versionEx.captureCount(); - versionstr = versionEx.cap(1); - QStringList versionList = versionstr.split("."); - newMajor = versionList[0].toInt(); - newMinor = versionList[1].toInt(); - if (versionList.size() > 2){ - newBuild = versionList[2].toInt(); - } - // second subelement is either rcX candidate or developement build - if (versionEx.captureCount() == 2) - newBuildSubMoniker = versionEx.cap(2); - } - - QRegExp versionEx2("(\\d*\\.\\d+\\.?\\d?)-?(rc\\d)?"); - versionstr = ""; - pos = versionEx2.indexIn(currentVersion); - if (pos > -1) { - QLOG_DEBUG() << "Detected currentVersion:" << versionEx2.capturedTexts() << " count:" - << versionEx2.captureCount(); - versionstr = versionEx2.cap(1); - QStringList versionList = versionstr.split("."); - currentMajor = versionList[0].toInt(); - currentMinor = versionList[1].toInt(); - if (versionList.size() > 2){ - currentBuild = versionList[2].toInt(); - } - // second subelement is either rcX candidate or developement build - if (versionEx2.captureCount() == 2) - oldBuildSubMoniker = versionEx2.cap(2); - } - - QLOG_DEBUG() << "Verison Compare:" < Old Version %d.%d.%d", - newMajor,newMinor,newBuild,currentMajor, currentMinor,currentBuild); - if (newMajor>currentMajor){ - // A Major release - return true; - } else if (newMajor == currentMajor){ - if (newMinor > currentMinor){ - // A minor release - return true; - } else if (newMinor == currentMinor){ - if (newBuild > currentBuild) - // new build (or tiny release) - return true; - else if (newBuild == currentBuild) { - // Check if RC is newer - // If the version isn't newer, it might be a new release candidate - int newRc = 0, oldRc = 0; - - if (newBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive) - && oldBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive)) { - QRegExp releaseNumber("\\d+"); - pos = releaseNumber.indexIn(newBuildSubMoniker); - if (pos > -1) { - QLOG_DEBUG() << "Detected newRc:" << versionEx.capturedTexts(); - newRc = releaseNumber.cap(0).toInt(); - } - - QRegExp releaseNumber2("\\d+"); - pos = releaseNumber2.indexIn(oldBuildSubMoniker); - if (pos > -1) { - QLOG_DEBUG() << "Detected oldRc:" << versionEx.capturedTexts(); - oldRc = releaseNumber.cap(0).toInt(); - } - - if (newRc > oldRc) - return true; - } - - if (newBuildSubMoniker.length() == 0 - && oldBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive)) { - QLOG_DEBUG() << "Stable build newer that last unstable release candidate "; - return true; // this means a new stable build of the unstable rc is available - } - } - } - } - - - - return false; + return VersionComparator::isVersionNewer(newVersion, currentVersion); } void ApmFirmwareConfig::flashCustomFirmware() diff --git a/src/ui/configuration/ApmHardwareConfig.cc b/src/ui/configuration/ApmHardwareConfig.cc index ac2dbd2923..ecd58d4db4 100644 --- a/src/ui/configuration/ApmHardwareConfig.cc +++ b/src/ui/configuration/ApmHardwareConfig.cc @@ -31,9 +31,9 @@ This file is part of the APM_PLANNER project #include "ApmHardwareConfig.h" ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : AP2ConfigWidget(parent), + m_uas(NULL), m_paramDownloadState(none), m_paramDownloadCount(0), - m_uas(NULL), m_mandatory(false) { ui.setupUi(this); @@ -393,6 +393,7 @@ void ApmHardwareConfig::toggleButtonsShown(bool show) void ApmHardwareConfig::parameterChanged(int uas, int component, int parameterCount, int parameterId, QString parameterName, QVariant value) { + Q_UNUSED(component) QString countString; // Create progress of downloading all parameters for UI diff --git a/src/ui/configuration/ApmPlaneLevel.cc b/src/ui/configuration/ApmPlaneLevel.cc index ae12923cbb..9375766ab5 100644 --- a/src/ui/configuration/ApmPlaneLevel.cc +++ b/src/ui/configuration/ApmPlaneLevel.cc @@ -74,6 +74,9 @@ void ApmPlaneLevel::manualCheckBoxToggled(bool checked) } void ApmPlaneLevel::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (parameterName == "MANUAL_LEVEL") { if (value.toInt() == 1) diff --git a/src/ui/configuration/ApmSoftwareConfig.cc b/src/ui/configuration/ApmSoftwareConfig.cc index 7a3258c8fa..dde377728b 100644 --- a/src/ui/configuration/ApmSoftwareConfig.cc +++ b/src/ui/configuration/ApmSoftwareConfig.cc @@ -549,18 +549,10 @@ void ApmSoftwareConfig::populateTimerTick() } -void ApmSoftwareConfig::writeParameter(int component, QString parameterName, QVariant value) -{ - QLOG_DEBUG() << "ASC writeParameter"; -} - -void ApmSoftwareConfig::readParameter(int component, QString parameterName, QVariant value) -{ - QLOG_DEBUG() << "ASC readParameter"; -} - void ApmSoftwareConfig::parameterChanged(int uas, int component, int parameterCount, int parameterId, QString parameterName, QVariant value) { + Q_UNUSED(component) + QString countString; // Create progress of downloading all parameters for UI switch (m_paramDownloadState){ diff --git a/src/ui/configuration/ApmSoftwareConfig.h b/src/ui/configuration/ApmSoftwareConfig.h index e2ccec58e5..503cfaa6d3 100644 --- a/src/ui/configuration/ApmSoftwareConfig.h +++ b/src/ui/configuration/ApmSoftwareConfig.h @@ -60,8 +60,6 @@ class ApmSoftwareConfig : public QWidget public slots: void parameterChanged(int uas, int component, int parameterCount, int parameterId, QString parameterName, QVariant value); - void writeParameter(int component, QString parameterName, QVariant value); - void readParameter(int component, QString parameterName, QVariant value); void advModeChanged(bool state); private slots: diff --git a/src/ui/configuration/ArduCopterPidConfig.cc b/src/ui/configuration/ArduCopterPidConfig.cc index 5ccd941e42..1370fe4b63 100644 --- a/src/ui/configuration/ArduCopterPidConfig.cc +++ b/src/ui/configuration/ArduCopterPidConfig.cc @@ -258,6 +258,9 @@ ArduCopterPidConfig::~ArduCopterPidConfig() } void ArduCopterPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (m_nameToBoxMap.contains(parameterName)) { m_nameToBoxMap[parameterName]->setValue(value.toDouble()); diff --git a/src/ui/configuration/ArduRoverPidConfig.cc b/src/ui/configuration/ArduRoverPidConfig.cc index 8d13e67550..ea55b64e76 100644 --- a/src/ui/configuration/ArduRoverPidConfig.cc +++ b/src/ui/configuration/ArduRoverPidConfig.cc @@ -102,6 +102,9 @@ void ArduRoverPidConfig::refreshButtonClicked() void ArduRoverPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (nameToBoxMap.contains(parameterName)) { nameToBoxMap[parameterName]->setValue(value.toFloat()); diff --git a/src/ui/configuration/BatteryMonitorConfig.cc b/src/ui/configuration/BatteryMonitorConfig.cc index 6778da7714..86f2855f36 100644 --- a/src/ui/configuration/BatteryMonitorConfig.cc +++ b/src/ui/configuration/BatteryMonitorConfig.cc @@ -254,9 +254,6 @@ void BatteryMonitorConfig::activeUASSet(UASInterface *uas) connect(uas,SIGNAL(batteryChanged(UASInterface*,double,double,double,int)),this,SLOT(batteryChanged(UASInterface*,double,double,double,int))); } -void BatteryMonitorConfig::alertOnLowClicked(bool checked) -{ -} void BatteryMonitorConfig::calcDividerSet() { diff --git a/src/ui/configuration/BatteryMonitorConfig.h b/src/ui/configuration/BatteryMonitorConfig.h index a97320b55c..69f2cef0df 100644 --- a/src/ui/configuration/BatteryMonitorConfig.h +++ b/src/ui/configuration/BatteryMonitorConfig.h @@ -83,7 +83,6 @@ private slots: void ampsPerVoltSet(); void batteryCapacitySet(); - void alertOnLowClicked(bool checked); void activeUASSet(UASInterface *uas); void batteryChanged(UASInterface* uas, double voltage, double current, double percent, int seconds); diff --git a/src/ui/configuration/CameraGimbalConfig.ui b/src/ui/configuration/CameraGimbalConfig.ui index eb4cb7d355..595c6ee7a9 100644 --- a/src/ui/configuration/CameraGimbalConfig.ui +++ b/src/ui/configuration/CameraGimbalConfig.ui @@ -270,7 +270,6 @@ - @@ -879,7 +878,6 @@ - diff --git a/src/ui/configuration/CopterPidConfig.cc b/src/ui/configuration/CopterPidConfig.cc index 8c5abe6337..b20e2b1c93 100644 --- a/src/ui/configuration/CopterPidConfig.cc +++ b/src/ui/configuration/CopterPidConfig.cc @@ -271,6 +271,9 @@ CopterPidConfig::~CopterPidConfig() } void CopterPidConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (m_nameToBoxMap.contains(parameterName)) { m_nameToBoxMap[parameterName]->setValue(value.toDouble()); diff --git a/src/ui/configuration/FailSafeConfig.cc b/src/ui/configuration/FailSafeConfig.cc index 97fb83658b..9075fff8c4 100644 --- a/src/ui/configuration/FailSafeConfig.cc +++ b/src/ui/configuration/FailSafeConfig.cc @@ -348,6 +348,9 @@ void FailSafeConfig::activeUASSet(UASInterface *uas) } void FailSafeConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + //Arducopter if (parameterName == "FS_THR_ENABLE") { @@ -493,6 +496,8 @@ void FailSafeConfig::remoteControlChannelRawChanges(int chan,float value) } void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2, float act3, float act4, float act5, float act6, float act7, float act8) { + Q_UNUSED(time) + ui.radio1Out->setValue(act1); ui.radio2Out->setValue(act2); ui.radio3Out->setValue(act3); @@ -504,6 +509,8 @@ void FailSafeConfig::hilActuatorsChanged(uint64_t time, float act1, float act2, } void FailSafeConfig::gpsStatusChanged(UASInterface* uas,int fixtype) { + Q_UNUSED(uas) + if (fixtype == 0 || fixtype == 1) { ui.gpsLabel->setText("

GPS: No Fix

"); @@ -519,5 +526,8 @@ void FailSafeConfig::gpsStatusChanged(UASInterface* uas,int fixtype) } void FailSafeConfig::navModeChanged(int uasid, int mode, const QString& text) { + Q_UNUSED(uasid) + Q_UNUSED(mode) + ui.modeLabel->setText("

" + text + "

"); } diff --git a/src/ui/configuration/FlightModeConfig.cc b/src/ui/configuration/FlightModeConfig.cc index aadc8d0089..4a91a42a2d 100644 --- a/src/ui/configuration/FlightModeConfig.cc +++ b/src/ui/configuration/FlightModeConfig.cc @@ -70,7 +70,6 @@ void FlightModeConfig::activeUASSet(UASInterface *uas) { if (m_uas) { - disconnect(m_uas,SIGNAL(modeChanged(int,QString,QString)),this,SLOT(modeChanged(int,QString,QString))); disconnect(m_uas,SIGNAL(remoteControlChannelRawChanged(int,float)),this,SLOT(remoteControlChannelRawChanged(int,float))); disconnect(ui.mode1ComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(comboBoxChanged(int))); disconnect(ui.mode2ComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(comboBoxChanged(int))); @@ -95,7 +94,6 @@ void FlightModeConfig::activeUASSet(UASInterface *uas) } AP2ConfigWidget::activeUASSet(uas); if (!uas) return; - connect(m_uas,SIGNAL(modeChanged(int,QString,QString)),this,SLOT(modeChanged(int,QString,QString))); connect(m_uas,SIGNAL(remoteControlChannelRawChanged(int,float)),this,SLOT(remoteControlChannelRawChanged(int,float))); QStringList itemlist; @@ -194,11 +192,6 @@ bool FlightModeConfig::isFlightModeChanged() } -void FlightModeConfig::modeChanged(int sysId, QString status, QString description) -{ - //Unused? -} - void FlightModeConfig::checkForComboxBoxChanged(QObject* sender, QComboBox *comboBox, int index, bool& modeChanged, const QString& param) { diff --git a/src/ui/configuration/FlightModeConfig.h b/src/ui/configuration/FlightModeConfig.h index 5e84b3a603..275a84019d 100644 --- a/src/ui/configuration/FlightModeConfig.h +++ b/src/ui/configuration/FlightModeConfig.h @@ -47,7 +47,6 @@ class FlightModeConfig : public AP2ConfigWidget private slots: void activeUASSet(UASInterface *uas); void saveButtonClicked(); - void modeChanged(int sysId, QString status, QString description); void remoteControlChannelRawChanged(int chan,float val); void parameterChanged(int uas, int component, QString parameterName, QVariant value); diff --git a/src/ui/configuration/FrameTypeConfig.cc b/src/ui/configuration/FrameTypeConfig.cc index 7d0053120b..7fa03df391 100644 --- a/src/ui/configuration/FrameTypeConfig.cc +++ b/src/ui/configuration/FrameTypeConfig.cc @@ -100,6 +100,9 @@ void FrameTypeConfig::parameterChanged(int uas, int component, QString parameter void FrameTypeConfig::parameterChanged(int uas, int component, int parameterCount, int parameterId, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(parameterCount) + // Create a parameter list model for comparison feature // [TODO] This needs to move to the global parameter model. diff --git a/src/ui/configuration/LogConsole.cc b/src/ui/configuration/LogConsole.cc index 42ceb87a60..d8970d51ac 100644 --- a/src/ui/configuration/LogConsole.cc +++ b/src/ui/configuration/LogConsole.cc @@ -38,12 +38,12 @@ static bool writeSerial(QSerialPort* port, const char *s) { } Worker::Worker(QSerialPort* port, QList& fileData): + m_state(start), m_port(port), m_files(fileData), - m_run(true), m_fdIndex(-1), m_blanks(0), - m_state(start) + m_run(true) {} Worker::~Worker() {} diff --git a/src/ui/configuration/OpticalFlowConfig.cc b/src/ui/configuration/OpticalFlowConfig.cc index 644e45695a..0215bf2889 100644 --- a/src/ui/configuration/OpticalFlowConfig.cc +++ b/src/ui/configuration/OpticalFlowConfig.cc @@ -35,6 +35,9 @@ OpticalFlowConfig::~OpticalFlowConfig() } void OpticalFlowConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (parameterName == "FLOW_ENABLE") { if (value.toInt() == 0) diff --git a/src/ui/configuration/PX4FirmwareUploader.cc b/src/ui/configuration/PX4FirmwareUploader.cc index cf1c71e523..a2de3d510a 100644 --- a/src/ui/configuration/PX4FirmwareUploader.cc +++ b/src/ui/configuration/PX4FirmwareUploader.cc @@ -653,6 +653,10 @@ bool PX4FirmwareUploader::checkCOA(const QByteArray& serial, const QByteArray& s QLOG_DEBUG() << "COA verification successful with public key" << publicKey; return true; } +#else + Q_UNUSED(serial) + Q_UNUSED(signature) + Q_UNUSED(publicKey) #endif return false; } diff --git a/src/ui/configuration/ParamWidget.cc b/src/ui/configuration/ParamWidget.cc index cf4c1c9247..e14bf77469 100644 --- a/src/ui/configuration/ParamWidget.cc +++ b/src/ui/configuration/ParamWidget.cc @@ -147,6 +147,8 @@ ParamWidget::~ParamWidget() void ParamWidget::setupInt(QString title,QString description,int value,int min,int max) { + Q_UNUSED(value) + type = INT; ui.titleLabel->setText("

" + title + "

"); ui.descriptionLabel->setText(description); @@ -176,6 +178,8 @@ void ParamWidget::setupInt(QString title,QString description,int value,int min,i void ParamWidget::setupDouble(QString title,QString description,double value,double min,double max,double increment) { + Q_UNUSED(value) + type = DOUBLE; ui.titleLabel->setText("

" + title + "

"); ui.descriptionLabel->setText(description); diff --git a/src/ui/configuration/Radio3DRConfig.cc b/src/ui/configuration/Radio3DRConfig.cc index 0d12dceefe..74eb651383 100644 --- a/src/ui/configuration/Radio3DRConfig.cc +++ b/src/ui/configuration/Radio3DRConfig.cc @@ -319,6 +319,8 @@ void Radio3DRConfig::updateRemoteComplete(int result) case resetRadioSettings: resetLocalRadioSettingsToDefaults(); break; + default: + break; } } } diff --git a/src/ui/configuration/Radio3DRConfig.ui b/src/ui/configuration/Radio3DRConfig.ui index 2a710e8dbb..c054b4e3b7 100644 --- a/src/ui/configuration/Radio3DRConfig.ui +++ b/src/ui/configuration/Radio3DRConfig.ui @@ -1038,7 +1038,6 @@ p, li { white-space: pre-wrap; } label - diff --git a/src/ui/configuration/StandardParamConfig.cc b/src/ui/configuration/StandardParamConfig.cc index 2577839fd8..4c170e4966 100644 --- a/src/ui/configuration/StandardParamConfig.cc +++ b/src/ui/configuration/StandardParamConfig.cc @@ -63,9 +63,13 @@ void StandardParamConfig::addCombo(QString title,QString description,QString par } void StandardParamConfig::parameterChanged(int uas, int component, QString parameterName, QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + if (paramToWidgetMap.contains(parameterName)) { - if (value.type() == QVariant::Double || value.type() == QMetaType::Float) + QMetaType::Type metaType(static_cast(value.type())); + if (metaType == QMetaType::Double || metaType == QMetaType::Float) { paramToWidgetMap[parameterName]->setValue(value.toDouble()); } diff --git a/src/ui/dataselectionscreen.cpp b/src/ui/dataselectionscreen.cpp index 12c98a9c40..0499453b9a 100644 --- a/src/ui/dataselectionscreen.cpp +++ b/src/ui/dataselectionscreen.cpp @@ -128,6 +128,7 @@ void DataSelectionScreen::addItem(QString name) } void DataSelectionScreen::onItemChanged(QTreeWidgetItem* item,int column) { + Q_UNUSED(column) if (!item->parent()) { return; diff --git a/src/ui/designer/QGCComboBox.cc b/src/ui/designer/QGCComboBox.cc index ee8bd45588..005348f8b0 100644 --- a/src/ui/designer/QGCComboBox.cc +++ b/src/ui/designer/QGCComboBox.cc @@ -479,18 +479,18 @@ void QGCComboBox::comboBoxIndexChanged(QString val) { parameterName = comboBoxTextToParamMap.value(ui->editOptionComboBox->currentText()); } - switch (parameterValue.type()) + switch (static_cast(parameterValue.type())) { - case QVariant::Char: + case QMetaType::QChar: parameterValue = QVariant(QChar((unsigned char)comboBoxTextToValMap[val])); break; - case QVariant::Int: + case QMetaType::Int: parameterValue = (int)comboBoxTextToValMap[val]; break; - case QVariant::UInt: + case QMetaType::UInt: parameterValue = (unsigned int)comboBoxTextToValMap[val]; break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: parameterValue =(float)comboBoxTextToValMap[val]; break; diff --git a/src/ui/designer/QGCParamSlider.cc b/src/ui/designer/QGCParamSlider.cc index 80ae2b7efa..9572ff8f17 100644 --- a/src/ui/designer/QGCParamSlider.cc +++ b/src/ui/designer/QGCParamSlider.cc @@ -262,14 +262,14 @@ void QGCParamSlider::endEditMode() ui->writeButton->show(); ui->readButton->show(); ui->valueSlider->show(); - switch (parameterValue.type()) + switch (static_cast(parameterValue.type())) { - case QVariant::Char: - case QVariant::Int: - case QVariant::UInt: + case QMetaType::QChar: + case QMetaType::Int: + case QMetaType::UInt: ui->intValueSpinBox->show(); break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: ui->doubleValueSpinBox->show(); break; @@ -307,21 +307,21 @@ void QGCParamSlider::setSliderValue(int sliderValue) if (!valueModLock && !valueModLockParam) { valueModLock = true; - switch (parameterValue.type()) + switch (static_cast(parameterValue.type())) { - case QVariant::Char: + case QMetaType::QChar: parameterValue = QVariant(QChar((unsigned char)scaledIntToFloat(sliderValue))); ui->intValueSpinBox->setValue(parameterValue.toInt()); break; - case QVariant::Int: + case QMetaType::Int: parameterValue = (int)scaledIntToFloat(sliderValue); ui->intValueSpinBox->setValue(parameterValue.toInt()); break; - case QVariant::UInt: + case QMetaType::UInt: parameterValue = (unsigned int)scaledIntToFloat(sliderValue); ui->intValueSpinBox->setValue(parameterValue.toUInt()); break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: parameterValue = scaledIntToFloat(sliderValue); ui->doubleValueSpinBox->setValue(parameterValue.toFloat()); @@ -412,9 +412,9 @@ void QGCParamSlider::setParameterValue(int uas, int component, int paramCount, i parameterValue = value; ui->valueSlider->setEnabled(true); valueModLockParam = true; - switch (value.type()) + switch (static_cast(value.type())) { - case QVariant::Char: + case QMetaType::QChar: ui->intValueSpinBox->show(); ui->intValueSpinBox->setEnabled(true); ui->doubleValueSpinBox->hide(); @@ -427,7 +427,7 @@ void QGCParamSlider::setParameterValue(int uas, int component, int paramCount, i } ui->valueSlider->setValue(floatToScaledInt(value.toUInt())); break; - case QVariant::Int: + case QMetaType::Int: ui->intValueSpinBox->show(); ui->intValueSpinBox->setEnabled(true); ui->doubleValueSpinBox->hide(); @@ -440,7 +440,7 @@ void QGCParamSlider::setParameterValue(int uas, int component, int paramCount, i } ui->valueSlider->setValue(floatToScaledInt(value.toInt())); break; - case QVariant::UInt: + case QMetaType::UInt: ui->intValueSpinBox->show(); ui->intValueSpinBox->setEnabled(true); ui->doubleValueSpinBox->hide(); @@ -453,7 +453,7 @@ void QGCParamSlider::setParameterValue(int uas, int component, int paramCount, i } ui->valueSlider->setValue(floatToScaledInt(value.toUInt())); break; - case QVariant::Double: + case QMetaType::Double: case QMetaType::Float: ui->doubleValueSpinBox->setValue(value.toFloat()); ui->doubleValueSpinBox->show(); diff --git a/src/ui/designer/QGCRadioChannelDisplay.cpp b/src/ui/designer/QGCRadioChannelDisplay.cpp index 0e7217f42a..2996f5a509 100644 --- a/src/ui/designer/QGCRadioChannelDisplay.cpp +++ b/src/ui/designer/QGCRadioChannelDisplay.cpp @@ -31,6 +31,8 @@ void QGCRadioChannelDisplay::setOrientation(Qt::Orientation orient) } void QGCRadioChannelDisplay::paintEvent(QPaintEvent *event) { + Q_UNUSED(event) + //Values range from 0-3000. //1500 is the middle, static servo value. QPainter painter(this); diff --git a/src/ui/designer/QGCTextLabel.cc b/src/ui/designer/QGCTextLabel.cc index 327a7856a1..b925fd550c 100644 --- a/src/ui/designer/QGCTextLabel.cc +++ b/src/ui/designer/QGCTextLabel.cc @@ -136,6 +136,10 @@ void QGCTextLabel::readSettings(const QString& pre,const QVariantMap& settings) } void QGCTextLabel::textMessageReceived(int uasid, int component, int severity, QString message) { + Q_UNUSED(uasid) + Q_UNUSED(component) + Q_UNUSED(severity) + if (enabledNum != -1) { //SUCCESS: Executed CMD: 241 diff --git a/src/ui/designer/QGCToolWidget.cc b/src/ui/designer/QGCToolWidget.cc index ad31f4d29d..d503939c69 100644 --- a/src/ui/designer/QGCToolWidget.cc +++ b/src/ui/designer/QGCToolWidget.cc @@ -217,6 +217,10 @@ QList QGCToolWidget::getParamList() } void QGCToolWidget::setParameterValue(int uas, int component, QString parameterName, const QVariant value) { + Q_UNUSED(uas) + Q_UNUSED(component) + Q_UNUSED(value) + QString widgetName = getTitle(); int size = settingsMap["count"].toInt(); if (paramToItemMap.contains(parameterName)) diff --git a/src/ui/map/QGCMapWidget.cc b/src/ui/map/QGCMapWidget.cc index e5a7bc9c1d..0683e9ccdf 100644 --- a/src/ui/map/QGCMapWidget.cc +++ b/src/ui/map/QGCMapWidget.cc @@ -222,7 +222,6 @@ void QGCMapWidget::showEvent(QShowEvent* event) connect(UASManager::instance(), SIGNAL(UASCreated(UASInterface*)), this, SLOT(addUAS(UASInterface*)), Qt::UniqueConnection); connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(activeUASSet(UASInterface*)), Qt::UniqueConnection); connect(UASManager::instance(), SIGNAL(homePositionChanged(double,double,double)), this, SLOT(updateHomePosition(double,double,double))); - connect(UASManager::instance(),SIGNAL(UASDeleted(UASInterface*)),this,SLOT(deleteUas(UASInterface*))); foreach (UASInterface* uas, UASManager::instance()->getUASList()) { @@ -381,14 +380,6 @@ void QGCMapWidget::addUAS(UASInterface* uas) } } -/** - * - * @param uas the UAS/MAV to remove from the map widget - */ -void QGCMapWidget::deleteUas(UASInterface* uas) -{ -} - void QGCMapWidget::activeUASSet(UASInterface* uas) { // Only execute if proper UAS is set diff --git a/src/ui/map/QGCMapWidget.h b/src/ui/map/QGCMapWidget.h index b0c4f59aa8..4bf647b6eb 100644 --- a/src/ui/map/QGCMapWidget.h +++ b/src/ui/map/QGCMapWidget.h @@ -48,8 +48,6 @@ public slots: void guidedAltActionTriggered(); /** @brief Add system to map view */ void addUAS(UASInterface* uas); - /** @brief Remove system from map view */ - void deleteUas(UASInterface* uas); /** @brief Update the global position of a system */ void updateGlobalPosition(UASInterface* uas, double lat, double lon, double alt, quint64 usec); /** @brief Update the global position of all systems */ diff --git a/src/ui/qcustomplot.cpp b/src/ui/qcustomplot.cpp index b0df60ce73..40230d83fc 100644 --- a/src/ui/qcustomplot.cpp +++ b/src/ui/qcustomplot.cpp @@ -12203,7 +12203,6 @@ void QCPGraph::drawLinePlot(QCPPainter *painter, QVector *lineData) con p += batch; } */ - qint64 msecs = QDateTime::currentMSecsSinceEpoch(); // if drawing solid line and not in PDF, use much faster line drawing instead of polyline: if (mParentPlot->plottingHints().testFlag(QCP::phFastPolylines) && painter->pen().style() == Qt::SolidLine && diff --git a/src/ui/uas/QGCMessageView.cc b/src/ui/uas/QGCMessageView.cc index 76b76ee5f4..08349d2520 100644 --- a/src/ui/uas/QGCMessageView.cc +++ b/src/ui/uas/QGCMessageView.cc @@ -47,6 +47,7 @@ void QGCMessageView::setActiveUAS(UASInterface* uas) void QGCMessageView::handleTextMessage(int uasid, int componentid, int severity, QString text) { // XXX color messages according to severity + Q_UNUSED(severity) ui->plainTextEdit->appendHtml(QString("[%2:%3] %4\n").arg(UASManager::instance()->getUASForId(uasid)->getColor().name()).arg(UASManager::instance()->getUASForId(uasid)->getUASName()).arg(componentid).arg(text)); // Ensure text area scrolls correctly diff --git a/src/ui/uas/UASActionsWidget.cpp b/src/ui/uas/UASActionsWidget.cpp index 50684c0bc2..0e4636a190 100644 --- a/src/ui/uas/UASActionsWidget.cpp +++ b/src/ui/uas/UASActionsWidget.cpp @@ -827,6 +827,8 @@ void UASActionsWidget::parameterChanged(int uas, int component, int parameterCou void UASActionsWidget::contextMenuEvent(QContextMenuEvent *event) { + Q_UNUSED(event) + QLOG_DEBUG() << "contextMenuEvent"; if(m_uas == NULL) diff --git a/src/ui/uas/UASListWidget.cc b/src/ui/uas/UASListWidget.cc index 503965c52c..44b14b8a91 100644 --- a/src/ui/uas/UASListWidget.cc +++ b/src/ui/uas/UASListWidget.cc @@ -151,6 +151,8 @@ void UASListWidget::removeUAS(UASInterface* uas) void UASListWidget::resizeEvent(QResizeEvent *e) { + Q_UNUSED(e) + if (scrollArea->verticalScrollBar()->isVisible()) { int width = this->width() - QApplication::style()->pixelMetric(QStyle::PM_ScrollBarExtent); diff --git a/src/ui/uas/UASQuickViewGaugeItem.cc b/src/ui/uas/UASQuickViewGaugeItem.cc index 0446e52807..7dc9f6908b 100644 --- a/src/ui/uas/UASQuickViewGaugeItem.cc +++ b/src/ui/uas/UASQuickViewGaugeItem.cc @@ -15,6 +15,8 @@ void UASQuickViewGaugeItem::setTitle(QString title) } void UASQuickViewGaugeItem::resizeEvent(QResizeEvent *event) { + Q_UNUSED(event) + QFont valuefont = valueLabel->font(); QFont titlefont = titleLabel->font(); valuefont.setPixelSize(this->height() / 2.0); diff --git a/src/ui/uas/UASQuickViewItem.cc b/src/ui/uas/UASQuickViewItem.cc index dfb6e0f060..80ebcd969c 100644 --- a/src/ui/uas/UASQuickViewItem.cc +++ b/src/ui/uas/UASQuickViewItem.cc @@ -7,5 +7,7 @@ UASQuickViewItem::UASQuickViewItem(QWidget *parent) : QWidget(parent) } void UASQuickViewItem::mouseDoubleClickEvent(QMouseEvent *event) { + Q_UNUSED(event) + emit showSelectDialog(title()); } diff --git a/src/ui/uas/UASQuickViewItemSelect.cc b/src/ui/uas/UASQuickViewItemSelect.cc index 0ceff1480c..7422ab0989 100644 --- a/src/ui/uas/UASQuickViewItemSelect.cc +++ b/src/ui/uas/UASQuickViewItemSelect.cc @@ -72,8 +72,6 @@ void UASQuickViewItemSelect::addItem(QString item,bool enabled) label->setText(name); label->show(); //ui.gridLayout->addWidget(label,currrow,currcol++); - bool breakout = false; - int row = -1; /* while (!breakout) { if (!ui.gridLayout->itemAtPosition(++row,col) || row > 100) @@ -87,24 +85,6 @@ void UASQuickViewItemSelect::addItem(QString item,bool enabled) ui.stackedWidget->widget(col)->layout()->addWidget(label); ui.stackedWidget->widget(col)->layout()->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding)); } -void UASQuickViewItemSelect::resizeEvent(QResizeEvent *event) -{ - /*for (int i=0;iremoveWidget(m_checkBoxList[i]); - } - int row = 0; - int col = 0; - for (int i=0;iaddWidget(m_checkBoxList[i],row,col); - col++; - ui.gridLayout->widget()->width() > this->width(); - //need to reduce column number. - - }*/ - -} void UASQuickViewItemSelect::checkBoxClicked(bool checked) { diff --git a/src/ui/uas/UASQuickViewItemSelect.h b/src/ui/uas/UASQuickViewItemSelect.h index 0eb0d385a5..1035ec07ee 100644 --- a/src/ui/uas/UASQuickViewItemSelect.h +++ b/src/ui/uas/UASQuickViewItemSelect.h @@ -15,8 +15,7 @@ class UASQuickViewItemSelect : public QWidget void addItem(QString item,bool enabled = false); int currrow; int currcol; -protected: - void resizeEvent(QResizeEvent *event); + private: bool m_isSingleOnly; QMap m_categoryToIndexMap; diff --git a/src/ui/uas/UASQuickViewTextItem.cc b/src/ui/uas/UASQuickViewTextItem.cc index 32319d79b9..e90ed34526 100644 --- a/src/ui/uas/UASQuickViewTextItem.cc +++ b/src/ui/uas/UASQuickViewTextItem.cc @@ -135,6 +135,7 @@ void UASQuickViewTextItem::setValuePixelSize(int size) void UASQuickViewTextItem::resizeEvent(QResizeEvent *event) { + Q_UNUSED(event) return; QFont valuefont = valueLabel->font(); QFont titlefont = titleLabel->font(); diff --git a/src/versioncomparator.cc b/src/versioncomparator.cc new file mode 100644 index 0000000000..d3950ddfc6 --- /dev/null +++ b/src/versioncomparator.cc @@ -0,0 +1,78 @@ +#include "versioncomparator.h" + +#include + +#include "QsLog.h" + +bool VersionComparator::isVersionNewer(const QString& newVersion, + const QString& currentVersion) +{ + int newMajor = 0,newMinor = 0,newBuild = 0, newRc = 0; + int currentMajor = 0, currentMinor = 0,currentBuild = 0, oldRc = 0; + + QString newBuildSubMoniker, oldBuildSubMoniker; // holds if the build is a rc or dev build + + splitVersionString(newVersion, newMajor, newMinor, newBuild, + newBuildSubMoniker, newRc); + + splitVersionString(currentVersion, currentMajor, currentMinor, currentBuild, + oldBuildSubMoniker, oldRc); + + QLOG_DEBUG() << "Verison Compare:" < Old Version %d.%d.%d", + newMajor,newMinor,newBuild,currentMajor, currentMinor,currentBuild); + if (newMajor>currentMajor){ + // A Major release + return true; + } else if (newMajor == currentMajor){ + if (newMinor > currentMinor){ + // A minor release + return true; + } else if (newMinor == currentMinor){ + if (newBuild > currentBuild) + // new build (or tiny release) + return true; + else if (newBuild == currentBuild) { + // Check if RC is newer + // If the version isn't newer, it might be a new release candidate + + if (newBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive) + && oldBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive)) { + + if (newRc > oldRc) + return true; + } + + if (newBuildSubMoniker.length() == 0 + && oldBuildSubMoniker.startsWith("RC", Qt::CaseInsensitive)) { + QLOG_DEBUG() << "Stable build newer that last unstable release candidate "; + return true; // this means a new stable build of the unstable rc is available + } + } + } + } + + return false; +} + +void VersionComparator::splitVersionString(const QString& versionString, + int& majorNumber, int& minorNumber, + int& buildNumber, QString& buildSubMoniker, + int& rcVersion) +{ + const QRegExp versionEx("((\\d*)\\.(\\d+)\\.?(\\d+)?)-?(rc(\\d))?"); + + const int pos = versionEx.indexIn(versionString); + if (pos > -1) { + + QLOG_DEBUG() << "Detected version:" << versionEx.capturedTexts()<< " count:" + << versionEx.captureCount(); + + majorNumber = versionEx.cap(2).toInt(); + minorNumber = versionEx.cap(3).toInt(); + buildNumber = versionEx.cap(4).toInt(); + + // fifth subelement is either rcX candidate or developement build + buildSubMoniker = versionEx.cap(5); + rcVersion = versionEx.cap(6).toInt(); + } +} diff --git a/src/versioncomparator.h b/src/versioncomparator.h new file mode 100644 index 0000000000..bbc96a5b06 --- /dev/null +++ b/src/versioncomparator.h @@ -0,0 +1,37 @@ +#ifndef VERSIONCOMPARATOR_H +#define VERSIONCOMPARATOR_H + +#include + +/** + * @brief Compares two version strings. + * + * This class can be used to compare two version strings. + * The strings need to contain a version number in the follwing format: + * MAJOR.MINOR[.BUILD][-RELEASE_CANDIDATE] + * e.g. 2.0.18-rc2 or 2.1 + * + **/ +class VersionComparator +{ +public: + + /** + * @brief compares two version strings + * @param newVersion: this version is checked if it is newer, + * it is probably fetched from the internet + * @param currentVersion: this is the current version installed on the system + * @return returns true if newVersion is newer than currentVersion + */ + static bool isVersionNewer(const QString& newVersion, + const QString& currentVersion); + +private: + + static void splitVersionString(const QString& versionString, + int& majorNumber, int& minorNumber, + int& buildNumber, QString& buildSubMoniker, + int& rcVersion); +}; + +#endif // VERSIONCOMPARATOR_H