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
27918491
Commit
27918491
authored
May 29, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3439 from DonLakeFlyer/ParameterLink
Parameter Protocol no longer stays on single link
parents
d3774c67
d40db157
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
ParameterLoader.cc
src/FactSystem/ParameterLoader.cc
+4
-5
ParameterLoader.h
src/FactSystem/ParameterLoader.h
+0
-2
No files found.
src/FactSystem/ParameterLoader.cc
View file @
27918491
...
...
@@ -53,7 +53,6 @@ ParameterLoader::ParameterLoader(Vehicle* vehicle)
:
QObject
(
vehicle
)
,
_vehicle
(
vehicle
)
,
_mavlink
(
qgcApp
()
->
toolbox
()
->
mavlinkProtocol
())
,
_dedicatedLink
(
_vehicle
->
priorityLink
())
,
_parametersReady
(
false
)
,
_initialLoadComplete
(
false
)
,
_waitingForDefaultComponent
(
false
)
...
...
@@ -364,7 +363,7 @@ void ParameterLoader::refreshAllParameters(uint8_t componentID)
mavlink_message_t
msg
;
mavlink_msg_param_request_list_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
_vehicle
->
id
(),
componentID
);
_vehicle
->
sendMessageOnLink
(
_
dedicatedLink
,
msg
);
_vehicle
->
sendMessageOnLink
(
_
vehicle
->
priorityLink
()
,
msg
);
QString
what
=
(
componentID
==
MAV_COMP_ID_ALL
)
?
"MAV_COMP_ID_ALL"
:
QString
::
number
(
componentID
);
qCDebug
(
ParameterLoaderLog
)
<<
"Request to refresh all parameters for component ID:"
<<
what
;
...
...
@@ -594,7 +593,7 @@ void ParameterLoader::_readParameterRaw(int componentId, const QString& paramNam
componentId
,
// Target component id
fixedParamName
,
// Named parameter being requested
paramIndex
);
// Parameter index being requested, -1 for named
_vehicle
->
sendMessageOnLink
(
_
dedicatedLink
,
msg
);
_vehicle
->
sendMessageOnLink
(
_
vehicle
->
priorityLink
()
,
msg
);
}
void
ParameterLoader
::
_writeParameterRaw
(
int
componentId
,
const
QString
&
paramName
,
const
QVariant
&
value
)
...
...
@@ -647,7 +646,7 @@ void ParameterLoader::_writeParameterRaw(int componentId, const QString& paramNa
mavlink_message_t
msg
;
mavlink_msg_param_set_encode
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
&
msg
,
&
p
);
_vehicle
->
sendMessageOnLink
(
_
dedicatedLink
,
msg
);
_vehicle
->
sendMessageOnLink
(
_
vehicle
->
priorityLink
()
,
msg
);
}
void
ParameterLoader
::
_writeLocalParamCache
(
int
uasId
,
int
componentId
)
...
...
@@ -757,7 +756,7 @@ void ParameterLoader::_saveToEEPROM(void)
if
(
_vehicle
->
firmwarePlugin
()
->
isCapable
(
FirmwarePlugin
::
MavCmdPreflightStorageCapability
))
{
mavlink_message_t
msg
;
mavlink_msg_command_long_pack
(
_mavlink
->
getSystemId
(),
_mavlink
->
getComponentId
(),
&
msg
,
_vehicle
->
id
(),
0
,
MAV_CMD_PREFLIGHT_STORAGE
,
1
,
1
,
-
1
,
-
1
,
-
1
,
0
,
0
,
0
);
_vehicle
->
sendMessageOnLink
(
_
dedicatedLink
,
msg
);
_vehicle
->
sendMessageOnLink
(
_
vehicle
->
priorityLink
()
,
msg
);
qCDebug
(
ParameterLoaderLog
)
<<
"_saveToEEPROM"
;
}
else
{
qCDebug
(
ParameterLoaderLog
)
<<
"_saveToEEPROM skipped due to FirmwarePlugin::isCapable"
;
...
...
src/FactSystem/ParameterLoader.h
View file @
27918491
...
...
@@ -144,8 +144,6 @@ private:
void
_saveToEEPROM
(
void
);
void
_checkInitialLoadComplete
(
bool
failIfNoDefaultComponent
);
LinkInterface
*
_dedicatedLink
;
///< Parameter protocol stays on this link
/// First mapping is by component id
/// Second mapping is parameter name, to Fact* in QVariant
QMap
<
int
,
QVariantMap
>
_mapParameterName2Variant
;
...
...
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