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
bfe6d609
Commit
bfe6d609
authored
Aug 19, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flight speed signaling to update further mission items
parent
ee83b76b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
10 deletions
+31
-10
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/MissionManager/CameraSection.cc
View file @
bfe6d609
...
@@ -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 @
bfe6d609
...
@@ -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 @
bfe6d609
...
@@ -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 @
bfe6d609
...
@@ -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 @
bfe6d609
...
@@ -40,6 +40,9 @@ SpeedSection::SpeedSection(Vehicle* vehicle, QObject* parent)
...
@@ -40,6 +40,9 @@ SpeedSection::SpeedSection(Vehicle* vehicle, QObject* parent)
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 @
bfe6d609
...
@@ -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