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
d8361352
Commit
d8361352
authored
Jun 30, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing params not working
parent
dc492f13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
22 deletions
+41
-22
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+20
-1
waypoints_8_circle.txt
waypoints_8_circle.txt
+21
-21
No files found.
src/ui/QGCParamWidget.cc
View file @
d8361352
...
...
@@ -258,7 +258,7 @@ void QGCParamWidget::addParameter(int uas, int component, QString parameterName,
parameterItem
->
setBackground
(
0
,
QBrush
(
QColor
(
0
,
0
,
0
)));
parameterItem
->
setBackground
(
1
,
Qt
::
NoBrush
);
//tree->update();
if
(
changedValues
.
contains
(
component
))
changedValues
.
value
(
component
)
->
remove
(
parameterName
);
//
if (changedValues.contains(component)) changedValues.value(component)->remove(parameterName);
}
/**
...
...
@@ -360,30 +360,49 @@ void QGCParamWidget::loadParameters()
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
))
return
;
qDebug
()
<<
"PARAM file opened"
;
// Clear list
clear
();
QTextStream
in
(
&
file
);
while
(
!
in
.
atEnd
())
{
qDebug
()
<<
"PARAM while"
;
QString
line
=
in
.
readLine
();
if
(
!
line
.
startsWith
(
"#"
))
{
qDebug
()
<<
"PARAM no #"
;
QStringList
wpParams
=
line
.
split
(
"
\t
"
);
if
(
wpParams
.
size
()
==
4
)
{
qDebug
()
<<
"PARAM size 4"
;
// Only load parameters for right mav
if
(
mav
->
getUASID
()
==
wpParams
.
at
(
0
).
toInt
())
{
qDebug
()
<<
"PARAM right uas"
;
addParameter
(
wpParams
.
at
(
0
).
toInt
(),
wpParams
.
at
(
1
).
toInt
(),
wpParams
.
at
(
2
),
wpParams
.
at
(
3
).
toDouble
());
if
(
changedValues
.
contains
(
wpParams
.
at
(
1
).
toInt
()))
{
qDebug
()
<<
"PARAM changed contains"
;
if
(
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
contains
(
wpParams
.
at
(
1
)))
{
qDebug
()
<<
"PARAM changed remove"
;
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
remove
(
wpParams
.
at
(
1
));
}
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
insert
(
wpParams
.
at
(
1
),
(
float
)
wpParams
.
at
(
2
).
toDouble
());
// set param to be changed
// QGCParamWidget::parameterItemChanged(QTreeWidgetItem* current, column);
}
}
}
...
...
waypoints_8_circle.txt
View file @
d8361352
0 3.7 0.3 -0.8 0 1
1 0.1 2
000
1 3.1 0.3 -0.8 0 1 0 0.1
2
000
2 3.1 0.8 -0.8 0 1 0 0.1
2
000
3 3.1 1.3 -0.8 0 1 0 0.1
2
000
4 3.1 2 -0.8 0 1 0 0.1
2
000
5 3.1 2.8 -0.8 0 1 0 0.1
2
000
6 3.1 3.2 -0.8 0 1 0 0.1
2
000
7 2.1 3.2 -0.8 0 1 0 0.1
2
000
8 1.1 3.2 -0.8 0 1 0 0.1
2
000
9 0.4 3.2 -0.8 0 1 0 0.1
2
000
10 0.2
5 3.2 -0.8 0 1 0 0.1 2
000
11 0.2
5 2.2 -0.8 0 1 0 0.1 2
000
12 0.2
5 1.2 -0.8 0 1 0 0.1 2
000
13 0.2
5 0.5 -0.8 0 1 0 0.1 2
000
14 0.2
5 0.3 -0.8 0 1 0 0.1 2
000
15 1.1 0.3 -0.8 0 1 0 0.1
2
000
16 2.1 0.3 -0.8 0 1 0 0.1
2
000
17 2.8 0.3 -0.8 0 1 0 0.1
2
000
18 3.1 0.3 -0.8 0 1 0 0.1
2
000
19 3.7 0.3 -0.8 0 1 0 0.1
2
000
20 3.7 0.3 0 0 1 0 0.1
2
000
0 3.7 0.3 -0.8 0 1
0 0.1 1
000
1 3.1 0.3 -0.8 0 1 0 0.1
1
000
2 3.1 0.8 -0.8 0 1 0 0.1
1
000
3 3.1 1.3 -0.8 0 1 0 0.1
1
000
4 3.1 2 -0.8 0 1 0 0.1
1
000
5 3.1 2.8 -0.8 0 1 0 0.1
1
000
6 3.1 3.2 -0.8 0 1 0 0.1
1
000
7 2.1 3.2 -0.8 0 1 0 0.1
1
000
8 1.1 3.2 -0.8 0 1 0 0.1
1
000
9 0.4 3.2 -0.8 0 1 0 0.1
1
000
10 0.2
3.2 -0.8 0 1 0 0.1 1
000
11 0.2
2.2 -0.8 0 1 0 0.1 1
000
12 0.2
1.2 -0.8 0 1 0 0.1 1
000
13 0.2
0.5 -0.8 0 1 0 0.1 1
000
14 0.2
0.3 -0.8 0 1 0 0.1 1
000
15 1.1 0.3 -0.8 0 1 0 0.1
1
000
16 2.1 0.3 -0.8 0 1 0 0.1
1
000
17 2.8 0.3 -0.8 0 1 0 0.1
1
000
18 3.1 0.3 -0.8 0 1 0 0.1
1
000
19 3.7 0.3 -0.8 0 1 0 0.1
1
000
20 3.7 0.3 0 0 1 0 0.1
1
000
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