Unverified Commit f9a7d849 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge branch 'master' into QGC_Change_NULL_or_0_to_nullptr

parents 655661fc ea63d012
......@@ -10,6 +10,10 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-Wall -Wextra -Wno-address-of-packed-member)
endif()
# CMake build type
# Debug Release RelWithDebInfo MinSizeRel Coverage
if (NOT CMAKE_BUILD_TYPE)
......@@ -142,7 +146,6 @@ set(QGC_RESOURCES
qgcresources.qrc
qgroundcontrol.qrc
qgcimages.qrc
src/FirmwarePlugin/APM/APMResources.qrc
src/FirmwarePlugin/PX4/PX4Resources.qrc
src/Airmap/airmap.qrc
......
......@@ -6,6 +6,8 @@ Note: This file only contains high level features or important fixes.
### 3.6.0 - Daily Build
* Log Replay: Support changing speed of playback
* Basic object avoidance added to vehicles.
* Added ability to set a joystick button to be single action or repeated action while the button is held down.
* Rework joysticks. Fixed several issues and updated setup UI.
* Adding support for UDP RTP h.265 video streams
......
......@@ -604,6 +604,26 @@ Item {
}
}
//-------------------------------------------------------------------------
//-- Object Avoidance
Item {
visible: activeVehicle && activeVehicle.objectAvoidance.available && activeVehicle.objectAvoidance.enabled
anchors.centerIn: parent
width: parent.width * 0.5
height: parent.height * 0.5
Repeater {
model: activeVehicle && activeVehicle.objectAvoidance.gridSize > 0 ? activeVehicle.objectAvoidance.gridSize : []
Rectangle {
width: ScreenTools.defaultFontPixelWidth
height: width
radius: width * 0.5
color: distance < 0.25 ? "red" : "orange"
x: (parent.width * activeVehicle.objectAvoidance.grid(modelData).x) + (parent.width * 0.5)
y: (parent.height * activeVehicle.objectAvoidance.grid(modelData).y) + (parent.height * 0.5)
property real distance: activeVehicle.objectAvoidance.distance(modelData)
}
}
}
//-------------------------------------------------------------------------
//-- Connection Lost While Armed
Popup {
id: connectionLostArmed
......
......@@ -47,7 +47,7 @@ customQuickInterfaceSingletonFactory(QQmlEngine*, QJSEngine*)
{
qCDebug(CustomLog) << "Creating CustomQuickInterface instance";
CustomQuickInterface* pIFace = new CustomQuickInterface();
CustomPlugin* pPlug = dynamic_cast<CustomPlugin*>(qgcApp()->toolbox()->corePlugin());
auto* pPlug = qobject_cast<CustomPlugin*>(qgcApp()->toolbox()->corePlugin());
if(pPlug) {
pIFace->init();
} else {
......
......@@ -26,7 +26,7 @@ CustomVideoManager::_updateSettings()
return;
//-- Check encoding
if(_activeVehicle && _activeVehicle->dynamicCameras()) {
CustomCameraControl* pCamera = dynamic_cast<CustomCameraControl*>(_activeVehicle->dynamicCameras()->currentCameraInstance());
auto* pCamera = qobject_cast<CustomCameraControl*>(_activeVehicle->dynamicCameras()->currentCameraInstance());
if(pCamera) {
Fact *fact = pCamera->videoEncoding();
if (fact) {
......
<RCC>
<qresource prefix="/qmlimages">
<file alias="camera.svg">resources/camera.svg</file>
<file alias="adsbVehicle.svg">src/FlightMap/Images/adsbVehicle.svg</file>
<file alias="Airframe/AirframeSimulation">src/AutoPilotPlugins/Common/Images/AirframeSimulation.svg</file>
<file alias="Airframe/AirframeUnknown">src/AutoPilotPlugins/Common/Images/AirframeUnknown.svg</file>
......@@ -59,6 +58,7 @@
<file alias="attitudePointer.svg">src/FlightMap/Images/attitudePointer.svg</file>
<file alias="AwarenessAircraft.svg">src/FlightMap/Images/AwarenessAircraft.svg</file>
<file alias="Battery.svg">src/ui/toolbar/Images/Battery.svg</file>
<file alias="camera.svg">resources/camera.svg</file>
<file alias="camera_photo.svg">src/Camera/images/camera_photo.svg</file>
<file alias="camera_video.svg">src/Camera/images/camera_video.svg</file>
<file alias="CameraComponentIcon.png">src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png</file>
......@@ -91,6 +91,7 @@
<file alias="Hamburger.svg">src/ui/toolbar/Images/Hamburger.svg</file>
<file alias="Help.svg">src/FlightMap/Images/Help.svg</file>
<file alias="HelpBlack.svg">src/FlightMap/Images/HelpBlack.svg</file>
<file alias="HITL.svg">src/AutoPilotPlugins/PX4/Images/HITL.svg</file>
<file alias="Home.svg">src/FlightMap/Images/Home.svg</file>
<file alias="Joystick.png">src/ui/toolbar/Images/Joystick.png</file>
<file alias="LandMode.svg">src/AutoPilotPlugins/PX4/Images/LandMode.svg</file>
......@@ -117,6 +118,7 @@
<file alias="MotorComponentIcon.svg">src/AutoPilotPlugins/Common/Images/MotorComponentIcon.svg</file>
<file alias="no-logging-light.svg">src/AutoPilotPlugins/PX4/Images/no-logging-light.svg</file>
<file alias="no-logging.svg">src/AutoPilotPlugins/PX4/Images/no-logging.svg</file>
<file alias="ObjectAvoidance.svg">src/AutoPilotPlugins/PX4/Images/ObjectAvoidance.svg</file>
<file alias="PaperPlane.svg">src/ui/toolbar/Images/PaperPlane.svg</file>
<file alias="PiP.svg">src/FlightMap/Images/PiP.svg</file>
<file alias="pipHide.svg">src/FlightMap/Images/pipHide.svg</file>
......
......@@ -855,6 +855,7 @@ HEADERS+= \
src/Vehicle/MultiVehicleManager.h \
src/Vehicle/GPSRTKFactGroup.h \
src/Vehicle/Vehicle.h \
src/Vehicle/VehicleObjectAvoidance.h \
src/VehicleSetup/VehicleComponent.h \
!MobileBuild { !NoSerialBuild {
......@@ -881,6 +882,7 @@ SOURCES += \
src/Vehicle/MultiVehicleManager.cc \
src/Vehicle/GPSRTKFactGroup.cc \
src/Vehicle/Vehicle.cc \
src/Vehicle/VehicleObjectAvoidance.cc \
src/VehicleSetup/VehicleComponent.cc \
!MobileBuild { !NoSerialBuild {
......
......@@ -84,7 +84,7 @@ AirMapAdvisoryManager::_requestAdvisories()
}
params.geometry = Geometry(polygon);
//-- Rulesets
AirMapRulesetsManager* pRulesMgr = dynamic_cast<AirMapRulesetsManager*>(qgcApp()->toolbox()->airspaceManager()->ruleSets());
auto* pRulesMgr = qobject_cast<AirMapRulesetsManager*>(qgcApp()->toolbox()->airspaceManager()->ruleSets());
QString ruleIDs;
if(pRulesMgr) {
for(int rs = 0; rs < pRulesMgr->ruleSets()->count(); rs++) {
......
......@@ -428,7 +428,7 @@ AirMapFlightPlanManager::_createFlightPlan()
void
AirMapFlightPlanManager::_updateRulesAndFeatures(std::vector<RuleSet::Id>& rulesets, std::unordered_map<std::string, RuleSet::Feature::Value>& features, bool updateFeatures)
{
AirMapRulesetsManager* pRulesMgr = dynamic_cast<AirMapRulesetsManager*>(qgcApp()->toolbox()->airspaceManager()->ruleSets());
auto* pRulesMgr = qobject_cast<AirMapRulesetsManager*>(qgcApp()->toolbox()->airspaceManager()->ruleSets());
if(pRulesMgr) {
for(int rs = 0; rs < pRulesMgr->ruleSets()->count(); rs++) {
AirMapRuleSet* ruleSet = qobject_cast<AirMapRuleSet*>(pRulesMgr->ruleSets()->get(rs));
......
......@@ -17,6 +17,18 @@ if(QGC_AIRMAP)
airmap.qrc
)
add_custom_target(AirmapQml
SOURCES
AirmapSettings.qml
AirspaceRegulation.qml
ComplianceRules.qml
FlightDetails.qml
RuleSelector.qml
AirspaceControl.qml
AirspaceWeather.qml
FlightBrief.qml
FlightFeature.qml
)
else()
add_library(Airmap
dummy/AirspaceManager.cc
......
......@@ -17,6 +17,17 @@ add_library(AnalyzeView
${EXTRA_SRC}
)
add_custom_target(
AnalyzeViewQml
SOURCES
AnalyzePage.qml
AnalyzeView.qml
GeoTagPage.qml
LogDownloadPage.qml
MavlinkConsolePage.qml
MAVLinkInspectorPage.qml
)
target_link_libraries(AnalyzeView
PRIVATE
qgc
......
add_custom_target(APMAutoPilotPluginQml
SOURCES
APMAirframeComponent.qml
APMAirframeComponentSummary.qml
APMCameraComponent.qml
APMCameraComponentSummary.qml
APMCameraSubComponent.qml
APMFlightModesComponent.qml
APMFlightModesComponentSummary.qml
APMHeliComponent.qml
APMLightsComponent.qml
APMLightsComponentSummary.qml
APMNotSupported.qml
APMPowerComponent.qml
APMPowerComponentSummary.qml
APMRadioComponentSummary.qml
APMSafetyComponent.qml
APMSafetyComponentCopter.qml
APMSafetyComponentPlane.qml
APMSafetyComponentRover.qml
APMSafetyComponentSub.qml
APMSafetyComponentSummary.qml
APMSafetyComponentSummaryCopter.qml
APMSafetyComponentSummaryPlane.qml
APMSafetyComponentSummaryRover.qml
APMSafetyComponentSummarySub.qml
APMSensorsComponent.qml
APMSensorsComponentSummary.qml
APMSubFrameComponent.qml
APMSubFrameComponentSummary.qml
APMSubMotorComponent.qml
APMTuningComponentCopter.qml
APMTuningComponentSub.qml
)
\ No newline at end of file
add_subdirectory(APM)
add_subdirectory(Common)
add_subdirectory(PX4)
add_library(AutoPilotPlugins
APM/APMAirframeComponent.cc
APM/APMAirframeComponentController.cc
......
add_custom_target(CommonAutoPilotPluginQml
SOURCES
ESP8266Component.qml
ESP8266ComponentSummary.qml
MotorComponent.qml
RadioComponent.qml
SetupPage.qml
SyslinkComponent.qml
)
\ No newline at end of file
add_custom_target(PX4AutoPilotPluginQml
SOURCES
AirframeComponent.qml
AirframeComponentSummary.qml
CameraComponent.qml
CameraComponentSummary.qml
FlightModesComponentSummary.qml
PX4AdvancedFlightModes.qml
PX4FlightModes.qml
PX4RadioComponentSummary.qml
PX4SimpleFlightModes.qml
PX4TuningComponentCopter.qml
PX4TuningComponentPlane.qml
PX4TuningComponentVTOL.qml
PowerComponent.qml
PowerComponentSummary.qml
SafetyComponent.qml
SafetyComponentSummary.qml
SensorsComponent.qml
SensorsComponentSummary.qml
SensorsComponentSummaryFixedWing.qml
SensorsSetup.qml
)
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 288 288" style="enable-background:new 0 0 288 288;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:#FFFFFF;stroke:#FFFFFF;}
.st2{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-linecap:round;}
.st3{fill:none;stroke:#FFFFFF;stroke-width:3;}
.st4{fill:#FFFFFF;stroke:#FFFFFF;stroke-width:3;}
</style>
<g>
<path class="st0" d="M274.534,5.498H13.465C6.043,5.498,0,11.545,0,18.963v200.232c0,7.418,6.042,13.465,13.465,13.465h94.671
l-6.086,39.603H85.606c-2.825,0-5.12,2.294-5.12,5.115c0,2.83,2.294,5.124,5.12,5.124h116.789c2.83,0,5.124-2.294,5.124-5.124
c0-2.821-2.294-5.115-5.124-5.115h-16.594l-6.091-39.603h94.825c7.427,0,13.465-6.047,13.465-13.465V18.963
C287.999,11.545,281.961,5.498,274.534,5.498z M112.417,272.262l6.086-39.603h50.836l6.1,39.603H112.417z M277.76,222.411H10.244
v-39.814H277.76V222.411z M277.76,172.349H10.244V15.746H277.76V172.349z"/>
<path class="st0" d="M144,209.843c4.447,0,8.068-3.621,8.068-8.068c0-4.447-3.621-8.068-8.068-8.068s-8.064,3.621-8.064,8.068
C135.936,206.222,139.553,209.843,144,209.843z"/>
</g>
<g>
<g>
<g>
<path id="path2991_3_" class="st1" d="M103.117,52.265c-0.629,3.062-4.237,4.993-8.034,4.185c-3.8-0.811-6.185-4.017-5.35-7.037
c0.835-3.02,4.405-4.745,7.999-3.982C101.323,46.2,103.746,49.204,103.117,52.265z"/>
<path id="path3761_3_" class="st2" d="M96.75,68.016c-12.195-0.512-21.83-9.625-20.95-19.012
c0.88-9.387,10.501-15.603,20.916-15.067c10.415,0.536,19.077,7.687,19.974,17.05c0.216,2.264-0.089,4.532-0.952,6.663"/>
<path id="path2991-6_3_" class="st1" d="M192.972,56.45c-3.8,0.811-7.408-1.12-8.034-4.185c-0.629-3.062,1.794-6.068,5.388-6.834
c3.594-0.766,7.164,0.962,7.999,3.982C199.157,52.434,196.772,55.643,192.972,56.45z"/>
<path id="path3761-1_3_" class="st2" d="M172.269,57.533c-3.477-8.831,2.261-18.332,11.889-22.067
c9.625-3.735,20.802-0.814,25.919,7.267c5.116,8.082,0.962,18.995-10.305,23.482c-2.725,1.086-5.676,1.704-8.625,1.807"/>
<path id="path2991-9_3_" class="st1" d="M200.916,130.179c-0.629-3.062,2.969-6.278,8.01-7.35
c5.037-1.072,9.772,0.368,10.604,3.385c0.835,3.02-2.715,6.515-7.958,7.632S201.545,133.244,200.916,130.179z"/>
<path id="path3761-2_3_" class="st2" d="M201.225,113.174c13.889-4.567,29.125-2.852,35.069,4.972
c5.945,7.824-0.904,19.658-16.404,25.125s-32.437,1.68-36.77-7.047c-1.048-2.11-1.33-4.381-0.88-6.673"/>
<path id="path2991-6-9_3_" class="st1" d="M79.13,122.829c5.037,1.072,8.635,4.288,8.01,7.35
c-0.629,3.062-5.412,4.783-10.655,3.666c-5.244-1.117-8.79-4.615-7.958-7.632C69.357,123.197,74.092,121.757,79.13,122.829z"/>
<path id="path3761-1-5_3_" class="st2" d="M105.835,129.678c1.752,9.47-9.7,17.39-26.156,16.047
c-16.456-1.344-30.155-11.662-30.1-21.304c0.052-9.642,12.363-14.94,27.015-13.425c3.546,0.368,7.072,1.124,10.425,2.244"/>
</g>
<path class="st3" d="M77.803,128.338c44.532-18.558,83.381-38.595,113.846-77.395"/>
<path class="st3" d="M210.262,128.338c-44.532-18.558-83.381-38.595-113.849-77.395"/>
<path class="st4" d="M176.661,93.677c1.68,12.408-12.889,24.599-32.633,24.599s-34.313-12.191-32.633-24.599
c1.68-12.408,16.256-20.699,32.633-20.699S174.977,81.266,176.661,93.677z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 39.07 60.197" style="enable-background:new 0 0 39.07 60.197;" xml:space="preserve">
viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;}
.st2{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;stroke-dasharray:3.0018,3.0018;}
</style>
<path class="st0" d="M39.022,8.423c0.114,0.401,0.022,0.755-0.277,1.064l-6.363,6.092l-1.061,7.694
c-0.072,0.405-0.29,0.681-0.654,0.828c-0.364,0.147-0.713,0.099-1.045-0.143l-3.348-2.531l-7.891,7.554
c-0.105,0.089-0.218,0.159-0.34,0.207c-0.162,0.065-0.34,0.09-0.534,0.074c-0.308-0.064-0.56-0.221-0.755-0.472L0.157,1.617
c-0.22-0.429-0.209-0.81,0.033-1.142c0.113-0.187,0.271-0.321,0.473-0.402s0.409-0.094,0.62-0.038l36.96,7.68
C38.648,7.786,38.908,8.023,39.022,8.423L39.022,8.423z M7.294,3.397L30.75,14.332l0.067-0.097c0.044-0.065,0.079-0.126,0.103-0.183
l4.933-4.74L7.294,3.397z M3.952,2.98l25.516,18.148l0.823-5.835L3.952,2.98z M4.649,4.886l13.253,21.679l6.909-6.665
c0.146-0.106,0.332-0.228,0.558-0.366L4.649,4.886z"/>
<path class="st0" d="M59.2,10.2c0.1,0.5,0,0.9-0.3,1.3l-7.6,7.3L50,27.9c-0.1,0.5-0.3,0.8-0.8,1C48.8,29,48.4,29,48,28.7l-4-3
l-9.4,9c-0.1,0.1-0.3,0.2-0.4,0.2C34,35,33.8,35,33.6,35c-0.4-0.1-0.7-0.3-0.9-0.6L12.9,2.1c-0.3-0.5-0.2-1,0-1.4
c0.1-0.2,0.3-0.4,0.6-0.5s0.5-0.1,0.7,0l44,9.1C58.7,9.4,59.1,9.7,59.2,10.2L59.2,10.2z M21.4,4.2l27.9,13l0.1-0.1
c0.1-0.1,0.1-0.1,0.1-0.2l5.9-5.6L21.4,4.2z M17.5,3.7l30.4,21.6l1-6.9L17.5,3.7z M18.3,6l15.8,25.8l8.2-7.9
c0.2-0.1,0.4-0.3,0.7-0.4L18.3,6z"/>
<g>
<g>
<line class="st1" x1="19.535" y1="54.901" x2="19.535" y2="53.401"/>
<line class="st2" x1="19.535" y1="50.4" x2="19.535" y2="33.89"/>
<line class="st1" x1="19.535" y1="32.389" x2="19.535" y2="30.889"/>
<line class="st1" x1="36" y1="65.5" x2="36" y2="63.7"/>
<line class="st2" x1="36" y1="60.2" x2="36" y2="40.5"/>
<line class="st1" x1="36" y1="38.7" x2="36" y2="36.9"/>
<g>
<polygon class="st0" points="19.535,60.197 22.584,52.735 19.535,54.506 16.486,52.735 "/>
<polygon class="st0" points="36,71.8 39.6,62.9 36,65 32.4,62.9 "/>
</g>
</g>
</g>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 59.671 87.808" style="enable-background:new 0 0 59.671 87.808;" xml:space="preserve">
viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-miterlimit:10;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-miterlimit:10;stroke-dasharray:2.8321,2.8321;}
.st0{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;}
.st1{fill:none;stroke:#FFFFFF;stroke-miterlimit:10;stroke-dasharray:3.0018,3.0018;}
.st2{fill:#FFFFFF;}
.st3{fill:#FFFFFF;stroke:#FFFFFF;}
.st4{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-linecap:round;}
......@@ -13,69 +13,38 @@
</style>
<g>
<g>
<line class="st0" x1="29.835" y1="77.217" x2="29.835" y2="75.717"/>
<line class="st1" x1="29.835" y1="72.885" x2="29.835" y2="40.315"/>
<line class="st0" x1="29.835" y1="38.899" x2="29.835" y2="37.399"/>
<line class="st0" x1="36" y1="65.5" x2="36" y2="63.7"/>
<line class="st1" x1="36" y1="60.2" x2="36" y2="40.5"/>
<line class="st0" x1="36" y1="38.7" x2="36" y2="36.9"/>
<g>
<polygon class="st2" points="29.835,87.808 35.934,72.884 29.835,76.425 23.739,72.884 "/>
<polygon class="st2" points="36,71.8 39.6,62.9 36,65 32.4,62.9 "/>
</g>
</g>
</g>
<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="282.69484" inkscape:cy="221.0125" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1017" inkscape:window-maximized="1" inkscape:window-width="1920" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:zoom="2.8" pagecolor="#ffffff" showgrid="true" showguides="true">
<sodipodi:guide id="guide2985" orientation="1,0" position="250,420"></sodipodi:guide>
<inkscape:grid empspacing="10" enabled="true" id="grid2987" snapvisiblegridlinesonly="true" type="xygrid" visible="true">
</inkscape:grid>
<sodipodi:guide id="guide2989" orientation="0,1" position="270,250"></sodipodi:guide>
</sodipodi:namedview>
<g>
<defs>
<inkscape:path-effect copytype="repeated" effect="skeletal" fuse_tolerance="0" id="path-effect4881" is_visible="true" normal_offset="0" pattern="M 0,0 1,0" prop_scale="1" prop_units="false" scale_y_rel="false" spacing="0" tang_offset="0" vertical_pattern="false">
</inkscape:path-effect>
<inkscape:path-effect bendpath="m 110,180 140,0" effect="bend_path" id="path-effect3765" is_visible="true" prop_scale="1" scale_y_rel="false" vertical="false">
</inkscape:path-effect>
</defs>
<g>
<g>
<path id="path2991_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st3" d="
M18.734,7.918c-0.169,0.83-1.147,1.355-2.178,1.136c-1.031-0.218-1.679-1.087-1.455-1.906c0.225-0.819,1.193-1.288,2.168-1.081
C18.245,6.273,18.903,7.087,18.734,7.918z"/>
<path id="path3761_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st4" d="
M17.012,12.188c-3.308-0.136-5.924-2.602-5.69-5.147c0.234-2.545,2.84-4.234,5.668-4.091s5.181,2.08,5.427,4.618
c0.059,0.614-0.023,1.229-0.256,1.807"/>
<path id="path2991-6_3_" inkscape:transform-center-x="-140.5" inkscape:transform-center-y="-140.5" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st3" d="
M43.115,9.054c-1.031,0.218-2.009-0.306-2.178-1.136c-0.169-0.83,0.489-1.644,1.464-1.851c0.976-0.207,1.944,0.263,2.168,1.081
C44.794,7.967,44.146,8.835,43.115,9.054z"/>
<path id="path3761-1_3_" inkscape:transform-center-x="-140.5" inkscape:transform-center-y="-140.50478" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st4" d="
M37.498,9.343c-0.942-2.394,0.618-4.969,3.233-5.979c2.615-1.011,5.647-0.216,7.03,1.977c1.384,2.192,0.25,5.149-2.807,6.362
c-0.74,0.293-1.54,0.46-2.34,0.488"/>
<path id="path2991-9_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st3" d="
M45.245,29.041c-0.169-0.83,0.806-1.701,2.171-1.99s2.647,0.103,2.872,0.921s-0.737,1.765-2.158,2.066
C46.71,30.34,45.415,29.872,45.245,29.041z"/>
<path id="path3761-2_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st4" d="
M45.334,24.432c3.764-1.233,7.892-0.762,9.499,1.362c1.607,2.124-0.252,5.327-4.451,6.802c-4.199,1.475-8.784,0.445-9.957-1.921
c-0.284-0.572-0.359-1.188-0.237-1.809"/>
<path id="path2991-6-9_3_" inkscape:transform-center-x="140.5" inkscape:transform-center-y="140.50002" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st3" d="
M12.254,27.051c1.365,0.289,2.341,1.159,2.171,1.99c-0.169,0.83-1.465,1.298-2.885,0.997c-1.42-0.301-2.382-1.247-2.158-2.066
C9.608,27.154,10.889,26.762,12.254,27.051z"/>
<path id="path3761-1-5_3_" inkscape:transform-center-x="140.5" inkscape:transform-center-y="140.50476" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st4" d="
M19.49,28.9c0.476,2.566-2.624,4.715-7.081,4.356c-4.457-0.359-8.169-3.149-8.159-5.762c0.01-2.613,3.343-4.056,7.313-3.651
c0.96,0.098,1.916,0.303,2.825,0.604"/>
<path id="path2991_3_" class="st3" d="M24.094,8.095c-0.183,0.891-1.233,1.453-2.338,1.218c-1.106-0.236-1.8-1.169-1.557-2.048
c0.243-0.879,1.282-1.381,2.328-1.159C23.572,6.33,24.277,7.204,24.094,8.095z"/>
<path id="path3761_3_" class="st4" d="M22.241,12.679c-3.549-0.149-6.353-2.801-6.097-5.533C16.4,4.414,19.2,2.605,22.231,2.761
s5.552,2.237,5.813,4.962c0.063,0.659-0.026,1.319-0.277,1.939"/>
<path id="path2991-6_3_" class="st3" d="M50.244,9.313c-1.106,0.236-2.156-0.326-2.338-1.218
c-0.183-0.891,0.522-1.766,1.568-1.989c1.046-0.223,2.085,0.28,2.328,1.159C52.044,8.144,51.35,9.078,50.244,9.313z"/>
<path id="path3761-1_3_" class="st4" d="M44.219,9.628c-1.012-2.57,0.658-5.335,3.46-6.422c2.801-1.087,6.054-0.237,7.543,2.115
c1.489,2.352,0.28,5.528-2.999,6.834c-0.793,0.316-1.652,0.496-2.51,0.526"/>
<path id="path2991-9_3_" class="st3" d="M52.556,30.77c-0.183-0.891,0.864-1.827,2.331-2.139
c1.466-0.312,2.844,0.107,3.086,0.985c0.243,0.879-0.79,1.896-2.316,2.221S52.739,31.662,52.556,30.77z"/>
<path id="path3761-2_3_" class="st4" d="M52.646,25.821c4.042-1.329,8.476-0.83,10.206,1.447c1.73,2.277-0.263,5.721-4.774,7.312
c-4.511,1.591-9.44,0.489-10.701-2.051c-0.305-0.614-0.387-1.275-0.256-1.942"/>
<path id="path2991-6-9_3_" class="st3" d="M17.113,28.631c1.466,0.312,2.513,1.248,2.331,2.139
c-0.183,0.891-1.575,1.392-3.101,1.067c-1.526-0.325-2.558-1.343-2.316-2.221C14.269,28.738,15.647,28.319,17.113,28.631z"/>
<path id="path3761-1-5_3_" class="st4" d="M24.885,30.624c0.51,2.756-2.823,5.061-7.612,4.67c-4.789-0.391-8.776-3.394-8.76-6.2
c0.015-2.806,3.598-4.348,7.862-3.907c1.032,0.107,2.058,0.327,3.034,0.653"/>
</g>
<path class="st5" d="M11.897,28.545C23.883,24.596,34.911,17.522,42.758,7.56"/>
<path class="st5" d="M47.777,28.545C35.791,24.596,24.763,17.522,16.915,7.56"/>
<path class="st6" d="M38.681,19.141c0.453,3.364-3.496,6.665-8.845,6.665s-9.299-3.302-8.845-6.665
c0.453-3.364,4.404-5.613,8.845-5.613C34.276,13.527,38.228,15.777,38.681,19.141z"/>
<path class="st5" d="M16.727,30.234c12.96-5.401,24.266-11.232,33.132-22.524"/>
<path class="st5" d="M55.276,30.234C42.316,24.833,31.01,19.002,22.143,7.71"/>
<path class="st6" d="M45.497,20.147c0.489,3.611-3.751,7.159-9.497,7.159s-9.986-3.548-9.497-7.159
c0.489-3.611,4.731-6.024,9.497-6.024S45.007,16.535,45.497,20.147z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 288 144.29" style="enable-background:new 0 0 288 144.29;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.5;}
.st1{fill:#FFFFFF;}
.st2{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-miterlimit:10;}
.st3{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-miterlimit:10;stroke-dasharray:3.0529,3.0529;}
.st4{fill:#FFFFFF;stroke:#FFFFFF;}
.st5{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-linecap:round;}
.st6{fill:none;stroke:#FFFFFF;stroke-width:3;}
.st7{fill:#FFFFFF;stroke:#FFFFFF;stroke-width:3;}
</style>
<g>
<g class="st0">
<title>Layer 1</title>
<g id="layer1_1_">
<g id="g4623_1_">
<path id="rect2192_1_" class="st1" d="M57.675,110.412h9.17v19.439c-2.699,1.274-5.921,1.649-9.17,0V110.412z"/>
<path id="path1307_1_" class="st1" d="M94.904,112.711c-20.813-4.223-43.151,4.622-65.289,0
c15.091-13.843,19.439-41.726,32.631-56.543C72.941,70.585,79.588,98.868,94.904,112.711z"/>
<path id="path2183_1_" class="st1" d="M88.358,76.431c-16.641-3.373-34.506,3.699-52.196,0
c12.068-11.069,15.541-33.356,26.085-45.2C70.792,42.751,76.114,65.362,88.358,76.431z"/>
<path id="path2185_1_" class="st1" d="M82.386,47.572c-12.818-2.599-26.61,2.849-40.253,0
c9.32-8.545,11.993-25.736,20.139-34.855C68.844,21.611,72.941,39.052,82.386,47.572z"/>
</g>
</g>
</g>
<g>
<title>Layer 1</title>
<g id="layer1">
<g id="g4623">
<path id="rect2192" class="st1" d="M35.528,116.618h10.617v22.506c-3.124,1.476-6.856,1.909-10.617,0V116.618z"/>
<path id="path1307" class="st1" d="M78.63,119.28c-24.097-4.889-49.958,5.351-75.588,0c17.473-16.027,22.506-48.31,37.78-65.464
C53.203,70.507,60.897,103.253,78.63,119.28z"/>
<path id="path2183" class="st1" d="M71.051,77.277c-19.266-3.905-39.949,4.282-60.43,0
c13.973-12.815,17.994-38.619,30.201-52.331C50.715,38.281,56.876,64.462,71.051,77.277z"/>
<path id="path2185" class="st1" d="M64.138,43.864c-14.84-3.008-30.809,3.298-46.602,0c10.79-9.894,13.886-29.796,23.315-40.355
C48.458,13.809,53.203,34,64.138,43.864z"/>
</g>
</g>
</g>
</g>
<g>
<line class="st2" x1="119.918" y1="77.051" x2="121.418" y2="77.051"/>
<line class="st3" x1="124.471" y1="76.933" x2="189.263" y2="76.933"/>
<g>
<polygon class="st1" points="98.737,77.051 128.584,89.248 121.502,77.051 128.584,64.858 "/>
</g>
</g>
<g>
<g>
<g>
<path id="path2991_3_" class="st4" d="M209.253,58.856c-0.317,1.544-2.136,2.517-4.051,2.11
c-1.916-0.409-3.119-2.025-2.698-3.548c0.421-1.523,2.221-2.393,4.034-2.008C208.348,55.797,209.57,57.312,209.253,58.856z"/>
<path id="path3761_3_" class="st5" d="M206.042,66.798c-6.149-0.258-11.007-4.853-10.564-9.587
c0.444-4.734,5.295-7.868,10.546-7.598c5.252,0.27,9.619,3.876,10.072,8.597c0.109,1.142-0.045,2.285-0.48,3.36"/>
<path id="path2991-6_3_" class="st4" d="M254.561,60.966c-1.916,0.409-3.736-0.565-4.051-2.11
c-0.317-1.544,0.904-3.06,2.717-3.446c1.812-0.386,3.613,0.485,4.034,2.008C257.679,58.94,256.477,60.559,254.561,60.966z"/>
<path id="path3761-1_3_" class="st5" d="M244.122,61.512c-1.753-4.453,1.14-9.244,5.995-11.127
c4.853-1.883,10.489-0.411,13.069,3.664s0.485,9.578-5.196,11.841c-1.374,0.548-2.862,0.859-4.349,0.911"/>
<path id="path2991-9_3_" class="st4" d="M258.566,98.143c-0.317-1.544,1.497-3.165,4.039-3.706
c2.54-0.541,4.928,0.185,5.347,1.707c0.421,1.523-1.369,3.285-4.013,3.848C261.295,100.554,258.883,99.688,258.566,98.143z"/>
<path id="path3761-2_3_" class="st5" d="M258.722,89.568c7.003-2.303,14.686-1.438,17.683,2.507
c2.997,3.945-0.456,9.912-8.271,12.669s-16.356,0.847-18.541-3.554c-0.528-1.064-0.671-2.209-0.444-3.365"/>
<path id="path2991-6-9_3_" class="st4" d="M197.157,94.437c2.54,0.541,4.354,2.162,4.039,3.706
c-0.317,1.544-2.729,2.412-5.373,1.849c-2.644-0.563-4.432-2.327-4.013-3.848C192.23,94.622,194.617,93.896,197.157,94.437z"/>
<path id="path3761-1-5_3_" class="st5" d="M210.623,97.89c0.884,4.775-4.891,8.769-13.189,8.091s-15.205-5.881-15.178-10.742
c0.026-4.862,6.234-7.533,13.622-6.769c1.788,0.185,3.566,0.567,5.257,1.131"/>
</g>
<path class="st6" d="M196.489,97.214c22.455-9.358,42.044-19.461,57.405-39.025"/>
<path class="st6" d="M263.279,97.214c-22.455-9.358-42.044-19.461-57.407-39.025"/>
<path class="st7" d="M246.336,79.737c0.847,6.256-6.499,12.404-16.455,12.404s-17.302-6.147-16.455-12.404
c0.847-6.256,8.197-10.437,16.455-10.437S245.487,73.479,246.336,79.737z"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 288 144.29" style="enable-background:new 0 0 288 144.29;" xml:space="preserve">
<style type="text/css">
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 288 144.29" style="enable-background:new 0 0 288 144.29;" xml:space="preserve">
<style type="text/css">
......@@ -76,54 +76,30 @@
</g>
</g>
<g>
<defs>
<inkscape:path-effect copytype="repeated" effect="skeletal" fuse_tolerance="0" id="path-effect4881" is_visible="true" normal_offset="0" pattern="M 0,0 1,0" prop_scale="1" prop_units="false" scale_y_rel="false" spacing="0" tang_offset="0" vertical_pattern="false">
</inkscape:path-effect>
<inkscape:path-effect bendpath="m 110,180 140,0" effect="bend_path" id="path-effect3765" is_visible="true" prop_scale="1" scale_y_rel="false" vertical="false">
</inkscape:path-effect>
</defs>
<g>
<g>
<path id="path2991_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st7" d="
M238.687,69.157c-0.209,1.011-1.4,1.647-2.652,1.378c-1.252-0.269-2.036-1.329-1.758-2.326c0.278-0.996,1.456-1.565,2.64-1.31
C238.1,67.153,238.896,68.146,238.687,69.157z"/>
<path id="path3761_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st8" d="
M236.576,74.353c-4.023-0.176-7.193-3.191-6.892-6.289c0.301-3.098,3.479-5.143,6.909-4.961s6.277,2.544,6.568,5.636
c0.07,0.748-0.031,1.497-0.316,2.2"/>
<path id="path2991-6_3_" inkscape:transform-center-x="-140.5" inkscape:transform-center-y="-140.5" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st7" d="
M268.303,70.535c-1.252,0.269-2.443-0.367-2.652-1.378c-0.209-1.011,0.587-2.004,1.77-2.258c1.184-0.254,2.362,0.314,2.64,1.31
C270.338,69.205,269.555,70.266,268.303,70.535z"/>
<path id="path3761-1_3_" inkscape:transform-center-x="-140.5" inkscape:transform-center-y="-140.50478" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st8" d="
M261.478,70.9c-1.151-2.914,0.736-6.052,3.903-7.288c3.167-1.237,6.851-0.28,8.547,2.384c1.696,2.664,0.337,6.271-3.376,7.758
c-0.898,0.36-1.871,0.566-2.844,0.602"/>
<path id="path2991-9_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st7" d="
M270.972,94.871c-0.209-1.011,0.979-2.074,2.643-2.432c1.664-0.358,3.23,0.114,3.508,1.11s-0.893,2.154-2.626,2.526
C272.764,96.448,271.181,95.882,270.972,94.871z"/>
<path id="path3761-2_3_" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st8" d="
M271.065,89.257c4.586-1.516,9.622-0.965,11.594,1.613c1.971,2.578-0.283,6.493-5.405,8.31
c-5.123,1.817-10.726,0.574-12.161-2.305c-0.347-0.697-0.441-1.446-0.293-2.203"/>
<path id="path2991-6-9_3_" inkscape:transform-center-x="140.5" inkscape:transform-center-y="140.50002" sodipodi:cx="110" sodipodi:cy="110" sodipodi:rx="20" sodipodi:ry="20" sodipodi:type="arc" class="st7" d="
M230.723,92.439c1.664,0.358,2.852,1.421,2.643,2.432c-0.209,1.011-1.792,1.576-3.525,1.204c-1.733-0.372-2.903-1.53-2.626-2.526
S229.058,92.082,230.723,92.439z"/>
<path id="path3761-1-5_3_" inkscape:transform-center-x="140.5" inkscape:transform-center-y="140.50476" sodipodi:cx="110" sodipodi:cy="110" sodipodi:end="6.4866523" sodipodi:open="true" sodipodi:rx="50" sodipodi:ry="50" sodipodi:start="1.374765" sodipodi:type="arc" class="st8" d="
M239.546,94.715c0.575,3.127-3.213,5.738-8.655,5.284s-9.964-3.876-9.939-7.059c0.025-3.183,4.098-4.92,8.939-4.409
c1.171,0.124,2.336,0.376,3.443,0.747"/>
<path id="path2991_3_" class="st7" d="M238.126,78.582c-0.222,1.081-1.496,1.763-2.838,1.478
c-1.342-0.286-2.185-1.419-1.89-2.486s1.556-1.676,2.825-1.407C237.492,76.44,238.348,77.5,238.126,78.582z"/>
<path id="path3761_3_" class="st8" d="M235.877,84.145c-4.307-0.181-7.71-3.4-7.4-6.715c0.311-3.316,3.709-5.511,7.388-5.322
c3.679,0.189,6.738,2.715,7.055,6.022c0.076,0.8-0.032,1.601-0.336,2.353"/>
<path id="path2991-6_3_" class="st7" d="M269.863,80.06c-1.342,0.286-2.617-0.396-2.838-1.478
c-0.222-1.081,0.634-2.143,1.903-2.414c1.27-0.271,2.531,0.34,2.825,1.407C272.048,78.641,271.206,79.775,269.863,80.06z"/>
<path id="path3761-1_3_" class="st8" d="M262.551,80.442c-1.228-3.119,0.799-6.475,4.199-7.794
c3.4-1.319,7.348-0.288,9.155,2.567c1.807,2.855,0.34,6.709-3.64,8.294c-0.962,0.384-2.005,0.602-3.046,0.638"/>
<path id="path2991-9_3_" class="st7" d="M272.669,106.102c-0.222-1.081,1.049-2.217,2.829-2.596
c1.779-0.379,3.452,0.13,3.745,1.195c0.295,1.067-0.959,2.301-2.811,2.696S272.892,107.185,272.669,106.102z"/>
<path id="path3761-2_3_" class="st8" d="M272.779,100.095c4.906-1.613,10.287-1.007,12.387,1.756
c2.1,2.764-0.319,6.943-5.794,8.874s-11.457,0.593-12.988-2.489c-0.37-0.745-0.47-1.547-0.311-2.357"/>
<path id="path2991-6-9_3_" class="st7" d="M229.653,103.506c1.779,0.379,3.05,1.515,2.829,2.596
c-0.222,1.081-1.912,1.689-3.764,1.295c-1.852-0.394-3.105-1.63-2.811-2.696C226.201,103.636,227.874,103.127,229.653,103.506z"
/>
<path id="path3761-1-5_3_" class="st8" d="M239.086,105.925c0.619,3.345-3.426,6.142-9.239,5.668s-10.651-4.119-10.632-7.525
c0.018-3.406,4.367-5.277,9.542-4.742c1.253,0.13,2.498,0.397,3.682,0.793"/>
</g>
<path class="st9" d="M230.281,94.257c15.501-6.427,26.238-13.176,37.581-25.54"/>
<path class="st9" d="M274.06,94.257c-15.501-6.427-26.238-13.175-37.581-25.54"/>
<path class="st10" d="M262.941,82.831c0.56,4.096-4.25,8.127-10.773,8.127s-11.332-4.031-10.773-8.127
c0.56-4.096,5.372-6.828,10.773-6.828C257.57,76.003,262.382,78.735,262.941,82.831z"/>
<path class="st9" d="M229.185,105.451c15.729-6.555,29.451-13.632,40.212-27.337"/>
<path class="st9" d="M275.971,105.451c-15.729-6.555-29.451-13.632-40.213-27.337"/>
<path class="st10" d="M264.102,93.209c0.594,4.383-4.552,8.689-11.526,8.689s-12.12-4.306-11.526-8.689
c0.593-4.383,5.742-7.311,11.526-7.311C258.36,85.898,263.507,88.825,264.102,93.209z"/>
</g>
</g>
</svg>
......@@ -27,7 +27,7 @@ QString SafetyComponent::name(void) const
QString SafetyComponent::description(void) const
{
return tr("Safety Setup is used to setup triggers for Return to Land as well as the settings for Return to Land itself.");
return QString();
}
QString SafetyComponent::iconResource(void) const
......
......@@ -128,6 +128,7 @@ add_subdirectory(FollowMe)
add_subdirectory(GPS)
add_subdirectory(Joystick)
add_subdirectory(MissionManager)
add_subdirectory(PlanView)
add_subdirectory(PositionManager)
add_subdirectory(QmlControls)
add_subdirectory(QtLocationPlugin)
......
add_subdirectory(FactControls)
set(EXTRA_SRC)
if(BUILD_TESTING)
list(APPEND EXTRA_SRC
......@@ -11,7 +13,6 @@ endif()
add_library(FactSystem
Fact.cc
FactControls/FactPanelController.cc
FactGroup.cc
FactMetaData.cc
FactSystem.cc
......@@ -25,6 +26,7 @@ add_library(FactSystem
target_link_libraries(FactSystem
PRIVATE
qgc
FactControls
)
target_include_directories(FactSystem
......
......@@ -51,7 +51,7 @@ public:
Q_PROPERTY(QStringList enumStrings READ enumStrings NOTIFY enumsChanged)
Q_PROPERTY(QString enumStringValue READ enumStringValue WRITE setEnumStringValue NOTIFY valueChanged)
Q_PROPERTY(QVariantList enumValues READ enumValues NOTIFY enumsChanged)
Q_PROPERTY(QString category READ category CONSTANT)
Q_PROPERTY(QString category READ category CONSTANT)
Q_PROPERTY(QString group READ group CONSTANT)
Q_PROPERTY(QString longDescription READ longDescription CONSTANT)
Q_PROPERTY(QVariant max READ cookedMax CONSTANT)
......
add_library(FactControls
FactPanelController.cc
)
add_custom_target(FactControlsQml
SOURCES
AltitudeFactTextField.qml
FactCheckBox.qml
FactLabel.qml
FactTextField.qml
FactTextFieldSlider.qml
FactBitmask.qml
FactComboBox.qml
FactTextFieldGrid.qml
FactTextFieldRow.qml
FactValueSlider.qml
)
target_link_libraries(FactControls qgc)
\ No newline at end of file
......@@ -23,50 +23,56 @@ APMCopterMode::APMCopterMode(uint32_t mode, bool settable) :
APMCustomMode(mode, settable)
{
setEnumToStringMapping({
{STABILIZE, "Stabilize"},
{ACRO, "Acro"},
{ALT_HOLD, "Altitude Hold"},
{AUTO, "Auto"},
{GUIDED, "Guided"},
{LOITER, "Loiter"},
{RTL, "RTL"},
{CIRCLE, "Circle"},
{LAND, "Land"},
{DRIFT, "Drift"},
{SPORT, "Sport"},
{FLIP, "Flip"},
{AUTOTUNE, "Autotune"},
{POS_HOLD, "Position Hold"},
{BRAKE, "Brake"},
{THROW, "Throw"},
{AVOID_ADSB, "Avoid ADSB"},
{GUIDED_NOGPS, "Guided No GPS"},
{SAFE_RTL, "Smart RTL"},
{ STABILIZE, "Stabilize"},
{ ACRO, "Acro"},
{ ALT_HOLD, "Altitude Hold"},
{ AUTO, "Auto"},
{ GUIDED, "Guided"},
{ LOITER, "Loiter"},
{ RTL, "RTL"},
{ CIRCLE, "Circle"},
{ LAND, "Land"},
{ DRIFT, "Drift"},
{ SPORT, "Sport"},
{ FLIP, "Flip"},
{ AUTOTUNE, "Autotune"},
{ POS_HOLD, "Position Hold"},
{ BRAKE, "Brake"},
{ THROW, "Throw"},
{ AVOID_ADSB, "Avoid ADSB"},
{ GUIDED_NOGPS, "Guided No GPS"},
{ SMART_RTL, "Smart RTL"},
{ FLOWHOLD, "Flow Hold" },
{ FOLLOW, "Follow Vehicle" },
{ ZIGZAG, "ZigZag" },
});
}
ArduCopterFirmwarePlugin::ArduCopterFirmwarePlugin(void)
{
setSupportedModes({
APMCopterMode(APMCopterMode::STABILIZE ,true),
APMCopterMode(APMCopterMode::ACRO ,true),
APMCopterMode(APMCopterMode::ALT_HOLD ,true),
APMCopterMode(APMCopterMode::AUTO ,true),
APMCopterMode(APMCopterMode::GUIDED ,true),
APMCopterMode(APMCopterMode::LOITER ,true),
APMCopterMode(APMCopterMode::RTL ,true),
APMCopterMode(APMCopterMode::CIRCLE ,true),
APMCopterMode(APMCopterMode::LAND ,true),
APMCopterMode(APMCopterMode::DRIFT ,true),
APMCopterMode(APMCopterMode::SPORT ,true),
APMCopterMode(APMCopterMode::FLIP ,true),
APMCopterMode(APMCopterMode::AUTOTUNE ,true),
APMCopterMode(APMCopterMode::POS_HOLD ,true),
APMCopterMode(APMCopterMode::BRAKE ,true),
APMCopterMode(APMCopterMode::THROW ,true),
APMCopterMode(APMCopterMode::AVOID_ADSB,true),
APMCopterMode(APMCopterMode::GUIDED_NOGPS,true),
APMCopterMode(APMCopterMode::SAFE_RTL,true),
APMCopterMode(APMCopterMode::STABILIZE, true),
APMCopterMode(APMCopterMode::ACRO, true),
APMCopterMode(APMCopterMode::ALT_HOLD, true),
APMCopterMode(APMCopterMode::AUTO, true),
APMCopterMode(APMCopterMode::GUIDED, true),
APMCopterMode(APMCopterMode::LOITER, true),
APMCopterMode(APMCopterMode::RTL, true),
APMCopterMode(APMCopterMode::CIRCLE, true),
APMCopterMode(APMCopterMode::LAND, true),
APMCopterMode(APMCopterMode::DRIFT, true),
APMCopterMode(APMCopterMode::SPORT, true),
APMCopterMode(APMCopterMode::FLIP, true),
APMCopterMode(APMCopterMode::AUTOTUNE, true),
APMCopterMode(APMCopterMode::POS_HOLD, true),
APMCopterMode(APMCopterMode::BRAKE, true),
APMCopterMode(APMCopterMode::THROW, true),
APMCopterMode(APMCopterMode::AVOID_ADSB, true),
APMCopterMode(APMCopterMode::GUIDED_NOGPS, true),
APMCopterMode(APMCopterMode::SMART_RTL, true),
APMCopterMode(APMCopterMode::FLOWHOLD, true),
APMCopterMode(APMCopterMode::FOLLOW, true),
APMCopterMode(APMCopterMode::ZIGZAG, true),
});
if (!_remapParamNameIntialized) {
......
......@@ -41,9 +41,11 @@ public:
THROW = 18,
AVOID_ADSB = 19,
GUIDED_NOGPS= 20,
SAFE_RTL = 21, //Safe Return to Launch
SMART_RTL = 21, // SMART_RTL returns to home by retracing its steps
FLOWHOLD = 22, // FLOWHOLD holds position with optical flow without rangefinder
FOLLOW = 23, // follow attempts to follow another vehicle or ground station
ZIGZAG = 24, // ZIGZAG mode is able to fly in a zigzag manner with predefined point A and point B
};
static const int modeCount = 22;
APMCopterMode(uint32_t mode, bool settable);
};
......
......@@ -42,7 +42,6 @@ public:
QLOITER = 19,
QLAND = 20,
QRTL = 21,
modeCount
};
APMPlaneMode(uint32_t mode, bool settable);
......
......@@ -33,7 +33,6 @@ public:
GUIDED = 15,
INITIALIZING = 16,
};
static const int modeCount = 17;
APMRoverMode(uint32_t mode, bool settable);
};
......
......@@ -96,7 +96,6 @@ public:
RESERVED_18 = 18,
MANUAL = 19
};
static const int modeCount = 20;
APMSubMode(uint32_t mode, bool settable);
};
......
add_custom_target(APMFirmwarePluginQml
SOURCES
APMSensorParams.qml
)
add_subdirectory(APM)
add_library(FirmwarePlugin
CameraMetaData.cc
......
......@@ -360,7 +360,7 @@ void PX4FirmwarePlugin::_mavCommandResult(int vehicleId, int component, int comm
Q_UNUSED(component);
Q_UNUSED(noReponseFromVehicle);
Vehicle* vehicle = dynamic_cast<Vehicle*>(sender());
auto* vehicle = qobject_cast<Vehicle*>(sender());
if (!vehicle) {
qWarning() << "Dynamic cast failed!";
return;
......@@ -520,7 +520,7 @@ void PX4FirmwarePlugin::_handleAutopilotVersion(Vehicle* vehicle, mavlink_messag
{
Q_UNUSED(vehicle);
PX4FirmwarePluginInstanceData* instanceData = qobject_cast<PX4FirmwarePluginInstanceData*>(vehicle->firmwarePluginInstanceData());
auto* instanceData = qobject_cast<PX4FirmwarePluginInstanceData*>(vehicle->firmwarePluginInstanceData());
if (!instanceData->versionNotified) {
bool notifyUser = false;
int supportedMajorVersion = 1;
......
......@@ -478,7 +478,7 @@ Set to 2 to use heading from motion capture</short_desc>
</parameter>
<parameter default="56" name="TRIG_PINS" type="INT32">
<short_desc>Camera trigger pin</short_desc>
<long_desc>Selects which pin is used, ranges from 1 to 6 (AUX1-AUX6 on px4_fmu-v2 and the rail pins on px4_fmu-v4). The PWM interface takes two pins per camera, while relay triggers on every pin individually. Example: Value 56 would trigger on pins 5 and 6. For GPIO mode Pin 6 will be triggered followed by 5. With a value of 65 pin 5 will be triggered followed by 6. Pins may be non contiguous. I.E. 16 or 61. In GPIO mode the delay pin to pin is &lt; .2 uS.</long_desc>
<long_desc>Selects which FMU pin is used (range: AUX1-AUX6 on Pixhawk controllers with an I/O board, MAIN1-MAIN6 on controllers without an I/O board. The PWM interface takes two pins per camera, while relay triggers on every pin individually. Example: Value 56 would trigger on pins 5 and 6. For GPIO mode Pin 6 will be triggered followed by 5. With a value of 65 pin 5 will be triggered followed by 6. Pins may be non contiguous. I.E. 16 or 61. In GPIO mode the delay pin to pin is &lt; .2 uS.</long_desc>
<min>1</min>
<max>123456</max>
<decimal>0</decimal>
......@@ -714,9 +714,13 @@ Set -1 to disable the check</short_desc>
</parameter>
<parameter default="2.0" name="COM_DISARM_LAND" type="FLOAT">
<short_desc>Time-out for auto disarm after landing</short_desc>
<long_desc>A non-zero, positive value specifies the time-out period in seconds after which the vehicle will be automatically disarmed in case a landing situation has been detected during this period. The vehicle will also auto-disarm right after arming if it has not even flown, however the time will always be 10 seconds such that the pilot has enough time to take off. A negative value means that automatic disarming triggered by landing detection is disabled.</long_desc>
<min>-1</min>
<max>20</max>
<long_desc>A non-zero, positive value specifies the time-out period in seconds after which the vehicle will be automatically disarmed in case a landing situation has been detected during this period. A zero or negative value means that automatic disarming triggered by landing detection is disabled.</long_desc>
<unit>s</unit>
<decimal>2</decimal>
</parameter>
<parameter default="10.0" name="COM_DISARM_PRFLT" type="FLOAT">
<short_desc>Time-out for auto disarm if too slow to takeoff</short_desc>
<long_desc>A non-zero, positive value specifies the time after arming, in seconds, within which the vehicle must take off (after which it will automatically disarm). A zero or negative value means that automatic disarming triggered by a pre-takeoff timeout is disabled.</long_desc>
<unit>s</unit>
<decimal>2</decimal>
</parameter>
......
......@@ -8,4 +8,25 @@ target_link_libraries(FlightDisplay
qgc
)
add_custom_target(FligthDisplayQml
SOURCES
FlightDisplayView.qml
FlightDisplayViewDummy.qml
FlightDisplayViewMap.qml
FlightDisplayViewUVC.qml
FlightDisplayViewVideo.qml
FlightDisplayViewWidgets.qml
GuidedActionConfirm.qml
GuidedActionList.qml
GuidedActionsController.qml
GuidedAltitudeSlider.qml
MultiVehicleList.qml
PreFlightBatteryCheck.qml
PreFlightGPSCheck.qml
PreFlightRCCheck.qml
PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck.qml
VirtualJoystick.qml
)
target_include_directories(FlightDisplay PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -296,7 +296,7 @@ FlightMap {
sourceItem: MissionItemIndexLabel {
checked: true
index: -1
label: qsTr("Goto here", "Goto here waypoint")
label: qsTr("Go here", "Go to location waypoint")
}
property bool inGotoFlightMode: activeVehicle ? activeVehicle.flightMode === activeVehicle.gotoFlightMode : false
......
......@@ -49,7 +49,7 @@ Item {
readonly property string orbitTitle: qsTr("Orbit")
readonly property string landAbortTitle: qsTr("Land Abort")
readonly property string setWaypointTitle: qsTr("Set Waypoint")
readonly property string gotoTitle: qsTr("Goto Location")
readonly property string gotoTitle: qsTr("Go To Location")
readonly property string vtolTransitionTitle: qsTr("VTOL Transition")
readonly property string armMessage: qsTr("Arm the vehicle.")
......
......@@ -271,6 +271,20 @@ VideoManager::uvcEnabled()
}
#endif
//-----------------------------------------------------------------------------
void
VideoManager::setfullScreen(bool f)
{
if(f) {
//-- No can do if no vehicle or connection lost
if(!_activeVehicle || _activeVehicle->connectionLost()) {
f = false;
}
}
_fullScreen = f;
emit fullScreenChanged();
}
//-----------------------------------------------------------------------------
void
VideoManager::_updateSettings()
......@@ -357,6 +371,7 @@ void
VideoManager::_setActiveVehicle(Vehicle* vehicle)
{
if(_activeVehicle) {
disconnect(_activeVehicle, &Vehicle::connectionLostChanged, this, &VideoManager::_connectionLostChanged);
if(_activeVehicle->dynamicCameras()) {
QGCCameraControl* pCamera = _activeVehicle->dynamicCameras()->currentCameraInstance();
if(pCamera) {
......@@ -367,6 +382,7 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle)
}
_activeVehicle = vehicle;
if(_activeVehicle) {
connect(_activeVehicle, &Vehicle::connectionLostChanged, this, &VideoManager::_connectionLostChanged);
if(_activeVehicle->dynamicCameras()) {
connect(_activeVehicle->dynamicCameras(), &QGCCameraManager::streamChanged, this, &VideoManager::restartVideo);
QGCCameraControl* pCamera = _activeVehicle->dynamicCameras()->currentCameraInstance();
......@@ -374,11 +390,24 @@ VideoManager::_setActiveVehicle(Vehicle* vehicle)
pCamera->resumeStream();
}
}
} else {
//-- Disable full screen video if vehicle is gone
setfullScreen(false);
}
emit autoStreamConfiguredChanged();
restartVideo();
}
//----------------------------------------------------------------------------------------
void
VideoManager::_connectionLostChanged(bool connectionLost)
{
if(connectionLost) {
//-- Disable full screen video if connection is lost
setfullScreen(false);
}
}
//----------------------------------------------------------------------------------------
void
VideoManager::_aspectRatioChanged()
......
......@@ -73,7 +73,7 @@ public:
virtual bool uvcEnabled ();
#endif
virtual void setfullScreen (bool f) { _fullScreen = f; emit fullScreenChanged(); }
virtual void setfullScreen (bool f);
virtual void setIsTaisync (bool t) { _isTaisync = t; emit isTaisyncChanged(); }
// Override from QGCTool
......@@ -100,6 +100,7 @@ protected slots:
void _updateUVC ();
void _setActiveVehicle (Vehicle* vehicle);
void _aspectRatioChanged ();
void _connectionLostChanged (bool connectionLost);
protected:
void _updateSettings ();
......
add_subdirectory(MapItems)
add_subdirectory(Widgets)
add_library(FlightMap
Widgets/ValuesWidgetController.cc
)
......@@ -15,3 +18,8 @@ target_include_directories(FlightMap
Widgets
)
add_custom_target(FligthMapQml
QGCVideoBackground.qml
FlightMap.qml
MapScale.qml
)
add_custom_target(FligthMapItemsQml
SOURCES
PolygonEditor.qml
MissionItemIndicator.qml
MissionItemView.qml
VehicleMapItem.qml
MissionItemIndicatorDrag.qml
CustomMapItems.qml
PlanMapItems.qml
MissionLineView.qml
CameraTriggerIndicator.qml
)
\ No newline at end of file
add_custom_target(FligthMapWidgetsQml
SOURCES
CenterMapDropButton.qml
HealthPageWidget.qml
CameraPageWidget.qml
QGCAttitudeWidget.qml
QGCArtificialHorizon.qml
QGCPitchIndicator.qml
InstrumentSwipeView.qml
QGCInstrumentWidget.qml
QGCAttitudeHUD.qml
QGCMapToolButton.qml
QGCWaypointEditor.qml
QGCInstrumentWidgetAlternate.qml
ValuePageWidget.qml
CenterMapDropPanel.qml
VideoPageWidget.qml
MapFitFunctions.qml
VibrationPageWidget.qml
CompassRing.qml
QGCCompassWidget.qml
)
\ No newline at end of file
......@@ -64,6 +64,13 @@ add_library(MissionManager
${EXTRA_SRC}
)
add_custom_Target(MisionManagerQml
SOURCES
QGCMapCircleVisuals.qml
QGCMapPolygonVisuals.qml
QGCMapPolylineVisuals.qml
)
target_link_libraries(MissionManager
PUBLIC
Qt5::Xml
......
add_custom_target(PlanViewQml
SOURCES
RallyPointMapVisuals.qml
CorridorScanEditor.qml
CameraSection.qml
SurveyMapVisual.qml
CameraCalc.qml
SurveyItemEditor.qml
RallyPointEditorHeader.qml
GeoFenceMapVisuals.qml
CorridorScanMapVisual.qml
CMakeLists.txt
PlanToolBarIndicators.qml
MissionItemEditor.qml
MissionItemStatus.qml
RallyPointItemEditor.qml
PlanView.qml
FWLandingPatternMapVisual.qml
GeoFenceEditor.qml
MissionItemMapVisual.qml
SimpleItemMapVisual.qml
StructureScanEditor.qml
PlanToolBar.qml
TransectStyleComplexItemStats.qml
MissionSettingsEditor.qml
SimpleItemEditor.qml
StructureScanMapVisual.qml
FWLandingPatternEditor.qml
)
\ No newline at end of file
......@@ -95,6 +95,7 @@
#include "MAVLinkInspectorController.h"
#include "GeoTagController.h"
#include "LogReplayLink.h"
#include "VehicleObjectAvoidance.h"
#ifndef __mobile__
#include "FirmwareUpgradeController.h"
......@@ -466,18 +467,19 @@ void QGCApplication::_initCommon()
qmlRegisterType<QGCPalette> ("QGroundControl.Palette", 1, 0, "QGCPalette");
qmlRegisterType<QGCMapPalette> ("QGroundControl.Palette", 1, 0, "QGCMapPalette");
qmlRegisterUncreatableType<Vehicle> (kQGCVehicle, 1, 0, "Vehicle", kRefOnly);
qmlRegisterUncreatableType<MissionItem> (kQGCVehicle, 1, 0, "MissionItem", kRefOnly);
qmlRegisterUncreatableType<MissionManager> (kQGCVehicle, 1, 0, "MissionManager", kRefOnly);
qmlRegisterUncreatableType<ParameterManager> (kQGCVehicle, 1, 0, "ParameterManager", kRefOnly);
qmlRegisterUncreatableType<QGCCameraManager> (kQGCVehicle, 1, 0, "QGCCameraManager", kRefOnly);
qmlRegisterUncreatableType<QGCCameraControl> (kQGCVehicle, 1, 0, "QGCCameraControl", kRefOnly);
qmlRegisterUncreatableType<QGCVideoStreamInfo> (kQGCVehicle, 1, 0, "QGCVideoStreamInfo", kRefOnly);
qmlRegisterUncreatableType<LinkInterface> (kQGCVehicle, 1, 0, "LinkInterface", kRefOnly);
qmlRegisterUncreatableType<MissionController> (kQGCControllers, 1, 0, "MissionController", kRefOnly);
qmlRegisterUncreatableType<GeoFenceController> (kQGCControllers, 1, 0, "GeoFenceController", kRefOnly);
qmlRegisterUncreatableType<RallyPointController>(kQGCControllers, 1, 0, "RallyPointController", kRefOnly);
qmlRegisterUncreatableType<VisualMissionItem> (kQGCControllers, 1, 0, "VisualMissionItem", kRefOnly);
qmlRegisterUncreatableType<Vehicle> (kQGCVehicle, 1, 0, "Vehicle", kRefOnly);
qmlRegisterUncreatableType<MissionItem> (kQGCVehicle, 1, 0, "MissionItem", kRefOnly);
qmlRegisterUncreatableType<MissionManager> (kQGCVehicle, 1, 0, "MissionManager", kRefOnly);
qmlRegisterUncreatableType<ParameterManager> (kQGCVehicle, 1, 0, "ParameterManager", kRefOnly);
qmlRegisterUncreatableType<VehicleObjectAvoidance> (kQGCVehicle, 1, 0, "VehicleObjectAvoidance", kRefOnly);
qmlRegisterUncreatableType<QGCCameraManager> (kQGCVehicle, 1, 0, "QGCCameraManager", kRefOnly);
qmlRegisterUncreatableType<QGCCameraControl> (kQGCVehicle, 1, 0, "QGCCameraControl", kRefOnly);
qmlRegisterUncreatableType<QGCVideoStreamInfo> (kQGCVehicle, 1, 0, "QGCVideoStreamInfo", kRefOnly);
qmlRegisterUncreatableType<LinkInterface> (kQGCVehicle, 1, 0, "LinkInterface", kRefOnly);
qmlRegisterUncreatableType<MissionController> (kQGCControllers, 1, 0, "MissionController", kRefOnly);
qmlRegisterUncreatableType<GeoFenceController> (kQGCControllers, 1, 0, "GeoFenceController", kRefOnly);
qmlRegisterUncreatableType<RallyPointController> (kQGCControllers, 1, 0, "RallyPointController", kRefOnly);
qmlRegisterUncreatableType<VisualMissionItem> (kQGCControllers, 1, 0, "VisualMissionItem", kRefOnly);
qmlRegisterUncreatableType<CoordinateVector> ("QGroundControl", 1, 0, "CoordinateVector", kRefOnly);
qmlRegisterUncreatableType<QmlObjectListModel> ("QGroundControl", 1, 0, "QmlObjectListModel", kRefOnly);
......
......@@ -13,6 +13,79 @@ add_library(QmlControls
ScreenToolsController.cc
)
add_custom_target(QmlControlsQml
SOURCES
APMSubMotorDisplay.qml
AppMessages.qml
AxisMonitor.qml
ClickableColor.qml
DeadMouseArea.qml
DropButton.qml
DropPanel.qml
EditPositionDialog.qml
ExclusiveGroupItem.qml
FactSliderPanel.qml
FileButton.qml
FlightModeDropdown.qml
FlightModeMenu.qml
HackAndroidFileDialog.qml
HackFileDialog.qml
IndicatorButton.qml
JoystickThumbPad.qml
LogReplayStatusBar.qml
MAVLinkMessageButton.qml
MissionCommandDialog.qml
MissionItemIndexLabel.qml
ModeSwitchDisplay.qml
MultiRotorMotorDisplay.qml
OfflineMapButton.qml
PageView.qml
ParameterEditor.qml
ParameterEditorDialog.qml
PIDTuning.qml
PreFlightCheckButton.qml
PreFlightCheckGroup.qml
PreFlightCheckModel.qml
QGCButton.qml
QGCCheckBox.qml
QGCColoredImage.qml
QGCComboBox.qml
QGCFileDialog.qml
QGCFlickable.qml
QGCFlickableHorizontalIndicator.qml
QGCFlickableVerticalIndicator.qml
QGCGroupBox.qml
QGCHoverButton.qml
QGCLabel.qml
QGCListView.qml
QGCMapLabel.qml
QGCMenu.qml
QGCMenuItem.qml
QGCMenuSeparator.qml
QGCMouseArea.qml
QGCMovableItem.qml
QGCPipable.qml
QGCRadioButton.qml
QGCSlider.qml
QGCSwitch.qml
QGCTabBar.qml
QGCTabButton.qml
QGCTextField.qml
QGCToolBarButton.qml
QGCViewDialog.qml
QGCViewDialogContainer.qml
QGCViewMessage.qml
QmlTest.qml
RCChannelMonitor.qml
RoundButton.qml
ScreenTools.qml
SectionHeader.qml
SliderSwitch.qml
SubMenuButton.qml
ToolStrip.qml
VehicleRotationCal.qml
VehicleSummaryRow.qml
)
target_link_libraries(QmlControls
PUBLIC
qgc
......
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.11
import QtQuick.Dialogs 1.2
......@@ -11,8 +11,8 @@ Rectangle {
height: visible ? (rowLayout.height + (_margins * 2)) : 0
color: qgcPal.window
property real _margins: ScreenTools.defaultFontPixelHeight / 4
property var _logReplayLink: null
property real _margins: ScreenTools.defaultFontPixelHeight / 4
property var _logReplayLink: null
function pickLogFile() {
if (mainWindow.activeVehicle) {
......@@ -56,13 +56,29 @@ Rectangle {
onClicked: controller.isPlaying = !controller.isPlaying
}
QGCComboBox {
textRole: "text"
currentIndex: 3
model: ListModel {
ListElement { text: "0.1"; value: 0.1 }
ListElement { text: "0.25"; value: 0.25 }
ListElement { text: "0.5"; value: 0.5 }
ListElement { text: "1x"; value: 1 }
ListElement { text: "2x"; value: 2 }
ListElement { text: "5x"; value: 5 }
}
onActivated: controller.playbackSpeed = model.get(currentIndex).value
}
QGCLabel { text: controller.playheadTime }
Slider {
id: slider
Layout.fillWidth: true
minimumValue: 0
maximumValue: 100
from: 0
to: 100
enabled: controller.link
property bool manualUpdate: false
......
......@@ -27,18 +27,19 @@ Item {
height: image.height
Image {
id: image
smooth: true
mipmap: true
antialiasing: true
visible: false
fillMode: Image.PreserveAspectFit
anchors.fill: parent
id: image
smooth: true
mipmap: true
antialiasing: true
visible: false
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: height
}
ColorOverlay {
anchors.fill: image
source: image
color: parent.color
anchors.fill: image
source: image
color: parent.color
}
}
......@@ -37,7 +37,7 @@ ComboBox {
width: control.width
contentItem: Text {
text: textRole ? modelData[textRole] : modelData
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
color: control.currentIndex === index ? qgcPal.buttonHighlightText : qgcPal.buttonText
verticalAlignment: Text.AlignVCenter
}
......
......@@ -410,7 +410,7 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
server += "mapbox.high-contrast";
break;
default:
return QString::null;
return {};
}
server += QString("/%1/%2/%3.jpg80?access_token=%4").arg(zoom).arg(x).arg(y).arg(mapBoxToken);
return server;
......@@ -473,7 +473,7 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
qWarning("Unknown map id %d\n", type);
break;
}
return QString::null;
return {};
}
//-----------------------------------------------------------------------------
......
......@@ -24,5 +24,13 @@
"shortDescription": "Use Vertical Instrument Panel instead of the default one",
"type": "bool",
"defaultValue": false
},
{
"name": "maxGoToLocationDistance",
"shortDescription": "Maximum distance allowed for Go To Location.",
"type": "double",
"units": "m",
"defaultValue": 1000,
"min": 1
}
]
......@@ -21,3 +21,4 @@ DECLARE_SETTINGSFACT(FlyViewSettings, guidedMinimumAltitude)
DECLARE_SETTINGSFACT(FlyViewSettings, guidedMaximumAltitude)
DECLARE_SETTINGSFACT(FlyViewSettings, showLogReplayStatusBar)
DECLARE_SETTINGSFACT(FlyViewSettings, alternateInstrumentPanel)
DECLARE_SETTINGSFACT(FlyViewSettings, maxGoToLocationDistance)
......@@ -23,4 +23,5 @@ public:
DEFINE_SETTINGFACT(guidedMaximumAltitude)
DEFINE_SETTINGFACT(showLogReplayStatusBar)
DEFINE_SETTINGFACT(alternateInstrumentPanel)
DEFINE_SETTINGFACT(maxGoToLocationDistance)
};
......@@ -318,7 +318,7 @@ TaisyncManager::_setEnabled()
void
TaisyncManager::_restoreVideoSettings(Fact* setting)
{
SettingsFact* pFact = dynamic_cast<SettingsFact*>(setting);
auto* pFact = qobject_cast<SettingsFact*>(setting);
if(pFact) {
pFact->setVisible(qgcApp()->toolbox()->corePlugin()->adjustSettingMetaData(VideoSettings::settingsGroup, *setting->metaData()));
}
......
......@@ -9,6 +9,7 @@ endif()
add_library(Vehicle
ADSBVehicle.cc
GPSRTKFactGroup.cc
VehicleObjectAvoidance.cc
MAVLinkLogManager.cc
MultiVehicleManager.cc
Vehicle.cc
......
......@@ -304,7 +304,7 @@ void MultiVehicleManager::_setActiveVehiclePhase2(void)
void MultiVehicleManager::_vehicleParametersReadyChanged(bool parametersReady)
{
ParameterManager* paramMgr = dynamic_cast<ParameterManager*>(sender());
auto* paramMgr = qobject_cast<ParameterManager*>(sender());
if (!paramMgr) {
qWarning() << "Dynamic cast failed!";
......
......@@ -41,6 +41,8 @@
#include "VideoManager.h"
#include "VideoSettings.h"
#include "PositionManager.h"
#include "VehicleObjectAvoidance.h"
#if defined(QGC_AIRMAP_ENABLED)
#include "AirspaceVehicleManager.h"
#endif
......@@ -156,7 +158,6 @@ Vehicle::Vehicle(LinkInterface* link,
, _geoFenceManagerInitialRequestSent(false)
, _rallyPointManager(nullptr)
, _rallyPointManagerInitialRequestSent(false)
, _parameterManager(nullptr)
#if defined(QGC_AIRMAP_ENABLED)
, _airspaceVehicleManager(nullptr)
#endif
......@@ -359,7 +360,6 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType,
, _geoFenceManagerInitialRequestSent(false)
, _rallyPointManager(nullptr)
, _rallyPointManagerInitialRequestSent(false)
, _parameterManager(nullptr)
#if defined(QGC_AIRMAP_ENABLED)
, _airspaceVehicleManager(nullptr)
#endif
......@@ -451,6 +451,8 @@ void Vehicle::_commonInit(void)
_parameterManager = new ParameterManager(this);
connect(_parameterManager, &ParameterManager::parametersReadyChanged, this, &Vehicle::_parametersReady);
_objectAvoidance = new VehicleObjectAvoidance(this, this);
// GeoFenceManager needs to access ParameterManager so make sure to create after
_geoFenceManager = new GeoFenceManager(this);
connect(_geoFenceManager, &GeoFenceManager::error, this, &Vehicle::_geoFenceManagerError);
......@@ -812,6 +814,9 @@ void Vehicle::_mavlinkMessageReceived(LinkInterface* link, mavlink_message_t mes
case MAVLINK_MSG_ID_MOUNT_ORIENTATION:
_handleGimbalOrientation(message);
break;
case MAVLINK_MSG_ID_OBSTACLE_DISTANCE:
_handleObstacleDistance(message);
break;
case MAVLINK_MSG_ID_SERIAL_CONTROL:
{
......@@ -3041,9 +3046,9 @@ void Vehicle::guidedModeGotoLocation(const QGeoCoordinate& gotoCoord)
if (!coordinate().isValid()) {
return;
}
double maxDistance = 1000.0;
double maxDistance = _settingsManager->flyViewSettings()->maxGoToLocationDistance()->rawValue().toDouble();
if (coordinate().distanceTo(gotoCoord) > maxDistance) {
qgcApp()->showMessage(QString("New location is too far. Must be less than %1 %2").arg(qRound(FactMetaData::metersToAppSettingsDistanceUnits(maxDistance).toDouble())).arg(FactMetaData::appSettingsDistanceUnitsString()));
qgcApp()->showMessage(QString("New location is too far. Must be less than %1 %2.").arg(qRound(FactMetaData::metersToAppSettingsDistanceUnits(maxDistance).toDouble())).arg(FactMetaData::appSettingsDistanceUnitsString()));
return;
}
_firmwarePlugin->guidedModeGotoLocation(this, gotoCoord);
......@@ -4057,6 +4062,13 @@ void Vehicle::_handleGimbalOrientation(const mavlink_message_t& message)
}
}
void Vehicle::_handleObstacleDistance(const mavlink_message_t& message)
{
mavlink_obstacle_distance_t o;
mavlink_msg_obstacle_distance_decode(&message, &o);
_objectAvoidance->update(&o);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
......
......@@ -37,6 +37,8 @@ class SettingsManager;
class ADSBVehicle;
class QGCCameraManager;
class Joystick;
class VehicleObjectAvoidance;
#if defined(QGC_AIRMAP_ENABLED)
class AirspaceVehicleManager;
#endif
......@@ -484,7 +486,6 @@ private:
#endif
};
class Vehicle : public FactGroup
{
Q_OBJECT
......@@ -652,7 +653,8 @@ public:
Q_PROPERTY(bool takeoffVehicleSupported READ takeoffVehicleSupported CONSTANT) ///< Guided takeoff supported
Q_PROPERTY(QString gotoFlightMode READ gotoFlightMode CONSTANT) ///< Flight mode vehicle is in while performing goto
Q_PROPERTY(ParameterManager* parameterManager READ parameterManager CONSTANT)
Q_PROPERTY(ParameterManager* parameterManager READ parameterManager CONSTANT)
Q_PROPERTY(VehicleObjectAvoidance* objectAvoidance READ objectAvoidance CONSTANT)
// FactGroup object model properties
......@@ -989,8 +991,9 @@ public:
void setConnectionLostEnabled(bool connectionLostEnabled);
ParameterManager* parameterManager(void) { return _parameterManager; }
ParameterManager* parameterManager(void) const { return _parameterManager; }
ParameterManager* parameterManager() { return _parameterManager; }
ParameterManager* parameterManager() const { return _parameterManager; }
VehicleObjectAvoidance* objectAvoidance() { return _objectAvoidance; }
static const int cMaxRcChannels = 18;
......@@ -1295,6 +1298,7 @@ private:
void _handleOrbitExecutionStatus(const mavlink_message_t& message);
void _handleMessageInterval(const mavlink_message_t& message);
void _handleGimbalOrientation(const mavlink_message_t& message);
void _handleObstacleDistance(const mavlink_message_t& message);
// ArduPilot dialect messages
#if !defined(NO_ARDUPILOT_DIALECT)
void _handleCameraFeedback(const mavlink_message_t& message);
......@@ -1425,7 +1429,8 @@ private:
RallyPointManager* _rallyPointManager;
bool _rallyPointManagerInitialRequestSent;
ParameterManager* _parameterManager;
ParameterManager* _parameterManager = nullptr;
VehicleObjectAvoidance* _objectAvoidance = nullptr;
#if defined(QGC_AIRMAP_ENABLED)
AirspaceVehicleManager* _airspaceVehicleManager;
......
/****************************************************************************
*
* (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "Vehicle.h"
#include "VehicleObjectAvoidance.h"
#include "ParameterManager.h"
#include <cmath>
static const char* kColPrevParam = "MPC_COL_PREV_D";
//-----------------------------------------------------------------------------
VehicleObjectAvoidance::VehicleObjectAvoidance(Vehicle *vehicle, QObject* parent)
: QObject(parent)
, _vehicle(vehicle)
{
}
//-----------------------------------------------------------------------------
void
VehicleObjectAvoidance::update(mavlink_obstacle_distance_t* message)
{
//-- Collect raw data
if(std::isfinite(message->increment_f) && message->increment_f > 0) {
_increment = static_cast<qreal>(message->increment_f);
} else {
_increment = static_cast<qreal>(message->increment);
}
_minDistance = message->min_distance;
_maxDistance = message->max_distance;
_angleOffset = static_cast<qreal>(message->angle_offset);
if(_distances.count() == 0) {
for(int i = 0; i < MAVLINK_MSG_OBSTACLE_DISTANCE_FIELD_DISTANCES_LEN; i++) {
_distances.append(static_cast<int>(message->distances[i]));
}
} else {
for(int i = 0; i < MAVLINK_MSG_OBSTACLE_DISTANCE_FIELD_DISTANCES_LEN; i++) {
_distances[i] = static_cast<int>(message->distances[i]);
}
}
//-- Create a plottable grid with found objects
_objGrid.clear();
_objDistance.clear();
auto* sp = qobject_cast<VehicleSetpointFactGroup*>(_vehicle->setpointFactGroup());
qreal startAngle = sp->yaw()->rawValue().toDouble() + _angleOffset;
for(int i = 0; i < MAVLINK_MSG_OBSTACLE_DISTANCE_FIELD_DISTANCES_LEN; i++) {
if(_distances[i] < _maxDistance && message->distances[i] != UINT16_MAX) {
qreal d = static_cast<qreal>(_distances[i]);
d = d / static_cast<qreal>(_maxDistance);
qreal a = (_increment * i) - startAngle;
if(a < 0) a = a + 360;
qreal rd = (M_PI / 180.0) * a;
QPointF p = QPointF(d * cos(rd), d * sin(rd));
_objGrid.append(p);
_objDistance.append(d);
}
}
emit objectAvoidanceChanged();
}
//-----------------------------------------------------------------------------
bool
VehicleObjectAvoidance::enabled()
{
uint8_t id = static_cast<uint8_t>(_vehicle->id());
if(_vehicle->parameterManager()->parameterExists(id, kColPrevParam)) {
return _vehicle->parameterManager()->getParameter(id, kColPrevParam)->rawValue().toInt() >= 0;
}
return false;
}
//-----------------------------------------------------------------------------
void
VehicleObjectAvoidance::start(int minDistance)
{
uint8_t id = static_cast<uint8_t>(_vehicle->id());
if(_vehicle->parameterManager()->parameterExists(id, kColPrevParam)) {
_vehicle->parameterManager()->getParameter(id, kColPrevParam)->setRawValue(minDistance);
emit objectAvoidanceChanged();
}
}
//-----------------------------------------------------------------------------
void
VehicleObjectAvoidance::stop()
{
uint8_t id = static_cast<uint8_t>(_vehicle->id());
if(_vehicle->parameterManager()->parameterExists(id, kColPrevParam)) {
_vehicle->parameterManager()->getParameter(id, kColPrevParam)->setRawValue(-1);
emit objectAvoidanceChanged();
}
}
//-----------------------------------------------------------------------------
QPointF
VehicleObjectAvoidance::grid(int i)
{
if(i < _objGrid.count() && i >= 0) {
return _objGrid[i];
}
return QPointF(0,0);
}
//-----------------------------------------------------------------------------
qreal
VehicleObjectAvoidance::distance(int i)
{
if(i < _objDistance.count() && i >= 0) {
return _objDistance[i];
}
return 0;
}
/****************************************************************************
*
* (c) 2009-2019 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#pragma once
#include <QObject>
#include <QVector>
#include <QPointF>
#include "QGCMAVLink.h"
class Vehicle;
class VehicleObjectAvoidance : public QObject
{
Q_OBJECT
public:
VehicleObjectAvoidance(Vehicle* vehicle, QObject* parent = nullptr);
Q_PROPERTY(bool available READ available NOTIFY objectAvoidanceChanged)
Q_PROPERTY(bool enabled READ enabled NOTIFY objectAvoidanceChanged)
Q_PROPERTY(QList<int> distances READ distances NOTIFY objectAvoidanceChanged)
Q_PROPERTY(qreal increment READ increment NOTIFY objectAvoidanceChanged)
Q_PROPERTY(int minDistance READ minDistance NOTIFY objectAvoidanceChanged)
Q_PROPERTY(int maxDistance READ maxDistance NOTIFY objectAvoidanceChanged)
Q_PROPERTY(qreal angleOffset READ angleOffset NOTIFY objectAvoidanceChanged)
Q_PROPERTY(int gridSize READ gridSize NOTIFY objectAvoidanceChanged)
//-- Start collision avoidance. Argument is minimum distance the vehicle should keep to all obstacles
Q_INVOKABLE void start (int minDistance);
//-- Stop collision avoidance.
Q_INVOKABLE void stop ();
//-- Object locations (in relationship to vehicle)
Q_INVOKABLE QPointF grid (int i);
Q_INVOKABLE qreal distance(int i);
bool available () { return _distances.count() > 0; }
bool enabled ();
QList<int> distances () { return _distances; }
qreal increment () { return _increment; }
int minDistance () { return _minDistance; }
int maxDistance () { return _maxDistance; }
qreal angleOffset () { return _angleOffset; }
int gridSize () { return _objGrid.count(); }
void update (mavlink_obstacle_distance_t* message);
signals:
void objectAvoidanceChanged ();
private:
QList<int> _distances;
QVector<QPointF>_objGrid;
QVector<qreal> _objDistance;
qreal _increment = 0;
int _minDistance = 0;
int _maxDistance = 0;
qreal _angleOffset = 0;
Vehicle* _vehicle = nullptr;
};
......@@ -8,6 +8,20 @@ add_library(VehicleSetup
VehicleComponent.cc
)
add_custom_target(VehicleSetupQml
SOURCES
JoystickConfigCalibration.qml
JoystickConfigGeneral.qml
SetupParameterEditor.qml
VehicleSummary.qml
JoystickConfigButtons.qml
PX4FlowSensor.qml
FirmwareUpgrade.qml
JoystickConfig.qml
JoystickConfigAdvanced.qml
SetupView.qml
)
target_link_libraries(VehicleSetup
PUBLIC
qgc
......
......@@ -8,4 +8,9 @@ target_link_libraries(ViewWidgets
qgc
)
add_custom_target(ViewWidgetsQml
SOURCE
ViewWidget.qml
)
target_include_directories(ViewWidgets INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -270,7 +270,7 @@ QString BluetoothConfiguration::settingsTitle()
void BluetoothConfiguration::copyFrom(LinkConfiguration *source)
{
LinkConfiguration::copyFrom(source);
BluetoothConfiguration* usource = dynamic_cast<BluetoothConfiguration*>(source);
auto* usource = qobject_cast<BluetoothConfiguration*>(source);
Q_ASSERT(usource != nullptr);
_device = usource->device();
}
......@@ -303,7 +303,7 @@ void BluetoothConfiguration::loadSettings(QSettings& settings, const QString& ro
void BluetoothConfiguration::updateSettings()
{
if(_link) {
BluetoothLink* ulink = dynamic_cast<BluetoothLink*>(_link);
auto* ulink = qobject_cast<BluetoothLink*>(_link);
if(ulink) {
ulink->_restartConnection();
}
......
......@@ -118,26 +118,26 @@ LinkConfiguration* LinkConfiguration::duplicateSettings(LinkConfiguration* sourc
switch(source->type()) {
#ifndef NO_SERIAL_LINK
case TypeSerial:
dupe = new SerialConfiguration(dynamic_cast<SerialConfiguration*>(source));
dupe = new SerialConfiguration(qobject_cast<SerialConfiguration*>(source));
break;
#endif
case TypeUdp:
dupe = new UDPConfiguration(dynamic_cast<UDPConfiguration*>(source));
dupe = new UDPConfiguration(qobject_cast<UDPConfiguration*>(source));
break;
case TypeTcp:
dupe = new TCPConfiguration(dynamic_cast<TCPConfiguration*>(source));
dupe = new TCPConfiguration(qobject_cast<TCPConfiguration*>(source));
break;
#ifdef QGC_ENABLE_BLUETOOTH
case TypeBluetooth:
dupe = new BluetoothConfiguration(dynamic_cast<BluetoothConfiguration*>(source));
dupe = new BluetoothConfiguration(qobject_cast<BluetoothConfiguration*>(source));
break;
#endif
case TypeLogReplay:
dupe = new LogReplayLinkConfiguration(dynamic_cast<LogReplayLinkConfiguration*>(source));
dupe = new LogReplayLinkConfiguration(qobject_cast<LogReplayLinkConfiguration*>(source));
break;
#ifdef QT_DEBUG
case TypeMock:
dupe = new MockConfiguration(dynamic_cast<MockConfiguration*>(source));
dupe = new MockConfiguration(qobject_cast<MockConfiguration*>(source));
break;
#endif
case TypeLast:
......
......@@ -114,11 +114,11 @@ LinkInterface* LinkManager::createConnectedLink(SharedLinkConfigurationPointer&
#ifndef NO_SERIAL_LINK
case LinkConfiguration::TypeSerial:
{
SerialConfiguration* serialConfig = dynamic_cast<SerialConfiguration*>(config.data());
auto* serialConfig = qobject_cast<SerialConfiguration*>(config.data());
if (serialConfig) {
pLink = new SerialLink(config, isPX4Flow);
if (serialConfig->usbDirect()) {
_activeLinkCheckList.append(dynamic_cast<SerialLink*>(pLink));
_activeLinkCheckList.append(qobject_cast<SerialLink*>(pLink));
if (!_activeLinkCheckTimer.isActive()) {
_activeLinkCheckTimer.start();
}
......@@ -378,26 +378,26 @@ void LinkManager::loadLinkConfigurationList()
switch(type) {
#ifndef NO_SERIAL_LINK
case LinkConfiguration::TypeSerial:
pLink = dynamic_cast<LinkConfiguration*>(new SerialConfiguration(name));
pLink = new SerialConfiguration(name);
break;
#endif
case LinkConfiguration::TypeUdp:
pLink = dynamic_cast<LinkConfiguration*>(new UDPConfiguration(name));
pLink = new UDPConfiguration(name);
break;
case LinkConfiguration::TypeTcp:
pLink = dynamic_cast<LinkConfiguration*>(new TCPConfiguration(name));
pLink = new TCPConfiguration(name);
break;
#ifdef QGC_ENABLE_BLUETOOTH
case LinkConfiguration::TypeBluetooth:
pLink = dynamic_cast<LinkConfiguration*>(new BluetoothConfiguration(name));
pLink = new BluetoothConfiguration(name);
break;
#endif
case LinkConfiguration::TypeLogReplay:
pLink = dynamic_cast<LinkConfiguration*>(new LogReplayLinkConfiguration(name));
pLink = new LogReplayLinkConfiguration(name);
break;
#ifdef QT_DEBUG
case LinkConfiguration::TypeMock:
pLink = dynamic_cast<LinkConfiguration*>(new MockConfiguration(name));
pLink = new MockConfiguration(name);
break;
#endif
case LinkConfiguration::TypeLast:
......
This diff is collapsed.
......@@ -57,70 +57,66 @@ public:
/// @return true: log is currently playing, false: log playback is paused
bool isPlaying(void) { return _readTickTimer.isActive(); }
/// Start replay at current position
void play(void) { emit _playOnThread(); }
/// Pause replay
void pause(void) { emit _pauseOnThread(); }
/// Move the playhead to the specified percent complete
void movePlayhead(qreal percentComplete);
/// Sets the acceleration factor: -100: 0.01X, 0: 1.0X, 100: 100.0X
void setAccelerationFactor(int factor) { emit _setAccelerationFactorOnThread(factor); }
void play (void) { emit _playOnThread(); }
void pause (void) { emit _pauseOnThread(); }
void movePlayhead (qreal percentComplete);
// Virtuals from LinkInterface
virtual QString getName(void) const { return _config->name(); }
virtual void requestReset(void){ }
virtual bool isConnected(void) const { return _connected; }
virtual qint64 getConnectionSpeed(void) const { return 100000000; }
virtual qint64 bytesAvailable(void) { return 0; }
virtual bool isLogReplay(void) { return true; }
virtual QString getName (void) const { return _config->name(); }
virtual void requestReset (void){ }
virtual bool isConnected (void) const { return _connected; }
virtual qint64 getConnectionSpeed (void) const { return 100000000; }
virtual qint64 bytesAvailable (void) { return 0; }
virtual bool isLogReplay (void) { return true; }
// These are left unimplemented in order to cause linker errors which indicate incorrect usage of
// connect/disconnect on link directly. All connect/disconnect calls should be made through LinkManager.
bool connect(void);
bool disconnect(void);
bool connect (void);
bool disconnect (void);
public slots:
/// Sets the acceleration factor: -100: 0.01X, 0: 1.0X, 100: 100.0X
void setPlaybackSpeed(qreal playbackSpeed) { emit _setPlaybackSpeedOnThread(playbackSpeed); }
private slots:
virtual void _writeBytes(const QByteArray bytes);
signals:
void logFileStats(bool logTimestamped, int logDurationSecs, int binaryBaudRate);
void playbackStarted(void);
void playbackPaused(void);
void playbackAtEnd(void);
void playbackPercentCompleteChanged(qreal percentComplete);
void currentLogTimeSecs(int secs);
void logFileStats (int logDurationSecs);
void playbackStarted (void);
void playbackPaused (void);
void playbackAtEnd (void);
void playbackPercentCompleteChanged (qreal percentComplete);
void currentLogTimeSecs (int secs);
// Internal signals
void _playOnThread(void);
void _pauseOnThread(void);
void _setAccelerationFactorOnThread(int factor);
void _playOnThread (void);
void _pauseOnThread (void);
void _setPlaybackSpeedOnThread (qreal playbackSpeed);
private slots:
void _readNextLogEntry(void);
void _play(void);
void _pause(void);
void _setAccelerationFactor(int factor);
void _readNextLogEntry (void);
void _play (void);
void _pause (void);
void _setPlaybackSpeed (qreal playbackSpeed);
private:
// Links are only created/destroyed by LinkManager so constructor/destructor is not public
LogReplayLink(SharedLinkConfigurationPointer& config);
~LogReplayLink();
void _replayError(const QString& errorMsg);
quint64 _parseTimestamp(const QByteArray& bytes);
quint64 _seekToNextMavlinkMessage(mavlink_message_t* nextMsg);
quint64 _findLastTimestamp(void);
quint64 _readNextMavlinkMessage(QByteArray& bytes);
bool _loadLogFile(void);
void _finishPlayback(void);
void _resetPlaybackToBeginning(void);
void _signalCurrentLogTimeSecs(void);
void _replayError (const QString& errorMsg);
quint64 _parseTimestamp (const QByteArray& bytes);
quint64 _seekToNextMavlinkMessage (mavlink_message_t* nextMsg);
quint64 _findLastTimestamp (void);
quint64 _readNextMavlinkMessage (QByteArray& bytes);
bool _loadLogFile (void);
void _finishPlayback (void);
void _resetPlaybackToBeginning (void);
void _signalCurrentLogTimeSecs (void);
// Virtuals from LinkInterface
virtual bool _connect(void);
virtual bool _connect (void);
virtual void _disconnect(void);
// Virtuals from QThread
......@@ -139,16 +135,13 @@ private:
quint64 _logEndTimeUSecs; ///< The last timestamp in the current log file.
quint64 _logDurationUSecs;
static const int _defaultBinaryBaudRate = 57600;
int _binaryBaudRate; ///< Playback rate for binary log format
float _replayAccelerationFactor; ///< Factor to apply to playback rate
qreal _playbackSpeed;
quint64 _playbackStartTimeMSecs; ///< The time when the logfile was first played back. This is used to pace out replaying the messages to fix long-term drift/skew. 0 indicates that the player hasn't initiated playback of this log file.
quint64 _playbackStartLogTimeUSecs;
MAVLinkProtocol* _mavlink;
QFile _logFile;
quint64 _logFileSize;
bool _logTimestamped; ///< true: Timestamped log format, false: no timestamps
static const int cbTimestamp = sizeof(quint64);
};
......@@ -163,6 +156,7 @@ public:
Q_PROPERTY(qreal percentComplete READ percentComplete WRITE setPercentComplete NOTIFY percentCompleteChanged)
Q_PROPERTY(QString totalTime MEMBER _totalTime NOTIFY totalTimeChanged)
Q_PROPERTY(QString playheadTime MEMBER _playheadTime NOTIFY playheadTimeChanged)
Q_PROPERTY(qreal playbackSpeed MEMBER _playbackSpeed NOTIFY playbackSpeedChanged)
LogReplayLinkController(void);
......@@ -180,9 +174,10 @@ signals:
void percentCompleteChanged (qreal percentComplete);
void playheadTimeChanged (QString playheadTime);
void totalTimeChanged (QString totalTime);
void playbackSpeedChanged (qreal playbackSpeed);
private slots:
void _logFileStats (bool logTimestamped, int logDurationSecs, int binaryBaudRate);
void _logFileStats (int logDurationSecs);
void _playbackStarted (void);
void _playbackPaused (void);
void _playbackAtEnd (void);
......@@ -199,5 +194,6 @@ private:
int _playheadSecs;
QString _playheadTime;
QString _totalTime;
qreal _playbackSpeed;
};
......@@ -1134,7 +1134,7 @@ MockConfiguration::MockConfiguration(MockConfiguration* source)
void MockConfiguration::copyFrom(LinkConfiguration *source)
{
LinkConfiguration::copyFrom(source);
MockConfiguration* usource = dynamic_cast<MockConfiguration*>(source);
auto* usource = qobject_cast<MockConfiguration*>(source);
if (!usource) {
qWarning() << "dynamic_cast failed" << source << usource;
......
......@@ -405,7 +405,7 @@ SerialConfiguration::SerialConfiguration(SerialConfiguration* copy) : LinkConfig
void SerialConfiguration::copyFrom(LinkConfiguration *source)
{
LinkConfiguration::copyFrom(source);
SerialConfiguration* ssource = dynamic_cast<SerialConfiguration*>(source);
auto* ssource = qobject_cast<SerialConfiguration*>(source);
if (ssource) {
_baud = ssource->baud();
_flowControl = ssource->flowControl();
......@@ -423,7 +423,7 @@ void SerialConfiguration::copyFrom(LinkConfiguration *source)
void SerialConfiguration::updateSettings()
{
if(_link) {
SerialLink* serialLink = dynamic_cast<SerialLink*>(_link);
auto* serialLink = qobject_cast<SerialLink*>(_link);
if(serialLink) {
serialLink->_resetConfiguration();
}
......
......@@ -280,7 +280,7 @@ TCPConfiguration::TCPConfiguration(TCPConfiguration* source) : LinkConfiguration
void TCPConfiguration::copyFrom(LinkConfiguration *source)
{
LinkConfiguration::copyFrom(source);
TCPConfiguration* usource = dynamic_cast<TCPConfiguration*>(source);
auto* usource = qobject_cast<TCPConfiguration*>(source);
Q_ASSERT(usource != nullptr);
_port = usource->port();
_address = usource->address();
......@@ -302,7 +302,7 @@ void TCPConfiguration::setHost(const QString host)
if(ipAdd.isEmpty()) {
qWarning() << "TCP:" << "Could not resolve host:" << host;
} else {
_address = ipAdd;
_address = QHostAddress(ipAdd);
}
}
......@@ -326,7 +326,7 @@ void TCPConfiguration::loadSettings(QSettings& settings, const QString& root)
void TCPConfiguration::updateSettings()
{
if(_link) {
TCPLink* ulink = dynamic_cast<TCPLink*>(_link);
auto* ulink = qobject_cast<TCPLink*>(_link);
if(ulink) {
ulink->_restartConnection();
}
......
......@@ -396,7 +396,7 @@ void UDPConfiguration::copyFrom(LinkConfiguration *source)
void UDPConfiguration::_copyFrom(LinkConfiguration *source)
{
UDPConfiguration* usource = dynamic_cast<UDPConfiguration*>(source);
auto* usource = qobject_cast<UDPConfiguration*>(source);
if (usource) {
_localPort = usource->localPort();
_clearTargetHosts();
......
......@@ -1094,7 +1094,7 @@ void UAS::pairRX(int rxType, int rxSubType)
#ifndef __mobile__
void UAS::enableHilJSBSim(bool enable, QString options)
{
QGCJSBSimLink* link = dynamic_cast<QGCJSBSimLink*>(simulation);
auto* link = qobject_cast<QGCJSBSimLink*>(simulation);
if (!link) {
// Delete wrong sim
if (simulation) {
......@@ -1104,7 +1104,7 @@ void UAS::enableHilJSBSim(bool enable, QString options)
simulation = new QGCJSBSimLink(_vehicle, options);
}
// Connect Flight Gear Link
link = dynamic_cast<QGCJSBSimLink*>(simulation);
link = qobject_cast<QGCJSBSimLink*>(simulation);
link->setStartupArguments(options);
if (enable)
{
......@@ -1123,7 +1123,7 @@ void UAS::enableHilJSBSim(bool enable, QString options)
#ifndef __mobile__
void UAS::enableHilXPlane(bool enable)
{
QGCXPlaneLink* link = dynamic_cast<QGCXPlaneLink*>(simulation);
auto* link = qobject_cast<QGCXPlaneLink*>(simulation);
if (!link) {
if (simulation) {
stopHil();
......
add_subdirectory(preferences)
add_subdirectory(toolbar)
add_library(ui
......@@ -19,6 +21,13 @@ add_library(ui
QMap3D.ui
)
add_custom_target(uiQml
SOURCES
AppSettings.qml
ExitWithErrorWindow.qml
MainRootWindow.qml
)
target_link_libraries(ui
PUBLIC
qgc
......
add_custom_target(UiPreferencesQml
SOURCES
SerialSettings.qml
HelpSettings.qml
TcpSettings.qml
MavlinkSettings.qml
DebugWindow.qml
UdpSettings.qml
LinkSettings.qml
MockLink.qml
GeneralSettings.qml
BluetoothSettings.qml
LogReplaySettings.qml
MockLinkSettings.qml
)
\ No newline at end of file
......@@ -479,16 +479,38 @@ Rectangle {
GridLayout {
columns: 2
QGCLabel { text: qsTr("Guided Minimum Altitude") }
property Fact _guidedMinimumAltitude: QGroundControl.settingsManager.flyViewSettings.guidedMinimumAltitude
property Fact _guidedMaximumAltitude: QGroundControl.settingsManager.flyViewSettings.guidedMaximumAltitude
property Fact _maxGoToLocationDistance: QGroundControl.settingsManager.flyViewSettings.maxGoToLocationDistance
QGCLabel {
text: qsTr("Guided Minimum Altitude")
visible: parent._guidedMinimumAltitude.visible
}
FactTextField {
Layout.preferredWidth: _valueFieldWidth
fact: QGroundControl.settingsManager.flyViewSettings.guidedMinimumAltitude
visible: parent._guidedMinimumAltitude.visible
fact: parent._guidedMinimumAltitude
}
QGCLabel { text: qsTr("Guided Maximum Altitude") }
QGCLabel {
text: qsTr("Guided Maximum Altitude")
visible: parent._guidedMaximumAltitude.visible
}
FactTextField {
Layout.preferredWidth: _valueFieldWidth
visible: parent._guidedMaximumAltitude.visible
fact: parent._guidedMaximumAltitude
}
QGCLabel {
text: qsTr("Go To Location Max Distance")
visible: parent._maxGoToLocationDistance.visible
}
FactTextField {
Layout.preferredWidth: _valueFieldWidth
fact: QGroundControl.settingsManager.flyViewSettings.guidedMaximumAltitude
visible: parent._maxGoToLocationDistance.visible
fact: parent._maxGoToLocationDistance
}
}
}
......
add_custom_target(UiToolbarQml
SOURCES
ArmedIndicator.qml
BatteryIndicator.qml
GPSIndicator.qml
GPSRTKIndicator.qml
JoystickIndicator.qml
LinkIndicator.qml
MainToolBar.qml
MainToolBarIndicators.qml
MessageIndicator.qml
ModeIndicator.qml
MultiVehicleSelector.qml
RCRSSIIndicator.qml
SignalStrength.qml
TelemetryRSSIIndicator.qml
VTOLModeIndicator.qml
)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment