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
bc3e650c
Commit
bc3e650c
authored
May 14, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Param interface fully working now
parent
c019b132
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
37 deletions
+2
-37
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+2
-37
No files found.
src/ui/QGCParamWidget.cc
View file @
bc3e650c
...
...
@@ -150,6 +150,7 @@ void QGCParamWidget::addParameter(int uas, int component, QString parameterName,
QString
key
=
child
->
data
(
0
,
Qt
::
DisplayRole
).
toString
();
if
(
key
==
parameterName
)
{
qDebug
()
<<
"UPDATED CHILD"
;
child
->
setData
(
1
,
Qt
::
DisplayRole
,
value
);
found
=
true
;
}
...
...
@@ -241,43 +242,7 @@ void QGCParamWidget::setParameters()
}
}
/*
//mav->setParameter(component, parameterName, value);
// Iterate through all components, through all parameters and emit them
QMap<int, QTreeWidgetItem*>::iterator i;
// Iterate through all components / subsystems
for (i = components->begin(); i != components->end(); ++i)
{
// Get all parameters of this component
int compid = i.key();
QTreeWidgetItem* item = i.value();
for (int j = 0; j < item->childCount(); ++j)
{
QTreeWidgetItem* param = item->child(j);
// First column is name, second column value
bool ok = true;
QString key = param->data(0, Qt::DisplayRole).toString();
float value = param->data(1, Qt::DisplayRole).toDouble(&ok);
// Send parameter to MAV
if (ok)
{
emit parameterChanged(compid, key, value);
qDebug() << " SET PARAM: KEY:" << key << "VALUE:" << value;
}
else
{
qDebug() << __FILE__ << __LINE__ << "CONVERSION ERROR!";
}
}
}
// TODO Instead of clearing, keep parameter list and wait for individual update messages
clear();
*/
//mav->requestParameters();
changedValues
.
clear
();
qDebug
()
<<
__FILE__
<<
__LINE__
<<
"SETTING ALL PARAMETERS"
;
}
...
...
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