Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
86ee86a2
Commit
86ee86a2
authored
Apr 25, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3254 from tcanabrava/fix_airframe_info
Show a more educative airframe configuration
parents
94f96564
1093a65f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
2 deletions
+43
-2
APMAirframeComponentController.cc
src/AutoPilotPlugins/APM/APMAirframeComponentController.cc
+5
-0
APMAirframeComponentController.h
src/AutoPilotPlugins/APM/APMAirframeComponentController.h
+1
-0
APMAirframeComponentSummary.qml
src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
+2
-2
Vehicle.cc
src/Vehicle/Vehicle.cc
+34
-0
Vehicle.h
src/Vehicle/Vehicle.h
+1
-0
No files found.
src/AutoPilotPlugins/APM/APMAirframeComponentController.cc
View file @
86ee86a2
...
...
@@ -188,6 +188,11 @@ APMAirframeType *APMAirframeComponentController::currentAirframeType() const
return
_currentAirframeType
;
}
QString
APMAirframeComponentController
::
currentAirframeTypeName
()
const
{
return
_vehicle
->
vehicleTypeName
();
}
APMAirframe
*
APMAirframeComponentController
::
currentAirframe
()
const
{
return
_currentAirframe
;
...
...
src/AutoPilotPlugins/APM/APMAirframeComponentController.h
View file @
86ee86a2
...
...
@@ -70,6 +70,7 @@ signals:
public
slots
:
APMAirframeType
*
currentAirframeType
()
const
;
Q_INVOKABLE
QString
currentAirframeTypeName
()
const
;
APMAirframe
*
currentAirframe
()
const
;
void
setCurrentAirframeType
(
APMAirframeType
*
t
);
void
setCurrentAirframe
(
APMAirframe
*
t
);
...
...
src/AutoPilotPlugins/APM/APMAirframeComponentSummary.qml
View file @
86ee86a2
...
...
@@ -28,11 +28,11 @@ FactPanel {
VehicleSummaryRow
{
id
:
nameRow
;
labelText
:
qsTr
(
"
Frame Type:
"
)
valueText
:
sysIdFact
.
valueString
===
"
0
"
?
"
Plus
"
valueText
:
controller
.
currentAirframeTypeName
()
+
"
"
+
(
sysIdFact
.
valueString
===
"
0
"
?
"
Plus
"
:
sysIdFact
.
valueString
===
"
1
"
?
"
X
"
:
sysIdFact
.
valueString
===
"
2
"
?
"
V
"
:
sysIdFact
.
valueString
==
"
3
"
?
"
H
"
:
/* Fact.value == 10 */
"
New Y6
"
;
:
/* Fact.value == 10 */
"
New Y6
"
)
;
}
}
...
...
src/Vehicle/Vehicle.cc
View file @
86ee86a2
...
...
@@ -1420,6 +1420,40 @@ void Vehicle::_setCoordinateValid(bool coordinateValid)
}
}
QString
Vehicle
::
vehicleTypeName
()
const
{
static
QMap
<
int
,
QString
>
typeNames
=
{
{
MAV_TYPE_GENERIC
,
tr
(
"Generic micro air vehicle"
)},
{
MAV_TYPE_FIXED_WING
,
tr
(
"Fixed wing aircraft"
)},
{
MAV_TYPE_QUADROTOR
,
tr
(
"Quadrotor"
)},
{
MAV_TYPE_COAXIAL
,
tr
(
"Coaxial helicopter"
)},
{
MAV_TYPE_HELICOPTER
,
tr
(
"Normal helicopter with tail rotor."
)},
{
MAV_TYPE_ANTENNA_TRACKER
,
tr
(
"Ground installation"
)},
{
MAV_TYPE_GCS
,
tr
(
"Operator control unit / ground control station"
)},
{
MAV_TYPE_AIRSHIP
,
tr
(
"Airship, controlled"
)},
{
MAV_TYPE_FREE_BALLOON
,
tr
(
"Free balloon, uncontrolled"
)},
{
MAV_TYPE_ROCKET
,
tr
(
"Rocket"
)},
{
MAV_TYPE_GROUND_ROVER
,
tr
(
"Ground rover"
)},
{
MAV_TYPE_SURFACE_BOAT
,
tr
(
"Surface vessel, boat, ship"
)},
{
MAV_TYPE_SUBMARINE
,
tr
(
"Submarine"
)},
{
MAV_TYPE_HEXAROTOR
,
tr
(
"Hexarotor"
)},
{
MAV_TYPE_OCTOROTOR
,
tr
(
"Octorotor"
)},
{
MAV_TYPE_TRICOPTER
,
tr
(
"Octorotor"
)},
{
MAV_TYPE_FLAPPING_WING
,
tr
(
"Flapping wing"
)},
{
MAV_TYPE_KITE
,
tr
(
"Flapping wing"
)},
{
MAV_TYPE_ONBOARD_CONTROLLER
,
tr
(
"Onboard companion controller"
)},
{
MAV_TYPE_VTOL_DUOROTOR
,
tr
(
"Two-rotor VTOL using control surfaces in vertical operation in addition. Tailsitter"
)},
{
MAV_TYPE_VTOL_QUADROTOR
,
tr
(
"Quad-rotor VTOL using a V-shaped quad config in vertical operation. Tailsitter"
)},
{
MAV_TYPE_VTOL_TILTROTOR
,
tr
(
"Tiltrotor VTOL"
)},
{
MAV_TYPE_VTOL_RESERVED2
,
tr
(
"VTOL reserved 2"
)},
{
MAV_TYPE_VTOL_RESERVED3
,
tr
(
"VTOL reserved 3"
)},
{
MAV_TYPE_VTOL_RESERVED4
,
tr
(
"VTOL reserved 4"
)},
{
MAV_TYPE_VTOL_RESERVED5
,
tr
(
"VTOL reserved 5"
)},
{
MAV_TYPE_GIMBAL
,
tr
(
"Onboard gimbal"
)},
{
MAV_TYPE_ADSB
,
tr
(
"Onboard ADSB peripheral"
)},
};
return
typeNames
[
_vehicleType
];
}
/// Returns the string to speak to identify the vehicle
QString
Vehicle
::
_vehicleIdSpeech
(
void
)
{
...
...
src/Vehicle/Vehicle.h
View file @
86ee86a2
...
...
@@ -395,6 +395,7 @@ public:
int
id
(
void
)
{
return
_id
;
}
MAV_AUTOPILOT
firmwareType
(
void
)
const
{
return
_firmwareType
;
}
MAV_TYPE
vehicleType
(
void
)
const
{
return
_vehicleType
;
}
Q_INVOKABLE
QString
vehicleTypeName
(
void
)
const
;
/// Returns the highest quality link available to the Vehicle
LinkInterface
*
priorityLink
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment