Skip to content

Commit b7dd912

Browse files
authored
Spacecraft support
Adds support for Spacecraft vehicles, currently being available in PX4, ATMOS.
1 parent 7fd9153 commit b7dd912

16 files changed

+686
-1
lines changed

qgcimages.qrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<file alias="Airframe/QuadRotorWide.svg">src/AutoPilotPlugins/Common/Images/QuadRotorWide.svg</file>
2626
<file alias="Airframe/QuadRotorX.svg">src/AutoPilotPlugins/Common/Images/QuadRotorX.svg</file>
2727
<file alias="Airframe/Rover.svg">src/AutoPilotPlugins/Common/Images/Rover.svg</file>
28+
<file alias="Airframe/FreeFlyer.svg">src/AutoPilotPlugins/Common/Images/FreeFlyer.svg</file>
2829
<file alias="Airframe/Vectored6DofUUV.svg">src/AutoPilotPlugins/Common/Images/Vectored6DofUUV.svg</file>
2930
<file alias="Airframe/VTOLDuoRotorTailSitter.svg">src/AutoPilotPlugins/Common/Images/VTOLDuoRotorTailSitter.svg</file>
3031
<file alias="Airframe/VTOLPlane.svg">src/AutoPilotPlugins/Common/Images/VTOLPlane.svg</file>
Lines changed: 197 additions & 0 deletions
Loading

src/AutoPilotPlugins/PX4/AirframeComponent.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ SetupPage {
109109
text: (controller.currentVehicleName != "" ?
110110
qsTr("You've connected a %1.").arg(controller.currentVehicleName) :
111111
qsTr("Airframe is not set.")) +
112-
qsTr("To change this configuration, select the desired airframe below then click 'Apply and Restart'.")
112+
qsTr(" To change this configuration, select the desired airframe below then click 'Apply and Restart'.")
113113
font.bold: true
114114
wrapMode: Text.WordWrap
115115
}

src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,9 @@
372372
<type>VTOL Tiltrotor</type>
373373
</airframe>
374374
</airframe_group>
375+
<airframe_group name="Spacecraft" image="FreeFlyer">
376+
<airframe name="KTH ATMOS Free-flyer" id="70000" maintainer="DISCOWER">
377+
<class>Spacecraft</class>
378+
<type>Free-Flyer</type>
379+
</airframe>
375380
</airframes>

src/AutoPilotPlugins/PX4/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ qt_add_qml_module(AutoPilotPluginsPX4Module
7474
PX4TuningComponentPlaneAttitude.qml
7575
PX4TuningComponentPlaneRate.qml
7676
PX4TuningComponentPlaneTECS.qml
77+
PX4TuningComponentSpacecraft.qml
78+
PX4TuningComponentSpacecraftAll.qml
79+
PX4TuningComponentSpacecraftAttitude.qml
80+
PX4TuningComponentSpacecraftPosition.qml
81+
PX4TuningComponentSpacecraftRate.qml
82+
PX4TuningComponentSpacecraftVelocity.qml
7783
PX4TuningComponentVTOL.qml
7884
SafetyComponent.qml
7985
SafetyComponentSummary.qml

src/AutoPilotPlugins/PX4/PX4TuningComponent.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ QUrl PX4TuningComponent::setupSource(void) const
7373
case MAV_TYPE_VTOL_RESERVED5:
7474
qmlFile = "qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PX4TuningComponentVTOL.qml";
7575
break;
76+
case MAV_TYPE_SPACECRAFT_ORBITER:
77+
// Spacecraft Type
78+
qmlFile = "qrc:/qml/QGroundControl/AutoPilotPlugins/PX4/PX4TuningComponentSpacecraft.qml";
79+
break;
7680
default:
7781
break;
7882
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/****************************************************************************
2+
*
3+
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4+
*
5+
* QGroundControl is licensed according to the terms in the file
6+
* COPYING.md in the root of the source code directory.
7+
*
8+
****************************************************************************/
9+
10+
import QtQuick
11+
import QtQuick.Controls
12+
import QtQuick.Layouts
13+
14+
import QGroundControl
15+
import QGroundControl.Controls
16+
17+
SetupPage {
18+
id: tuningPage
19+
pageComponent: pageComponent
20+
21+
Component {
22+
id: pageComponent
23+
24+
PX4TuningComponentSpacecraftAll {
25+
}
26+
} // Component - pageComponent
27+
} // SetupPage
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/****************************************************************************
2+
*
3+
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4+
*
5+
* QGroundControl is licensed according to the terms in the file
6+
* COPYING.md in the root of the source code directory.
7+
*
8+
****************************************************************************/
9+
10+
import QtQuick
11+
import QtQuick.Controls
12+
import QtQuick.Layouts
13+
14+
import QGroundControl
15+
import QGroundControl.Controls
16+
import QGroundControl.ScreenTools
17+
18+
PX4TuningComponent {
19+
model: ListModel {
20+
ListElement {
21+
buttonText: qsTr("Rate Controller")
22+
tuningPage: "PX4TuningComponentSpacecraftRate.qml"
23+
}
24+
ListElement {
25+
buttonText: qsTr("Attitude Controller")
26+
tuningPage: "PX4TuningComponentSpacecraftAttitude.qml"
27+
}
28+
ListElement {
29+
buttonText: qsTr("Velocity Controller")
30+
tuningPage: "PX4TuningComponentSpacecraftVelocity.qml"
31+
}
32+
ListElement {
33+
buttonText: qsTr("Position Controller")
34+
tuningPage: "PX4TuningComponentSpacecraftPosition.qml"
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)