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
db4ab216
Commit
db4ab216
authored
Apr 07, 2016
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show the user some positive feedback when parameters load from cache. For #3114
parent
064513e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+22
-0
No files found.
src/FactSystem/ParameterLoader.cc
View file @
db4ab216
...
...
@@ -32,8 +32,10 @@
#include "FirmwarePlugin.h"
#include "UAS.h"
#include <QEasingCurve>
#include <QFile>
#include <QDebug>
#include <QVariantAnimation>
/* types for local parameter cache */
typedef
QPair
<
int
,
QVariant
>
ParamTypeVal
;
...
...
@@ -711,6 +713,26 @@ void ParameterLoader::_tryCacheHashLoad(int uasId, int componentId, QVariant has
mavlink_message_t
msg
;
mavlink_msg_param_set_encode
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
&
msg
,
&
p
);
_vehicle
->
sendMessageOnLink
(
_vehicle
->
priorityLink
(),
msg
);
// Give the user some feedback things loaded properly
QVariantAnimation
*
ani
=
new
QVariantAnimation
(
this
);
ani
->
setEasingCurve
(
QEasingCurve
::
OutCubic
);
ani
->
setStartValue
(
0.0
);
ani
->
setEndValue
(
1.0
);
ani
->
setDuration
(
750
);
connect
(
ani
,
&
QVariantAnimation
::
valueChanged
,
[
this
](
const
QVariant
&
value
)
{
emit
parameterListProgress
(
value
.
toFloat
());
});
// Hide 500ms after animation finishes
connect
(
ani
,
&
QVariantAnimation
::
finished
,
[
this
](){
QTimer
::
singleShot
(
500
,
[
this
]()
{
emit
parameterListProgress
(
0
);
});
});
ani
->
start
(
QAbstractAnimation
::
DeleteWhenStopped
);
}
}
...
...
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