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
2449895c
Commit
2449895c
authored
Aug 20, 2017
by
Don Gagne
Committed by
GitHub
Aug 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5595 from DonLakeFlyer/Fixes
Flight Speed changes were not flowing through rest of mission items
parents
ee83b76b
01a49a4c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
16 deletions
+48
-16
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+17
-6
CameraSection.cc
src/MissionManager/CameraSection.cc
+1
-0
CameraSection.h
src/MissionManager/CameraSection.h
+1
-0
MissionSettingsItem.cc
src/MissionManager/MissionSettingsItem.cc
+1
-1
SimpleMissionItem.cc
src/MissionManager/SimpleMissionItem.cc
+3
-5
SpeedSection.cc
src/MissionManager/SpeedSection.cc
+17
-2
SpeedSection.h
src/MissionManager/SpeedSection.h
+8
-2
No files found.
src/FlightDisplay/GuidedActionsController.qml
View file @
2449895c
...
@@ -125,8 +125,7 @@ Item {
...
@@ -125,8 +125,7 @@ Item {
property
bool
__pauseVehicleSupported
:
_activeVehicle
?
_activeVehicle
.
pauseVehicleSupported
:
false
property
bool
__pauseVehicleSupported
:
_activeVehicle
?
_activeVehicle
.
pauseVehicleSupported
:
false
property
bool
__flightMode
:
_flightMode
property
bool
__flightMode
:
_flightMode
/*
// Hack debugging code
Leaving this code in for use while debugging
function
_outputState
()
{
function
_outputState
()
{
console
.
log
(
qsTr
(
"
_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleInRTLMode(%5) pauseVehicleSupported(%6) _vehiclePaused(%7) _flightMode(%8)
"
).
arg
(
_activeVehicle
?
1
:
0
).
arg
(
_vehicleArmed
?
1
:
0
).
arg
(
__guidedModeSupported
?
1
:
0
).
arg
(
_vehicleFlying
?
1
:
0
).
arg
(
_vehicleInRTLMode
?
1
:
0
).
arg
(
__pauseVehicleSupported
?
1
:
0
).
arg
(
_vehiclePaused
?
1
:
0
).
arg
(
_flightMode
))
console
.
log
(
qsTr
(
"
_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleInRTLMode(%5) pauseVehicleSupported(%6) _vehiclePaused(%7) _flightMode(%8)
"
).
arg
(
_activeVehicle
?
1
:
0
).
arg
(
_vehicleArmed
?
1
:
0
).
arg
(
__guidedModeSupported
?
1
:
0
).
arg
(
_vehicleFlying
?
1
:
0
).
arg
(
_vehicleInRTLMode
?
1
:
0
).
arg
(
__pauseVehicleSupported
?
1
:
0
).
arg
(
_vehiclePaused
?
1
:
0
).
arg
(
_flightMode
))
}
}
...
@@ -140,11 +139,25 @@ Item {
...
@@ -140,11 +139,25 @@ Item {
on__GuidedModeSupportedChanged
:
_outputState
()
on__GuidedModeSupportedChanged
:
_outputState
()
on__PauseVehicleSupportedChanged
:
_outputState
()
on__PauseVehicleSupportedChanged
:
_outputState
()
on_CurrentMissionIndexChanged
:
console
.
log
(
"
_currentMissionIndex
"
,
_currentMissionIndex
)
on_ResumeMissionIndexChanged
:
console
.
log
(
"
_resumeMissionIndex
"
,
_resumeMissionIndex
)
onShowResumeMissionChanged
:
{
console
.
log
(
"
showResumeMission
"
,
showResumeMission
)
_outputState
()
}
onShowStartMissionChanged
:
{
console
.
log
(
"
showStartMission
"
,
showStartMission
)
_outputState
()
}
onShowContinueMissionChanged
:
{
console
.
log
(
"
showContinueMission
"
,
showContinueMission
)
_outputState
()
}
// End of hack
// End of hack
*/
on_VehicleFlyingChanged
:
{
on_VehicleFlyingChanged
:
{
//
_outputState()
_outputState
()
if
(
!
_vehicleFlying
)
{
if
(
!
_vehicleFlying
)
{
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
...
@@ -153,8 +166,6 @@ Item {
...
@@ -153,8 +166,6 @@ Item {
}
}
property
var
_actionData
property
var
_actionData
on_CurrentMissionIndexChanged
:
console
.
log
(
"
_currentMissionIndex
"
,
_currentMissionIndex
)
on_FlightModeChanged
:
{
on_FlightModeChanged
:
{
_vehiclePaused
=
_flightMode
===
_activeVehicle
.
pauseFlightMode
_vehiclePaused
=
_flightMode
===
_activeVehicle
.
pauseFlightMode
_vehicleInRTLMode
=
_flightMode
===
_activeVehicle
.
rtlFlightMode
_vehicleInRTLMode
=
_flightMode
===
_activeVehicle
.
rtlFlightMode
...
...
src/MissionManager/CameraSection.cc
View file @
2449895c
...
@@ -67,6 +67,7 @@ CameraSection::CameraSection(Vehicle* vehicle, QObject* parent)
...
@@ -67,6 +67,7 @@ CameraSection::CameraSection(Vehicle* vehicle, QObject* parent)
connect
(
this
,
&
CameraSection
::
specifyGimbalChanged
,
this
,
&
CameraSection
::
_setDirty
);
connect
(
this
,
&
CameraSection
::
specifyGimbalChanged
,
this
,
&
CameraSection
::
_setDirty
);
connect
(
this
,
&
CameraSection
::
specifyCameraModeChanged
,
this
,
&
CameraSection
::
_setDirty
);
connect
(
this
,
&
CameraSection
::
specifyCameraModeChanged
,
this
,
&
CameraSection
::
_setDirty
);
connect
(
this
,
&
CameraSection
::
specifyGimbalChanged
,
this
,
&
CameraSection
::
_updateSpecifiedGimbalYaw
);
connect
(
&
_gimbalYawFact
,
&
Fact
::
valueChanged
,
this
,
&
CameraSection
::
_updateSpecifiedGimbalYaw
);
connect
(
&
_gimbalYawFact
,
&
Fact
::
valueChanged
,
this
,
&
CameraSection
::
_updateSpecifiedGimbalYaw
);
}
}
...
...
src/MissionManager/CameraSection.h
View file @
2449895c
...
@@ -63,6 +63,7 @@ public:
...
@@ -63,6 +63,7 @@ public:
void
setSpecifyGimbal
(
bool
specifyGimbal
);
void
setSpecifyGimbal
(
bool
specifyGimbal
);
void
setSpecifyCameraMode
(
bool
specifyCameraMode
);
void
setSpecifyCameraMode
(
bool
specifyCameraMode
);
///< Signals specifiedGimbalYawChanged
///< @return The gimbal yaw specified by this item, NaN if not specified
///< @return The gimbal yaw specified by this item, NaN if not specified
double
specifiedGimbalYaw
(
void
)
const
;
double
specifiedGimbalYaw
(
void
)
const
;
...
...
src/MissionManager/MissionSettingsItem.cc
View file @
2449895c
...
@@ -61,8 +61,8 @@ MissionSettingsItem::MissionSettingsItem(Vehicle* vehicle, QObject* parent)
...
@@ -61,8 +61,8 @@ MissionSettingsItem::MissionSettingsItem(Vehicle* vehicle, QObject* parent)
connect
(
&
_cameraSection
,
&
CameraSection
::
dirtyChanged
,
this
,
&
MissionSettingsItem
::
_sectionDirtyChanged
);
connect
(
&
_cameraSection
,
&
CameraSection
::
dirtyChanged
,
this
,
&
MissionSettingsItem
::
_sectionDirtyChanged
);
connect
(
&
_speedSection
,
&
SpeedSection
::
dirtyChanged
,
this
,
&
MissionSettingsItem
::
_sectionDirtyChanged
);
connect
(
&
_speedSection
,
&
SpeedSection
::
dirtyChanged
,
this
,
&
MissionSettingsItem
::
_sectionDirtyChanged
);
connect
(
&
_cameraSection
,
&
CameraSection
::
specifyGimbalChanged
,
this
,
&
MissionSettingsItem
::
specifiedGimbalYawChanged
);
connect
(
&
_cameraSection
,
&
CameraSection
::
specifiedGimbalYawChanged
,
this
,
&
MissionSettingsItem
::
specifiedGimbalYawChanged
);
connect
(
&
_cameraSection
,
&
CameraSection
::
specifiedGimbalYawChanged
,
this
,
&
MissionSettingsItem
::
specifiedGimbalYawChanged
);
connect
(
&
_speedSection
,
&
SpeedSection
::
specifiedFlightSpeedChanged
,
this
,
&
MissionSettingsItem
::
specifiedFlightSpeedChanged
);
}
}
...
...
src/MissionManager/SimpleMissionItem.cc
View file @
2449895c
...
@@ -755,13 +755,11 @@ void SimpleMissionItem::_updateOptionalSections(void)
...
@@ -755,13 +755,11 @@ void SimpleMissionItem::_updateOptionalSections(void)
connect
(
_cameraSection
,
&
CameraSection
::
dirtyChanged
,
this
,
&
SimpleMissionItem
::
_sectionDirtyChanged
);
connect
(
_cameraSection
,
&
CameraSection
::
dirtyChanged
,
this
,
&
SimpleMissionItem
::
_sectionDirtyChanged
);
connect
(
_cameraSection
,
&
CameraSection
::
itemCountChanged
,
this
,
&
SimpleMissionItem
::
_updateLastSequenceNumber
);
connect
(
_cameraSection
,
&
CameraSection
::
itemCountChanged
,
this
,
&
SimpleMissionItem
::
_updateLastSequenceNumber
);
connect
(
_cameraSection
,
&
CameraSection
::
availableChanged
,
this
,
&
SimpleMissionItem
::
specifiedGimbalYawChanged
);
connect
(
_cameraSection
,
&
CameraSection
::
availableChanged
,
this
,
&
SimpleMissionItem
::
specifiedGimbalYawChanged
);
connect
(
_cameraSection
,
&
CameraSection
::
specifyGimbalChanged
,
this
,
&
SimpleMissionItem
::
specifiedGimbalYawChanged
);
connect
(
_cameraSection
,
&
CameraSection
::
specifiedGimbalYawChanged
,
this
,
&
SimpleMissionItem
::
specifiedGimbalYawChanged
);
connect
(
_cameraSection
,
&
CameraSection
::
specifiedGimbalYawChanged
,
this
,
&
SimpleMissionItem
::
specifiedGimbalYawChanged
);
connect
(
_speedSection
,
&
SpeedSection
::
dirtyChanged
,
this
,
&
SimpleMissionItem
::
_sectionDirtyChanged
);
connect
(
_speedSection
,
&
SpeedSection
::
dirtyChanged
,
this
,
&
SimpleMissionItem
::
_sectionDirtyChanged
);
connect
(
_speedSection
,
&
SpeedSection
::
itemCountChanged
,
this
,
&
SimpleMissionItem
::
_updateLastSequenceNumber
);
connect
(
_speedSection
,
&
SpeedSection
::
itemCountChanged
,
this
,
&
SimpleMissionItem
::
_updateLastSequenceNumber
);
connect
(
_speedSection
,
&
SpeedSection
::
specifyFlightSpeedChanged
,
this
,
&
SimpleMissionItem
::
specifiedFlightSpeedChanged
);
connect
(
_speedSection
,
&
SpeedSection
::
specifiedFlightSpeedChanged
,
this
,
&
SimpleMissionItem
::
specifiedFlightSpeedChanged
);
connect
(
_speedSection
->
flightSpeed
(),
&
Fact
::
rawValueChanged
,
this
,
&
SimpleMissionItem
::
specifiedFlightSpeedChanged
);
emit
cameraSectionChanged
(
_cameraSection
);
emit
cameraSectionChanged
(
_cameraSection
);
emit
speedSectionChanged
(
_speedSection
);
emit
speedSectionChanged
(
_speedSection
);
...
...
src/MissionManager/SpeedSection.cc
View file @
2449895c
...
@@ -38,8 +38,11 @@ SpeedSection::SpeedSection(Vehicle* vehicle, QObject* parent)
...
@@ -38,8 +38,11 @@ SpeedSection::SpeedSection(Vehicle* vehicle, QObject* parent)
_flightSpeedFact
.
setMetaData
(
_metaDataMap
[
_flightSpeedName
]);
_flightSpeedFact
.
setMetaData
(
_metaDataMap
[
_flightSpeedName
]);
_flightSpeedFact
.
setRawValue
(
flightSpeed
);
_flightSpeedFact
.
setRawValue
(
flightSpeed
);
connect
(
this
,
&
SpeedSection
::
specifyFlightSpeedChanged
,
this
,
&
SpeedSection
::
settingsSpecifiedChanged
);
connect
(
this
,
&
SpeedSection
::
specifyFlightSpeedChanged
,
this
,
&
SpeedSection
::
settingsSpecifiedChanged
);
connect
(
&
_flightSpeedFact
,
&
Fact
::
valueChanged
,
this
,
&
SpeedSection
::
_setDirty
);
connect
(
&
_flightSpeedFact
,
&
Fact
::
valueChanged
,
this
,
&
SpeedSection
::
_setDirty
);
connect
(
this
,
&
SpeedSection
::
specifyFlightSpeedChanged
,
this
,
&
SpeedSection
::
_updateSpecifiedFlightSpeed
);
connect
(
&
_flightSpeedFact
,
&
Fact
::
valueChanged
,
this
,
&
SpeedSection
::
_updateSpecifiedFlightSpeed
);
}
}
bool
SpeedSection
::
settingsSpecified
(
void
)
const
bool
SpeedSection
::
settingsSpecified
(
void
)
const
...
@@ -134,3 +137,15 @@ bool SpeedSection::scanForSection(QmlObjectListModel* visualItems, int scanIndex
...
@@ -134,3 +137,15 @@ bool SpeedSection::scanForSection(QmlObjectListModel* visualItems, int scanIndex
return
false
;
return
false
;
}
}
double
SpeedSection
::
specifiedFlightSpeed
(
void
)
const
{
return
_specifyFlightSpeed
?
_flightSpeedFact
.
rawValue
().
toDouble
()
:
std
::
numeric_limits
<
double
>::
quiet_NaN
();
}
void
SpeedSection
::
_updateSpecifiedFlightSpeed
(
void
)
{
emit
specifiedFlightSpeedChanged
(
specifiedFlightSpeed
());
}
src/MissionManager/SpeedSection.h
View file @
2449895c
...
@@ -27,6 +27,10 @@ public:
...
@@ -27,6 +27,10 @@ public:
Fact
*
flightSpeed
(
void
)
{
return
&
_flightSpeedFact
;
}
Fact
*
flightSpeed
(
void
)
{
return
&
_flightSpeedFact
;
}
void
setSpecifyFlightSpeed
(
bool
specifyFlightSpeed
);
void
setSpecifyFlightSpeed
(
bool
specifyFlightSpeed
);
///< Signals specifiedFlightSpeedChanged
///< @return The flight speed specified by this item, NaN if not specified
double
specifiedFlightSpeed
(
void
)
const
;
// Overrides from Section
// Overrides from Section
bool
available
(
void
)
const
override
{
return
_available
;
}
bool
available
(
void
)
const
override
{
return
_available
;
}
bool
dirty
(
void
)
const
override
{
return
_dirty
;
}
bool
dirty
(
void
)
const
override
{
return
_dirty
;
}
...
@@ -38,10 +42,12 @@ public:
...
@@ -38,10 +42,12 @@ public:
bool
settingsSpecified
(
void
)
const
override
;
bool
settingsSpecified
(
void
)
const
override
;
signals:
signals:
void
specifyFlightSpeedChanged
(
bool
specifyFlightSpeed
);
void
specifyFlightSpeedChanged
(
bool
specifyFlightSpeed
);
void
specifiedFlightSpeedChanged
(
double
flightSpeed
);
private
slots
:
private
slots
:
void
_setDirty
(
void
);
void
_setDirty
(
void
);
void
_updateSpecifiedFlightSpeed
(
void
);
private:
private:
bool
_available
;
bool
_available
;
...
...
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