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
764e22c9
Commit
764e22c9
authored
Aug 08, 2013
by
tstellanova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix setting of current mav in QGCConfigView
parent
6e84f136
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
QGCConfigView.cc
src/ui/QGCConfigView.cc
+6
-4
QGCConfigView.h
src/ui/QGCConfigView.h
+1
-1
QGCPX4VehicleConfig.cc
src/ui/QGCPX4VehicleConfig.cc
+10
-7
QGCVehicleConfig.cc
src/ui/QGCVehicleConfig.cc
+1
-0
No files found.
src/ui/QGCConfigView.cc
View file @
764e22c9
...
...
@@ -8,7 +8,7 @@
QGCConfigView
::
QGCConfigView
(
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
QGCConfigView
),
currUAS
(
NULL
)
mav
(
NULL
)
{
ui
->
setupUi
(
this
);
...
...
@@ -26,7 +26,7 @@ QGCConfigView::~QGCConfigView()
void
QGCConfigView
::
activeUASChanged
(
UASInterface
*
uas
)
{
if
(
currUAS
==
uas
)
if
(
mav
==
uas
)
return
;
//remove all child widgets since they could contain stale data
...
...
@@ -41,11 +41,13 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
}
}
if
(
NULL
!=
uas
)
{
mav
=
uas
;
if
(
NULL
!=
mav
)
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
switch
(
uas
->
getAutopilotType
())
{
int
autopilotType
=
mav
->
getAutopilotType
();
switch
(
autopilotType
)
{
case
MAV_AUTOPILOT_PX4
:
ui
->
gridLayout
->
addWidget
(
new
QGCPX4VehicleConfig
());
break
;
...
...
src/ui/QGCConfigView.h
View file @
764e22c9
...
...
@@ -21,7 +21,7 @@ public slots:
private:
Ui
::
QGCConfigView
*
ui
;
UASInterface
*
currUAS
;
UASInterface
*
mav
;
};
...
...
src/ui/QGCPX4VehicleConfig.cc
View file @
764e22c9
...
...
@@ -941,6 +941,7 @@ void QGCPX4VehicleConfig::writeCalibrationRC()
// Do not write the RC type, as these values depend on this
// active onboard parameter
//TODO consolidate RC param sending in the UAS comms mgr
for
(
unsigned
int
i
=
0
;
i
<
chanCount
;
++
i
)
{
//qDebug() << "SENDING" << minTpl.arg(i+1) << rcMin[i];
...
...
@@ -975,7 +976,9 @@ void QGCPX4VehicleConfig::writeCalibrationRC()
void
QGCPX4VehicleConfig
::
requestCalibrationRC
()
{
if
(
!
mav
)
return
;
if
(
!
mav
)
{
return
;
}
QString
minTpl
(
"RC%1_MIN"
);
QString
maxTpl
(
"RC%1_MAX"
);
...
...
@@ -985,15 +988,15 @@ void QGCPX4VehicleConfig::requestCalibrationRC()
// Do not request the RC type, as these values depend on this
// active onboard parameter
for
(
unsigned
int
i
=
0
;
i
<
chanMax
;
++
i
)
{
mav
->
requestParameter
(
0
,
minTpl
.
arg
(
i
+
1
));
for
(
unsigned
int
i
=
1
;
i
<
(
chanMax
+
1
);
++
i
)
{
qDebug
()
<<
"Request RC "
<<
i
;
mav
->
requestParameter
(
0
,
minTpl
.
arg
(
i
));
QGC
::
SLEEP
::
usleep
(
5000
);
mav
->
requestParameter
(
0
,
trimTpl
.
arg
(
i
+
1
));
mav
->
requestParameter
(
0
,
trimTpl
.
arg
(
i
));
QGC
::
SLEEP
::
usleep
(
5000
);
mav
->
requestParameter
(
0
,
maxTpl
.
arg
(
i
+
1
));
mav
->
requestParameter
(
0
,
maxTpl
.
arg
(
i
));
QGC
::
SLEEP
::
usleep
(
5000
);
mav
->
requestParameter
(
0
,
revTpl
.
arg
(
i
+
1
));
mav
->
requestParameter
(
0
,
revTpl
.
arg
(
i
));
QGC
::
SLEEP
::
usleep
(
5000
);
}
}
...
...
src/ui/QGCVehicleConfig.cc
View file @
764e22c9
...
...
@@ -937,6 +937,7 @@ void QGCVehicleConfig::writeCalibrationRC()
// Do not write the RC type, as these values depend on this
// active onboard parameter
//TODO consolidate RC param sending in the UAS comms mgr
for
(
unsigned
int
i
=
0
;
i
<
chanCount
;
++
i
)
{
//qDebug() << "SENDING" << minTpl.arg(i+1) << rcMin[i];
...
...
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