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
c373ec74
Commit
c373ec74
authored
Aug 24, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #346 from tstellanova/config_Resolve
send RC params to the known correct component ID
parents
6a210743
7bb12dd2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
.gitignore
.gitignore
+2
-0
UAS.cc
src/uas/UAS.cc
+6
-6
UAS.h
src/uas/UAS.h
+1
-1
UASParameterCommsMgr.cc
src/uas/UASParameterCommsMgr.cc
+2
-2
No files found.
.gitignore
View file @
c373ec74
...
...
@@ -54,3 +54,5 @@ thirdParty/qserialport/bin/
thirdParty/qserialport/lib/
GeneratedFiles/
/qupgrade/
*.autosave
src/uas/UAS.cc
View file @
c373ec74
...
...
@@ -2368,9 +2368,9 @@ void UAS::enableExtra3Transmission(int rate)
* @param component The component to set the parameter
* @param id Name of the parameter
*/
void
UAS
::
setParameter
(
const
int
comp
onent
,
const
QString
&
i
d
,
const
QVariant
&
value
)
void
UAS
::
setParameter
(
const
int
comp
Id
,
const
QString
&
paramI
d
,
const
QVariant
&
value
)
{
if
(
!
i
d
.
isNull
())
if
(
!
paramI
d
.
isNull
())
{
mavlink_message_t
msg
;
mavlink_param_set_t
p
;
...
...
@@ -2431,7 +2431,7 @@ void UAS::setParameter(const int component, const QString& id, const QVariant& v
p
.
param_value
=
union_value
.
param_float
;
p
.
target_system
=
(
uint8_t
)
uasId
;
p
.
target_component
=
(
uint8_t
)
comp
onent
;
p
.
target_component
=
(
uint8_t
)
comp
Id
;
//qDebug() << "SENT PARAM:" << value;
...
...
@@ -2439,9 +2439,9 @@ void UAS::setParameter(const int component, const QString& id, const QVariant& v
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
p
.
param_id
);
i
++
)
{
// String characters
if
((
int
)
i
<
i
d
.
length
())
if
((
int
)
i
<
paramI
d
.
length
())
{
p
.
param_id
[
i
]
=
i
d
.
toAscii
()[
i
];
p
.
param_id
[
i
]
=
paramI
d
.
toAscii
()[
i
];
}
else
{
...
...
@@ -2449,7 +2449,7 @@ void UAS::setParameter(const int component, const QString& id, const QVariant& v
p
.
param_id
[
i
]
=
0
;
}
}
mavlink_msg_param_set_encode
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
()
,
&
msg
,
&
p
);
mavlink_msg_param_set_encode
(
mavlink
->
getSystemId
(),
compId
,
&
msg
,
&
p
);
sendMessage
(
msg
);
}
}
...
...
src/uas/UAS.h
View file @
c373ec74
...
...
@@ -842,7 +842,7 @@ public slots:
void
requestParameter
(
int
component
,
int
id
);
/** @brief Set a system parameter */
void
setParameter
(
const
int
comp
onent
,
const
QString
&
i
d
,
const
QVariant
&
value
);
void
setParameter
(
const
int
comp
Id
,
const
QString
&
paramI
d
,
const
QVariant
&
value
);
/** @brief Write parameters to permanent storage */
void
writeParametersToStorage
();
...
...
src/uas/UASParameterCommsMgr.cc
View file @
c373ec74
...
...
@@ -156,11 +156,11 @@ void UASParameterCommsMgr::emitPendingParameterCommit(int compId, const QString&
}
break
;
default:
qCritical
()
<<
"ABORTED PARAM SEND,
NO VALID QVARIANT TYPE"
;
qCritical
()
<<
"ABORTED PARAM SEND,
INVALID QVARIANT TYPE"
<<
paramType
;
return
;
}
setParameterStatusMsg
(
tr
(
"
Requested write of: %1: %2"
).
arg
(
key
).
arg
(
value
.
toDouble
()
));
setParameterStatusMsg
(
tr
(
"
Writing %1: %2 for comp. %3"
).
arg
(
key
).
arg
(
value
.
toDouble
()).
arg
(
compId
));
}
...
...
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