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
0378568d
Commit
0378568d
authored
May 01, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
6982e89e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
FactGroup.cc
src/FactSystem/FactGroup.cc
+18
-1
FactGroup.h
src/FactSystem/FactGroup.h
+3
-0
No files found.
src/FactSystem/FactGroup.cc
View file @
0378568d
...
...
@@ -46,7 +46,8 @@ void FactGroup::_setupTimer()
if
(
_updateRateMSecs
>
0
)
{
connect
(
&
_updateTimer
,
&
QTimer
::
timeout
,
this
,
&
FactGroup
::
_updateAllValues
);
_updateTimer
.
setSingleShot
(
false
);
_updateTimer
.
start
(
_updateRateMSecs
);
_updateTimer
.
setInterval
(
_updateRateMSecs
);
_updateTimer
.
start
();
}
}
...
...
@@ -125,3 +126,19 @@ void FactGroup::_updateAllValues(void)
fact
->
sendDeferredValueChangedSignal
();
}
}
void
FactGroup
::
setLiveUpdates
(
bool
liveUpdates
)
{
if
(
_updateTimer
.
interval
()
==
0
)
{
return
;
}
if
(
liveUpdates
)
{
_updateTimer
.
stop
();
}
else
{
_updateTimer
.
start
();
}
for
(
Fact
*
fact
:
_nameToFactMap
)
{
fact
->
setSendValueChangedSignals
(
liveUpdates
);
}
}
src/FactSystem/FactGroup.h
View file @
0378568d
...
...
@@ -38,6 +38,9 @@ public:
/// @return FactGroup for specified name, NULL if not found
Q_INVOKABLE
FactGroup
*
getFactGroup
(
const
QString
&
name
);
/// Turning on live updates will allow value changes to flow through as they are received.
Q_INVOKABLE
void
setLiveUpdates
(
bool
liveUpdates
);
QStringList
factNames
(
void
)
const
{
return
_factNames
;
}
QStringList
factGroupNames
(
void
)
const
{
return
_nameToFactGroupMap
.
keys
();
}
...
...
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