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
189135d4
Commit
189135d4
authored
Aug 06, 2013
by
tstellanova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing inter-object wiring
parent
e8c6dbb2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
10 deletions
+27
-10
QGCUASParamManager.cc
src/uas/QGCUASParamManager.cc
+11
-1
QGCUASParamManager.h
src/uas/QGCUASParamManager.h
+4
-4
UASManager.cc
src/uas/UASManager.cc
+1
-0
ParameterInterface.cc
src/ui/ParameterInterface.cc
+2
-1
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+7
-3
QGCParamWidget.h
src/ui/QGCParamWidget.h
+2
-1
No files found.
src/uas/QGCUASParamManager.cc
View file @
189135d4
...
...
@@ -13,6 +13,12 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
{
paramDataModel
=
uas
->
getParamDataModel
();
uas
->
setParamManager
(
this
);
// Connect retransmission guard
connect
(
this
,
SIGNAL
(
parameterUpdateRequested
(
int
,
QString
)),
this
,
SLOT
(
requestParameterUpdate
(
int
,
QString
)));
connect
(
this
,
SIGNAL
(
parameterUpdateRequestedById
(
int
,
int
)),
mav
,
SLOT
(
requestParameter
(
int
,
int
)));
}
...
...
@@ -29,6 +35,10 @@ void QGCUASParamManager::requestParameterUpdate(int component, const QString& pa
}
}
/**
* Send a request to deliver the list of onboard parameters
* to the MAV.
...
...
@@ -132,7 +142,7 @@ void QGCUASParamManager::retransmissionGuardTick()
if
(
count
<
retransmissionBurstRequestSize
)
{
//qDebug() << __FILE__ << __LINE__ << "RETRANSMISSION GUARD REQUESTS RETRANSMISSION OF PARAM #" << id << "FROM COMPONENT #" << component;
//TODO mavlink msg type for "request parameter set" ?
emit
requestParameter
(
component
,
id
);
emit
parameterUpdateRequestedById
(
component
,
id
);
setParameterStatusMsg
(
tr
(
"Requested retransmission of #%1"
).
arg
(
id
+
1
));
count
++
;
}
else
{
...
...
src/uas/QGCUASParamManager.h
View file @
189135d4
...
...
@@ -27,12 +27,13 @@ protected:
//TODO decouple this UI message display further
virtual
void
setParameterStatusMsg
(
const
QString
&
msg
);
signals:
void
parameterChanged
(
int
component
,
QString
parameter
,
QVariant
value
);
void
parameterChanged
(
int
component
,
int
parameterIndex
,
QVariant
value
);
void
parameterListUpToDate
(
int
component
);
/** @brief Request a single parameter */
void
requestParameter
(
int
component
,
int
parameter
);
void
parameterUpdateRequested
(
int
component
,
const
QString
&
parameter
);
void
parameterUpdateRequestedById
(
int
componentId
,
int
paramId
);
public
slots
:
...
...
@@ -43,8 +44,7 @@ public slots:
/** @brief Check for missing parameters */
virtual
void
retransmissionGuardTick
();
/** @brief Request one single parameter */
/** @brief Request a single parameter by name */
virtual
void
requestParameterUpdate
(
int
component
,
const
QString
&
parameter
);
protected:
...
...
src/uas/UASManager.cc
View file @
189135d4
...
...
@@ -280,6 +280,7 @@ void UASManager::addUAS(UASInterface* uas)
// Only execute if there is no UAS at this index
if
(
!
systems
.
contains
(
uas
))
{
qDebug
()
<<
"Add new UAS: "
<<
uas
->
getUASID
();
systems
.
append
(
uas
);
// Set home position on UAV if set in UI
// - this is done on a per-UAV basis
...
...
src/ui/ParameterInterface.cc
View file @
189135d4
...
...
@@ -91,8 +91,9 @@ void ParameterInterface::selectUAS(int index)
void
ParameterInterface
::
addUAS
(
UASInterface
*
uas
)
{
int
uasId
=
uas
->
getUASID
();
qDebug
()
<<
"ParameterInterface::addUAS : "
<<
uasId
;
if
(
paramWidgets
->
contains
(
uasId
)
)
{
qDebug
()
<<
"Already have QGCParamWidget for: "
<<
uasId
;
return
;
}
...
...
src/ui/QGCParamWidget.cc
View file @
189135d4
...
...
@@ -144,11 +144,15 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) :
// New parameters from UAS
connect
(
uas
,
SIGNAL
(
parameterChanged
(
int
,
int
,
int
,
int
,
QString
,
QVariant
)),
this
,
SLOT
(
receivedParameterUpdate
(
int
,
int
,
int
,
int
,
QString
,
QVariant
)));
// Connect retransmission guard
connect
(
this
,
SIGNAL
(
requestParameterByName
(
int
,
QString
)),
uas
,
SLOT
(
requestParameterByName
(
int
,
QString
)));
connect
(
this
,
SIGNAL
(
requestParameterByName
(
int
,
int
)),
uas
,
SLOT
(
requestParameterByName
(
int
,
int
)));
connect
(
&
retransmissionTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
retransmissionGuardTick
()));
// connect(this, SIGNAL(requestParameter(int,QString)), uas, SLOT(requestParameter(int,QString)));
// connect(this, SIGNAL(requestParameter(int,int)), uas, SLOT(requestParameter(int,int)));
// Get parameters
if
(
uas
)
{
requestAllParamsUpdate
();
...
...
src/ui/QGCParamWidget.h
View file @
189135d4
...
...
@@ -59,6 +59,7 @@ signals:
/** @brief A parameter was changed in the widget, NOT onboard */
//void parameterChanged(int component, QString parametername, float value); // defined in QGCUASParamManager already
public
slots
:
/** @brief Add a component to the list */
void
addComponentItem
(
int
uas
,
int
component
,
QString
componentName
);
...
...
@@ -69,7 +70,7 @@ public slots:
/** @brief Request list of parameters from MAV */
void
requestAllParamsUpdate
();
/** @brief Set one parameter, changes value in RAM of MAV */
void
setParameter
(
int
component
,
QString
parameterName
,
QVariant
value
);
v
irtual
v
oid
setParameter
(
int
component
,
QString
parameterName
,
QVariant
value
);
/** @brief Set all parameters, changes the value in RAM of MAV */
void
setParameters
();
/** @brief Write the current parameters to permanent storage (EEPROM/HDD) */
...
...
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