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
c1ed602e
Commit
c1ed602e
authored
Aug 07, 2013
by
tstellanova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing signals / slots
parent
39bb543e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
16 deletions
+19
-16
QGCUASParamManager.cc
src/uas/QGCUASParamManager.cc
+6
-6
QGCUASParamManager.h
src/uas/QGCUASParamManager.h
+1
-1
UASParameterDataModel.cc
src/uas/UASParameterDataModel.cc
+7
-4
UASParameterDataModel.h
src/uas/UASParameterDataModel.h
+2
-1
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+1
-2
QGCParamWidget.h
src/ui/QGCParamWidget.h
+1
-1
UASListWidget.cc
src/ui/uas/UASListWidget.cc
+1
-1
No files found.
src/uas/QGCUASParamManager.cc
View file @
c1ed602e
...
...
@@ -18,9 +18,9 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
loadParamMetaInfoCSV
();
// Connect retransmission guard
connect
(
this
,
SIGNAL
(
parameterUpdateRequested
(
int
,
QString
)),
this
,
SLOT
(
requestParameterUpdate
(
int
,
QString
)));
//
// Connect retransmission guard
//
connect(this, SIGNAL(parameterUpdateRequested(int,QString)),
//
this, SLOT(requestParameterUpdate(int,QString)));
// //TODO connect in paramCommsMgr instead
// connect(this, SIGNAL(parameterUpdateRequestedById(int,int)),
...
...
@@ -28,10 +28,10 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
// New parameters from UAS
void
parameterUpdated
(
int
compId
,
int
paramId
,
QString
paramName
,
QVariant
value
);
void
parameterUpdated
(
int
compId
,
QString
paramName
,
QVariant
value
);
connect
(
paramDataModel
,
SIGNAL
(
parameterUpdated
(
int
,
int
,
QString
,
QVariant
)),
this
,
SLOT
(
handleParameterUpdate
(
int
,
int
,
int
,
QString
,
QVariant
)));
connect
(
paramDataModel
,
SIGNAL
(
parameterUpdated
(
int
,
QString
,
QVariant
)),
this
,
SLOT
(
handleParameterUpdate
(
int
,
QString
,
QVariant
)));
// connect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)),
// this, SLOT(receivedParameterUpdate(int,int,int,int,QString,QVariant)));
...
...
src/uas/QGCUASParamManager.h
View file @
c1ed602e
...
...
@@ -52,7 +52,7 @@ public slots:
/** @brief Request a single parameter by name from the MAV */
virtual
void
requestParameterUpdate
(
int
component
,
const
QString
&
parameter
);
virtual
void
handleParameterUpdate
(
int
component
,
int
param
Count
,
int
param
Id
,
const
QString
&
parameterName
,
QVariant
value
)
=
0
;
virtual
void
handleParameterUpdate
(
int
component
,
int
paramId
,
const
QString
&
parameterName
,
QVariant
value
)
=
0
;
virtual
void
handleParameterListUpToDate
()
=
0
;
...
...
src/uas/UASParameterDataModel.cc
View file @
c1ed602e
...
...
@@ -114,12 +114,12 @@ void UASParameterDataModel::addComponent(int compId)
}
void
UASParameterDataModel
::
handleParameterUpdate
(
int
comp
onent
Id
,
QString
&
key
,
QVariant
&
value
)
void
UASParameterDataModel
::
handleParameterUpdate
(
int
compId
,
QString
&
key
,
QVariant
&
value
)
{
//verify that the value requested by the user matches the set value
//if it doesn't match, leave the pending parameter in the pending list!
if
(
pendingParameters
.
contains
(
comp
onent
Id
))
{
QMap
<
QString
,
QVariant
>
*
pendingParams
=
pendingParameters
.
value
(
comp
onent
Id
);
if
(
pendingParameters
.
contains
(
compId
))
{
QMap
<
QString
,
QVariant
>
*
pendingParams
=
pendingParameters
.
value
(
compId
);
if
((
NULL
!=
pendingParams
)
&&
pendingParams
->
contains
(
key
))
{
QVariant
reqVal
=
pendingParams
->
value
(
key
);
if
(
reqVal
==
value
)
{
...
...
@@ -131,7 +131,10 @@ void UASParameterDataModel::handleParameterUpdate(int componentId, QString& key,
}
}
setOnboardParameter
(
componentId
,
key
,
value
);
setOnboardParameter
(
compId
,
key
,
value
);
emit
parameterUpdated
(
compId
,
key
,
value
);
}
bool
UASParameterDataModel
::
getOnboardParameterValue
(
int
componentId
,
const
QString
&
key
,
QVariant
&
value
)
const
...
...
src/uas/UASParameterDataModel.h
View file @
c1ed602e
...
...
@@ -87,7 +87,8 @@ public:
signals:
void
parameterUpdated
(
int
compId
,
int
paramId
,
QString
paramName
,
QVariant
value
);
/** @brief We've received an update of a parameter's value */
void
parameterUpdated
(
int
compId
,
QString
paramName
,
QVariant
value
);
public
slots
:
...
...
src/ui/QGCParamWidget.cc
View file @
c1ed602e
...
...
@@ -331,9 +331,8 @@ void QGCParamWidget::addComponentItem( int compId, QString compName)
//}
void
QGCParamWidget
::
handleParameterUpdate
(
int
componentId
,
int
param
Count
,
int
param
Id
,
const
QString
&
paramName
,
QVariant
value
)
void
QGCParamWidget
::
handleParameterUpdate
(
int
componentId
,
int
paramId
,
const
QString
&
paramName
,
QVariant
value
)
{
Q_UNUSED
(
paramCount
);
Q_UNUSED
(
paramId
);
updateParameterDisplay
(
componentId
,
paramName
,
value
);
}
...
...
src/ui/QGCParamWidget.h
View file @
c1ed602e
...
...
@@ -67,7 +67,7 @@ public slots:
/** @brief Add a parameter to the list with retransmission / safety checks */
// void receivedParameterUpdate(int uas, int component, int paramCount, int paramId, QString parameterName, QVariant value);
virtual
void
handleParameterUpdate
(
int
component
,
int
param
Count
,
int
param
Id
,
const
QString
&
parameterName
,
QVariant
value
);
virtual
void
handleParameterUpdate
(
int
component
,
int
paramId
,
const
QString
&
parameterName
,
QVariant
value
);
virtual
void
handleParameterListUpToDate
();
virtual
void
handleParamStatusMsgUpdate
(
QString
msg
,
int
level
);
...
...
src/ui/uas/UASListWidget.cc
View file @
c1ed602e
...
...
@@ -149,7 +149,7 @@ void UASListWidget::addUAS(UASInterface* uas)
QList
<
LinkInterface
*>*
x
=
uas
->
getLinks
();
if
(
x
->
size
())
{
LinkInterface
*
li
=
x
->
at
(
0
);
LinkInterface
*
li
=
x
->
first
(
);
// Find an existing QGroupBox for this LinkInterface or create a
// new one.
...
...
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