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
6e8f316a
Commit
6e8f316a
authored
Jun 30, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load parameters work maybe
parent
398361d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
PxQuadMAV.cc
src/uas/PxQuadMAV.cc
+2
-0
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+25
-4
No files found.
src/uas/PxQuadMAV.cc
View file @
6e8f316a
...
...
@@ -134,6 +134,8 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit
localizationChanged
(
this
,
status
.
position_fix
);
emit
visionLocalizationChanged
(
this
,
status
.
vision_fix
);
emit
gpsLocalizationChanged
(
this
,
status
.
gps_fix
);
qDebug
()
<<
"ATT CONTROL IS"
<<
status
.
control_att
;
}
break
;
default:
...
...
src/ui/QGCParamWidget.cc
View file @
6e8f316a
...
...
@@ -375,15 +375,36 @@ void QGCParamWidget::loadParameters()
// Only load parameters for right mav
if
(
mav
->
getUASID
()
==
wpParams
.
at
(
0
).
toInt
())
{
bool
changed
=
false
;
int
component
=
wpParams
.
at
(
1
).
toInt
();
QString
parameterName
=
wpParams
.
at
(
2
);
if
(
!
parameters
.
contains
(
component
)
||
parameters
.
value
(
component
)
->
value
(
parameterName
,
0.0
f
)
!=
(
float
)
wpParams
.
at
(
3
).
toDouble
())
{
changed
=
true
;
}
// Set parameter value
addParameter
(
wpParams
.
at
(
0
).
toInt
(),
wpParams
.
at
(
1
).
toInt
(),
wpParams
.
at
(
2
),
wpParams
.
at
(
3
).
toDouble
());
if
(
changedValues
.
contains
(
wpParams
.
at
(
1
).
toInt
()))
if
(
changed
)
{
if
(
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
contains
(
wpParams
.
at
(
1
)))
// Create changed values data structure if necessary
if
(
!
changedValues
.
contains
(
wpParams
.
at
(
1
).
toInt
()))
{
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
remove
(
wpParams
.
at
(
1
));
changedValues
.
insert
(
wpParams
.
at
(
1
).
toInt
(),
new
QMap
<
QString
,
float
>
(
));
}
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
insert
(
wpParams
.
at
(
1
),
(
float
)
wpParams
.
at
(
2
).
toDouble
());
// Add to changed values
if
(
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
contains
(
wpParams
.
at
(
2
)))
{
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
remove
(
wpParams
.
at
(
2
));
}
changedValues
.
value
(
wpParams
.
at
(
1
).
toInt
())
->
insert
(
wpParams
.
at
(
2
),
(
float
)
wpParams
.
at
(
3
).
toDouble
());
qDebug
()
<<
"MARKING COMP"
<<
wpParams
.
at
(
1
).
toInt
()
<<
"PARAM"
<<
wpParams
.
at
(
2
)
<<
"VALUE"
<<
(
float
)
wpParams
.
at
(
3
).
toDouble
()
<<
"AS CHANGED"
;
// Mark in UI
}
}
}
...
...
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