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
db7cdddd
Commit
db7cdddd
authored
Sep 22, 2019
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
1c2e8fe9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+15
-1
Vehicle.h
src/Vehicle/Vehicle.h
+3
-0
No files found.
src/Vehicle/Vehicle.cc
View file @
db7cdddd
...
...
@@ -449,7 +449,6 @@ void Vehicle::_commonInit(void)
connect
(
this
,
&
Vehicle
::
homePositionChanged
,
this
,
&
Vehicle
::
_updateDistanceHeadingToHome
);
connect
(
this
,
&
Vehicle
::
hobbsMeterChanged
,
this
,
&
Vehicle
::
_updateHobbsMeter
);
connect
(
_toolbox
->
qgcPositionManager
(),
&
QGCPositionManager
::
gcsPositionChanged
,
this
,
&
Vehicle
::
_updateDistanceToGCS
);
_missionManager
=
new
MissionManager
(
this
);
...
...
@@ -525,6 +524,9 @@ void Vehicle::_commonInit(void)
_flightDistanceFact
.
setRawValue
(
0
);
_flightTimeFact
.
setRawValue
(
0
);
_flightTimeUpdater
.
setInterval
(
1000
);
_flightTimeUpdater
.
setSingleShot
(
false
);
connect
(
&
_flightTimeUpdater
,
&
QTimer
::
timeout
,
this
,
&
Vehicle
::
_updateFlightTime
);
// Set video stream to udp if running ArduSub and Video is disabled
if
(
sub
()
&&
_settingsManager
->
videoSettings
()
->
videoSource
()
->
rawValue
()
==
VideoSettings
::
videoDisabled
)
{
...
...
@@ -1667,6 +1669,7 @@ void Vehicle::_updateArmed(bool armed)
_clearCameraTriggerPoints
();
}
else
{
_trajectoryPoints
->
stop
();
_flightTimerStop
();
// Also handle Video Streaming
if
(
qgcApp
()
->
toolbox
()
->
videoManager
()
->
videoReceiver
())
{
if
(
_settingsManager
->
videoSettings
()
->
disableWhenDisarmed
()
->
rawValue
().
toBool
())
{
...
...
@@ -2560,10 +2563,21 @@ void Vehicle::_clearCameraTriggerPoints(void)
void
Vehicle
::
_flightTimerStart
(
void
)
{
_flightTimer
.
start
();
_flightTimeUpdater
.
start
();
_flightDistanceFact
.
setRawValue
(
0
);
_flightTimeFact
.
setRawValue
(
0
);
}
void
Vehicle
::
_flightTimerStop
(
void
)
{
_flightTimeUpdater
.
stop
();
}
void
Vehicle
::
_updateFlightTime
(
void
)
{
_flightTimeFact
.
setRawValue
((
double
)
_flightTimer
.
elapsed
()
/
1000.0
);
}
void
Vehicle
::
_startPlanRequest
(
void
)
{
if
(
_missionManagerInitialRequestSent
)
{
...
...
src/Vehicle/Vehicle.h
View file @
db7cdddd
...
...
@@ -1258,6 +1258,7 @@ private slots:
void
_adsbTimerTimeout
();
void
_orbitTelemetryTimeout
(
void
);
void
_protocolVersionTimeOut
(
void
);
void
_updateFlightTime
(
void
);
private:
bool
_containsLink
(
LinkInterface
*
link
);
...
...
@@ -1331,6 +1332,7 @@ private:
void
_initializeCsv
();
void
_writeCsvLine
();
void
_flightTimerStart
(
void
);
void
_flightTimerStop
(
void
);
int
_id
;
///< Mavlink system id
int
_defaultComponentId
;
...
...
@@ -1461,6 +1463,7 @@ private:
int
_nextSendMessageMultipleIndex
;
QTime
_flightTimer
;
QTimer
_flightTimeUpdater
;
TrajectoryPoints
*
_trajectoryPoints
;
QmlObjectListModel
_cameraTriggerPoints
;
QmlObjectListModel
_adsbVehicles
;
...
...
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