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
c038ecf4
Commit
c038ecf4
authored
Jul 23, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RadioConfigTest for new SetupPage usage
parent
8bc1336d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
RadioComponent.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
+3
-0
RadioConfigTest.cc
src/qgcunittest/RadioConfigTest.cc
+10
-0
No files found.
src/AutoPilotPlugins/Common/RadioComponent.qml
View file @
c038ecf4
...
@@ -18,6 +18,7 @@ import QGroundControl.FactControls 1.0
...
@@ -18,6 +18,7 @@ import QGroundControl.FactControls 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Palette
1.0
SetupPage
{
SetupPage
{
id
:
radioPage
id
:
radioPage
...
@@ -48,6 +49,8 @@ SetupPage {
...
@@ -48,6 +49,8 @@ SetupPage {
{
{
}
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
radioPage
.
enabled
}
RadioComponentController
{
RadioComponentController
{
id
:
controller
id
:
controller
factPanel
:
radioPage
.
viewPanel
factPanel
:
radioPage
.
viewPanel
...
...
src/qgcunittest/RadioConfigTest.cc
View file @
c038ecf4
...
@@ -12,6 +12,9 @@
...
@@ -12,6 +12,9 @@
#include "RadioComponentController.h"
#include "RadioComponentController.h"
#include "MultiVehicleManager.h"
#include "MultiVehicleManager.h"
#include "QGCApplication.h"
#include "QGCApplication.h"
#include "PX4/PX4AutoPilotPlugin.h"
#include "APM/APMAutoPilotPlugin.h"
#include "APM/APMRadioComponent.h"
/// @file
/// @file
/// @brief QRadioComponentController Widget unit test
/// @brief QRadioComponentController Widget unit test
...
@@ -200,6 +203,13 @@ void RadioConfigTest::_init(MAV_AUTOPILOT firmwareType)
...
@@ -200,6 +203,13 @@ void RadioConfigTest::_init(MAV_AUTOPILOT firmwareType)
_calWidget
->
resize
(
600
,
600
);
_calWidget
->
resize
(
600
,
600
);
Q_CHECK_PTR
(
_calWidget
);
Q_CHECK_PTR
(
_calWidget
);
_calWidget
->
setAutoPilot
(
_autopilot
);
_calWidget
->
setAutoPilot
(
_autopilot
);
QObject
*
vehicleComponent
;
if
(
firmwareType
==
MAV_AUTOPILOT_PX4
)
{
vehicleComponent
=
dynamic_cast
<
QObject
*>
(
dynamic_cast
<
PX4AutoPilotPlugin
*>
(
_autopilot
)
->
radioComponent
());
}
else
{
vehicleComponent
=
dynamic_cast
<
QObject
*>
(
dynamic_cast
<
APMAutoPilotPlugin
*>
(
_autopilot
)
->
radioComponent
());
}
_calWidget
->
setContextPropertyObject
(
"vehicleComponent"
,
vehicleComponent
);
_calWidget
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/RadioComponent.qml"
));
_calWidget
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/RadioComponent.qml"
));
// Nasty hack to get to controller
// Nasty hack to get to controller
...
...
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