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
f4f20bb0
Unverified
Commit
f4f20bb0
authored
Jan 03, 2018
by
Don Gagne
Committed by
GitHub
Jan 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5956 from DonLakeFlyer/VTOLTransition
Support VTOL transition
parents
260f0778
1ed69ecd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
91 additions
and
1 deletion
+91
-1
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+1
-0
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+21
-0
ValuePageWidget.qml
src/FlightMap/Widgets/ValuePageWidget.qml
+3
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+14
-0
Vehicle.h
src/Vehicle/Vehicle.h
+6
-1
MainWindowInner.qml
src/ui/MainWindowInner.qml
+2
-0
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+2
-0
VTOLModeIndicator.qml
src/ui/toolbar/VTOLModeIndicator.qml
+41
-0
No files found.
qgroundcontrol.qrc
View file @
f4f20bb0
...
...
@@ -9,6 +9,7 @@
<file alias="GPSRTKIndicator.qml">src/ui/toolbar/GPSRTKIndicator.qml</file>
<file alias="MessageIndicator.qml">src/ui/toolbar/MessageIndicator.qml</file>
<file alias="ModeIndicator.qml">src/ui/toolbar/ModeIndicator.qml</file>
<file alias="VTOLModeIndicator.qml">src/ui/toolbar/VTOLModeIndicator.qml</file>
<file alias="RCRSSIIndicator.qml">src/ui/toolbar/RCRSSIIndicator.qml</file>
<file alias="TelemetryRSSIIndicator.qml">src/ui/toolbar/TelemetryRSSIIndicator.qml</file>
<file alias="JoystickIndicator.qml">src/ui/toolbar/JoystickIndicator.qml</file>
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
f4f20bb0
...
...
@@ -335,6 +335,7 @@ const QVariantList &FirmwarePlugin::toolBarIndicators(const Vehicle* vehicle)
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/RCRSSIIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/BatteryIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ModeIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/VTOLModeIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/ArmedIndicator.qml"
)));
_toolBarIndicatorList
.
append
(
QVariant
::
fromValue
(
QUrl
::
fromUserInput
(
"qrc:/toolbar/GPSRTKIndicator.qml"
)));
}
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
f4f20bb0
...
...
@@ -48,6 +48,7 @@ Item {
readonly
property
string
landAbortTitle
:
qsTr
(
"
Land Abort
"
)
readonly
property
string
setWaypointTitle
:
qsTr
(
"
Set Waypoint
"
)
readonly
property
string
gotoTitle
:
qsTr
(
"
Goto Location
"
)
readonly
property
string
vtolTransitionTitle
:
qsTr
(
"
VTOL Transition
"
)
readonly
property
string
armMessage
:
qsTr
(
"
Arm the vehicle.
"
)
readonly
property
string
disarmMessage
:
qsTr
(
"
Disarm the vehicle
"
)
...
...
@@ -67,6 +68,8 @@ Item {
readonly
property
string
landAbortMessage
:
qsTr
(
"
Abort the landing sequence.
"
)
readonly
property
string
pauseMessage
:
qsTr
(
"
Pause the vehicle at it's current position.
"
)
readonly
property
string
mvPauseMessage
:
qsTr
(
"
Pause all vehicles at their current position.
"
)
readonly
property
string
vtolTransitionFwdMessage
:
qsTr
(
"
Transition VTOL to fixed wing flight.
"
)
readonly
property
string
vtolTransitionMRMessage
:
qsTr
(
"
Transition VTOL to multi-rotor flight.
"
)
readonly
property
int
actionRTL
:
1
readonly
property
int
actionLand
:
2
...
...
@@ -87,6 +90,8 @@ Item {
readonly
property
int
actionPause
:
17
readonly
property
int
actionMVPause
:
18
readonly
property
int
actionMVStartMission
:
19
readonly
property
int
actionVtolTransitionToFwdFlight
:
20
readonly
property
int
actionVtolTransitionToMRFlight
:
21
property
bool
showEmergenyStop
:
!
_hideEmergenyStop
&&
_activeVehicle
&&
_vehicleArmed
&&
_vehicleFlying
property
bool
showArm
:
_activeVehicle
&&
!
_vehicleArmed
...
...
@@ -287,6 +292,16 @@ Item {
confirmDialog
.
message
=
mvPauseMessage
confirmDialog
.
hideTrigger
=
true
break
;
case
actionVtolTransitionToFwdFlight
:
confirmDialog
.
title
=
vtolTransitionTitle
confirmDialog
.
message
=
vtolTransitionFwdMessage
confirmDialog
.
hideTrigger
=
true
break
case
actionVtolTransitionToMRFlight
:
confirmDialog
.
title
=
vtolTransitionTitle
confirmDialog
.
message
=
vtolTransitionMRMessage
confirmDialog
.
hideTrigger
=
true
break
default
:
console
.
warn
(
"
Unknown actionCode
"
,
actionCode
)
return
...
...
@@ -359,6 +374,12 @@ Item {
vehicle
.
pauseVehicle
()
}
break
case
actionVtolTransitionToFwdFlight
:
_activeVehicle
.
vtolInFwdFlight
=
true
break
case
actionVtolTransitionToMRFlight
:
_activeVehicle
.
vtolInFwdFlight
=
false
break
default
:
console
.
warn
(
qsTr
(
"
Internal error: unknown actionCode
"
),
actionCode
)
break
...
...
src/FlightMap/Widgets/ValuePageWidget.qml
View file @
f4f20bb0
...
...
@@ -144,6 +144,8 @@ Column {
anchors.right
:
parent
.
right
spacing
:
_margins
/*
Leaving this here for now just in case
FactCheckBox {
text: qsTr("Show large compass")
fact: _showLargeCompass
...
...
@@ -151,6 +153,7 @@ Column {
property Fact _showLargeCompass: QGroundControl.settingsManager.appSettings.showLargeCompass
}
*/
Item
{
width
:
1
...
...
src/Vehicle/Vehicle.cc
View file @
f4f20bb0
...
...
@@ -108,6 +108,7 @@ Vehicle::Vehicle(LinkInterface* link,
,
_autoDisconnect
(
false
)
,
_flying
(
false
)
,
_landing
(
false
)
,
_vtolInFwdFlight
(
false
)
,
_onboardControlSensorsPresent
(
0
)
,
_onboardControlSensorsEnabled
(
0
)
,
_onboardControlSensorsHealth
(
0
)
...
...
@@ -292,6 +293,7 @@ Vehicle::Vehicle(MAV_AUTOPILOT firmwareType,
,
_autoDisconnect
(
false
)
,
_flying
(
false
)
,
_landing
(
false
)
,
_vtolInFwdFlight
(
false
)
,
_onboardControlSensorsPresent
(
0
)
,
_onboardControlSensorsEnabled
(
0
)
,
_onboardControlSensorsHealth
(
0
)
...
...
@@ -990,6 +992,10 @@ void Vehicle::_handleExtendedSysState(mavlink_message_t& message)
default:
break
;
}
if
(
vtol
())
{
setVtolInFwdFlight
(
extendedState
.
vtol_state
==
MAV_VTOL_STATE_FW
);
}
}
void
Vehicle
::
_handleVibration
(
mavlink_message_t
&
message
)
...
...
@@ -2679,6 +2685,14 @@ void Vehicle::triggerCamera(void)
1.0
);
// test shot flag
}
void
Vehicle
::
setVtolInFwdFlight
(
bool
vtolInFwdFlight
)
{
if
(
_vtolInFwdFlight
!=
vtolInFwdFlight
)
{
_vtolInFwdFlight
=
vtolInFwdFlight
;
emit
vtolInFwdFlightChanged
(
vtolInFwdFlight
);
}
}
const
char
*
VehicleGPSFactGroup
::
_latFactName
=
"lat"
;
const
char
*
VehicleGPSFactGroup
::
_lonFactName
=
"lon"
;
const
char
*
VehicleGPSFactGroup
::
_hdopFactName
=
"hdop"
;
...
...
src/Vehicle/Vehicle.h
View file @
f4f20bb0
...
...
@@ -351,6 +351,7 @@ public:
Q_PROPERTY
(
QVariantList
staticCameraList
READ
staticCameraList
CONSTANT
)
Q_PROPERTY
(
QGCCameraManager
*
dynamicCameras
READ
dynamicCameras
NOTIFY
dynamicCamerasChanged
)
Q_PROPERTY
(
QString
hobbsMeter
READ
hobbsMeter
NOTIFY
hobbsMeterChanged
)
Q_PROPERTY
(
bool
vtolInFwdFlight
READ
vtolInFwdFlight
WRITE
setVtolInFwdFlight
NOTIFY
vtolInFwdFlightChanged
)
// Vehicle state used for guided control
Q_PROPERTY
(
bool
flying
READ
flying
NOTIFY
flyingChanged
)
///< Vehicle is flying
...
...
@@ -359,7 +360,7 @@ public:
Q_PROPERTY
(
bool
guidedModeSupported
READ
guidedModeSupported
CONSTANT
)
///< Guided mode commands are supported by this vehicle
Q_PROPERTY
(
bool
pauseVehicleSupported
READ
pauseVehicleSupported
CONSTANT
)
///< Pause vehicle command is supported
Q_PROPERTY
(
bool
orbitModeSupported
READ
orbitModeSupported
CONSTANT
)
///< Orbit mode is supported by this vehicle
Q_PROPERTY
(
bool
takeoffVehicleSupported
READ
takeoffVehicleSupported
CONSTANT
)
///< Guided takeoff supported
Q_PROPERTY
(
bool
takeoffVehicleSupported
READ
takeoffVehicleSupported
CONSTANT
)
///< Guided takeoff supported
Q_PROPERTY
(
ParameterManager
*
parameterManager
READ
parameterManager
CONSTANT
)
...
...
@@ -610,6 +611,7 @@ public:
bool
flying
()
const
{
return
_flying
;
}
bool
landing
()
const
{
return
_landing
;
}
bool
guidedMode
()
const
;
bool
vtolInFwdFlight
()
const
{
return
_vtolInFwdFlight
;
}
uint8_t
baseMode
()
const
{
return
_base_mode
;
}
uint32_t
customMode
()
const
{
return
_custom_mode
;
}
bool
isOfflineEditingVehicle
()
const
{
return
_offlineEditingVehicle
;
}
...
...
@@ -741,6 +743,7 @@ public:
void
_setFlying
(
bool
flying
);
void
_setLanding
(
bool
landing
);
void
setVtolInFwdFlight
(
bool
vtolInFwdFlight
);
void
_setHomePosition
(
QGeoCoordinate
&
homeCoord
);
void
_setMaxProtoVersion
(
unsigned
version
);
...
...
@@ -766,6 +769,7 @@ signals:
void
flyingChanged
(
bool
flying
);
void
landingChanged
(
bool
landing
);
void
guidedModeChanged
(
bool
guidedMode
);
void
vtolInFwdFlightChanged
(
bool
vtolInFwdFlight
);
void
prearmErrorChanged
(
const
QString
&
prearmError
);
void
soloFirmwareChanged
(
bool
soloFirmware
);
void
unhealthySensorsChanged
(
void
);
...
...
@@ -969,6 +973,7 @@ private:
bool
_autoDisconnect
;
///< true: Automatically disconnect vehicle when last connection goes away or lost heartbeat
bool
_flying
;
bool
_landing
;
bool
_vtolInFwdFlight
;
uint32_t
_onboardControlSensorsPresent
;
uint32_t
_onboardControlSensorsEnabled
;
uint32_t
_onboardControlSensorsHealth
;
...
...
src/ui/MainWindowInner.qml
View file @
f4f20bb0
...
...
@@ -292,6 +292,8 @@ Item {
flightView
.
guidedController
.
confirmAction
(
flightView
.
guidedController
.
actionDisarm
)
}
}
onVtolTransitionToFwdFlight
:
flightView
.
guidedController
.
confirmAction
(
flightView
.
guidedController
.
actionVtolTransitionToFwdFlight
)
onVtolTransitionToMRFlight
:
flightView
.
guidedController
.
confirmAction
(
flightView
.
guidedController
.
actionVtolTransitionToMRFlight
)
//-- Entire tool bar area disable on cammand
MouseArea
{
...
...
src/ui/toolbar/MainToolBar.qml
View file @
f4f20bb0
...
...
@@ -34,6 +34,8 @@ Rectangle {
signal
showAnalyzeView
signal
armVehicle
signal
disarmVehicle
signal
vtolTransitionToFwdFlight
signal
vtolTransitionToMRFlight
function
checkSettingsButton
()
{
settingsButton
.
checked
=
true
...
...
src/ui/toolbar/VTOLModeIndicator.qml
0 → 100644
View file @
f4f20bb0
/****************************************************************************
*
* (c) 2009-2016 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.
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
//-------------------------------------------------------------------------
//-- VTOL Mode Indicator
QGCLabel
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
verticalAlignment
:
Text
.
AlignVCenter
text
:
_fwdFlight
?
qsTr
(
"
VTOL: Fixed Wing
"
)
:
qsTr
(
"
VTOL: Multi-Rotor
"
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
color
:
qgcPal
.
buttonText
visible
:
_activeVehicle
?
_activeVehicle
.
vtol
&&
_activeVehicle
.
px4Firmware
:
false
width
:
visible
?
implicitWidth
:
0
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_fwdFlight
:
_activeVehicle
?
_activeVehicle
.
vtolInFwdFlight
:
false
QGCPalette
{
id
:
qgcPal
}
QGCMouseArea
{
fillItem
:
parent
onClicked
:
_activeVehicle
.
vtolInFwdFlight
?
toolBar
.
vtolTransitionToMRFlight
()
:
toolBar
.
vtolTransitionToFwdFlight
()
}
}
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