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
adc0c941
Commit
adc0c941
authored
Oct 09, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add lights settings component for Sub.
parent
99d161ed
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
430 additions
and
0 deletions
+430
-0
qgcresources.qrc
qgcresources.qrc
+1
-0
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+2
-0
APMAutoPilotPlugin.cc
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
+8
-0
APMAutoPilotPlugin.h
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
+3
-0
APMLightsComponent.cc
src/AutoPilotPlugins/APM/APMLightsComponent.cc
+76
-0
APMLightsComponent.h
src/AutoPilotPlugins/APM/APMLightsComponent.h
+40
-0
APMLightsComponent.qml
src/AutoPilotPlugins/APM/APMLightsComponent.qml
+197
-0
APMLightsComponentSummary.qml
src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
+101
-0
LightsComponentIcon.png
src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png
+0
-0
No files found.
qgcresources.qrc
View file @
adc0c941
...
...
@@ -57,6 +57,7 @@
<file alias="GeoTagIcon">src/AnalyzeView/GeoTagIcon.png</file>
<file alias="LandMode.svg">src/AutoPilotPlugins/PX4/Images/LandMode.svg</file>
<file alias="LandModeCopter.svg">src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg</file>
<file alias="LightsComponentIcon.png">src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png</file>
<file alias="LogDownloadIcon">src/AnalyzeView/LogDownloadIcon.png</file>
<file alias="LowBattery.svg">src/AutoPilotPlugins/PX4/Images/LowBattery.svg</file>
<file alias="LowBatteryLight.svg">src/AutoPilotPlugins/PX4/Images/LowBatteryLight.svg</file>
...
...
qgroundcontrol.pro
View file @
adc0c941
...
...
@@ -667,6 +667,7 @@ HEADERS+= \
src/AutoPilotPlugins/APM/APMAirframeComponentController.h \
src/AutoPilotPlugins/APM/APMAirframeComponentAirframes.h \
src/AutoPilotPlugins/APM/APMCameraComponent.h \
src/AutoPilotPlugins/APM/APMLightsComponent.h \
src/AutoPilotPlugins/APM/APMCompassCal.h \
src/AutoPilotPlugins/APM/APMFlightModesComponent.h \
src/AutoPilotPlugins/APM/APMFlightModesComponentController.h \
...
...
@@ -730,6 +731,7 @@ SOURCES += \
src/AutoPilotPlugins/APM/APMAirframeComponent.cc \
src/AutoPilotPlugins/APM/APMAirframeComponentController.cc \
src/AutoPilotPlugins/APM/APMCameraComponent.cc \
src/AutoPilotPlugins/APM/APMLightsComponent.cc \
src/AutoPilotPlugins/APM/APMCompassCal.cc \
src/AutoPilotPlugins/APM/APMFlightModesComponent.cc \
src/AutoPilotPlugins/APM/APMFlightModesComponentController.cc \
...
...
qgroundcontrol.qrc
View file @
adc0c941
...
...
@@ -143,6 +143,8 @@
<file alias="APMNotSupported.qml">src/AutoPilotPlugins/APM/APMNotSupported.qml</file>
<file alias="APMCameraComponent.qml">src/AutoPilotPlugins/APM/APMCameraComponent.qml</file>
<file alias="APMCameraComponentSummary.qml">src/AutoPilotPlugins/APM/APMCameraComponentSummary.qml</file>
<file alias="APMLightsComponent.qml">src/AutoPilotPlugins/APM/APMLightsComponent.qml</file>
<file alias="APMLightsComponentSummary.qml">src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml</file>
<file alias="APMPowerComponent.qml">src/AutoPilotPlugins/APM/APMPowerComponent.qml</file>
<file alias="APMPowerComponentSummary.qml">src/AutoPilotPlugins/APM/APMPowerComponentSummary.qml</file>
<file alias="APMRadioComponentSummary.qml">src/AutoPilotPlugins/APM/APMRadioComponentSummary.qml</file>
...
...
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.cc
View file @
adc0c941
...
...
@@ -27,6 +27,7 @@
#include "APMPowerComponent.h"
#include "MotorComponent.h"
#include "APMCameraComponent.h"
#include "APMLightsComponent.h"
#include "ESP8266Component.h"
/// This is the AutoPilotPlugin implementatin for the MAV_AUTOPILOT_ARDUPILOT type.
...
...
@@ -35,6 +36,7 @@ APMAutoPilotPlugin::APMAutoPilotPlugin(Vehicle* vehicle, QObject* parent)
,
_incorrectParameterVersion
(
false
)
,
_airframeComponent
(
NULL
)
,
_cameraComponent
(
NULL
)
,
_lightsComponent
(
NULL
)
,
_flightModesComponent
(
NULL
)
,
_powerComponent
(
NULL
)
#if 0
...
...
@@ -104,6 +106,12 @@ const QVariantList& APMAutoPilotPlugin::vehicleComponents(void)
_cameraComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_cameraComponent
));
if
(
_vehicle
->
sub
())
{
_lightsComponent
=
new
APMLightsComponent
(
_vehicle
,
this
);
_lightsComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_lightsComponent
));
}
//-- Is there an ESP8266 Connected?
if
(
_vehicle
->
parameterManager
()
->
parameterExists
(
MAV_COMP_ID_UDP_BRIDGE
,
"SW_VER"
))
{
_esp8266Component
=
new
ESP8266Component
(
_vehicle
,
this
);
...
...
src/AutoPilotPlugins/APM/APMAutoPilotPlugin.h
View file @
adc0c941
...
...
@@ -24,6 +24,7 @@ class APMSensorsComponent;
class
APMPowerComponent
;
class
MotorComponent
;
class
APMCameraComponent
;
class
APMLightsComponent
;
class
ESP8266Component
;
/// This is the APM specific implementation of the AutoPilot class.
...
...
@@ -40,6 +41,7 @@ public:
APMAirframeComponent
*
airframeComponent
(
void
)
const
{
return
_airframeComponent
;
}
APMCameraComponent
*
cameraComponent
(
void
)
const
{
return
_cameraComponent
;
}
APMLightsComponent
*
lightsComponent
(
void
)
const
{
return
_lightsComponent
;
}
APMFlightModesComponent
*
flightModesComponent
(
void
)
const
{
return
_flightModesComponent
;
}
APMPowerComponent
*
powerComponent
(
void
)
const
{
return
_powerComponent
;
}
#if 0
...
...
@@ -58,6 +60,7 @@ private:
APMAirframeComponent
*
_airframeComponent
;
APMCameraComponent
*
_cameraComponent
;
APMLightsComponent
*
_lightsComponent
;
APMFlightModesComponent
*
_flightModesComponent
;
APMPowerComponent
*
_powerComponent
;
#if 0
...
...
src/AutoPilotPlugins/APM/APMLightsComponent.cc
0 → 100644
View file @
adc0c941
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
/// @file
/// @author Don Gagne <don@thegagnes.com>
/// @author Rustom Jehangir <rusty@bluerobotics.com>
#include "APMLightsComponent.h"
#include "QGCQmlWidgetHolder.h"
#include "APMAutoPilotPlugin.h"
#include "APMAirframeComponent.h"
APMLightsComponent
::
APMLightsComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
VehicleComponent
(
vehicle
,
autopilot
,
parent
)
,
_name
(
tr
(
"Lights"
))
{
}
QString
APMLightsComponent
::
name
(
void
)
const
{
return
_name
;
}
QString
APMLightsComponent
::
description
(
void
)
const
{
return
tr
(
"The Lights Component is used to setup lights settings."
);
}
QString
APMLightsComponent
::
iconResource
(
void
)
const
{
return
QStringLiteral
(
"/qmlimages/LightsComponentIcon.png"
);
}
bool
APMLightsComponent
::
requiresSetup
(
void
)
const
{
return
false
;
}
bool
APMLightsComponent
::
setupComplete
(
void
)
const
{
return
true
;
}
QStringList
APMLightsComponent
::
setupCompleteChangedTriggerList
(
void
)
const
{
return
QStringList
();
}
QUrl
APMLightsComponent
::
setupSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
QStringLiteral
(
"qrc:/qml/APMLightsComponent.qml"
));
}
QUrl
APMLightsComponent
::
summaryQmlSource
(
void
)
const
{
return
QUrl
::
fromUserInput
(
QStringLiteral
(
"qrc:/qml/APMLightsComponentSummary.qml"
));
}
QString
APMLightsComponent
::
prerequisiteSetup
(
void
)
const
{
APMAutoPilotPlugin
*
plugin
=
dynamic_cast
<
APMAutoPilotPlugin
*>
(
_autopilot
);
Q_ASSERT
(
plugin
);
if
(
!
plugin
->
airframeComponent
()
->
setupComplete
())
{
return
plugin
->
airframeComponent
()
->
name
();
}
return
QString
();
}
src/AutoPilotPlugins/APM/APMLightsComponent.h
0 → 100644
View file @
adc0c941
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#ifndef APMLightsComponent_H
#define APMLightsComponent_H
#include "VehicleComponent.h"
class
APMLightsComponent
:
public
VehicleComponent
{
Q_OBJECT
public:
APMLightsComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Virtuals from VehicleComponent
QStringList
setupCompleteChangedTriggerList
(
void
)
const
final
;
// Virtuals from VehicleComponent
QString
name
(
void
)
const
final
;
QString
description
(
void
)
const
final
;
QString
iconResource
(
void
)
const
final
;
bool
requiresSetup
(
void
)
const
final
;
bool
setupComplete
(
void
)
const
final
;
QUrl
setupSource
(
void
)
const
final
;
QUrl
summaryQmlSource
(
void
)
const
final
;
QString
prerequisiteSetup
(
void
)
const
final
;
private:
const
QString
_name
;
};
#endif
src/AutoPilotPlugins/APM/APMLightsComponent.qml
0 → 100644
View file @
adc0c941
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCView
{
id
:
_lightsView
viewPanel
:
panel
anchors.fill
:
parent
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
enabled
}
property
Fact
_rc5Function
:
controller
.
getParameterFact
(
-
1
,
"
RC5_FUNCTION
"
)
property
Fact
_rc6Function
:
controller
.
getParameterFact
(
-
1
,
"
RC6_FUNCTION
"
)
property
Fact
_rc7Function
:
controller
.
getParameterFact
(
-
1
,
"
RC7_FUNCTION
"
)
property
Fact
_rc8Function
:
controller
.
getParameterFact
(
-
1
,
"
RC8_FUNCTION
"
)
property
Fact
_rc9Function
:
controller
.
getParameterFact
(
-
1
,
"
RC9_FUNCTION
"
)
property
Fact
_rc10Function
:
controller
.
getParameterFact
(
-
1
,
"
RC10_FUNCTION
"
)
property
Fact
_rc11Function
:
controller
.
getParameterFact
(
-
1
,
"
RC11_FUNCTION
"
)
property
Fact
_rc12Function
:
controller
.
getParameterFact
(
-
1
,
"
RC12_FUNCTION
"
)
property
Fact
_rc13Function
:
controller
.
getParameterFact
(
-
1
,
"
RC13_FUNCTION
"
)
property
Fact
_rc14Function
:
controller
.
getParameterFact
(
-
1
,
"
RC14_FUNCTION
"
)
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
int
_rcFunctionDisabled
:
0
readonly
property
int
_rcFunctionRCIN9
:
59
readonly
property
int
_rcFunctionRCIN10
:
60
readonly
property
int
_firstLightsOutChannel
:
5
readonly
property
int
_lastLightsOutChannel
:
14
Component.onCompleted
:
{
calcLightOutValues
()
}
/// Light output channels are stored in RC#_FUNCTION parameters. We need to loop through those
/// to find them and setup the ui accordindly.
function
calcLightOutValues
()
{
lightsLoader
.
lights1OutIndex
=
0
lightsLoader
.
lights2OutIndex
=
0
for
(
var
channel
=
_firstLightsOutChannel
;
channel
<=
_lastLightsOutChannel
;
channel
++
)
{
var
functionFact
=
controller
.
getParameterFact
(
-
1
,
"
RC
"
+
channel
+
"
_FUNCTION
"
)
if
(
functionFact
.
value
==
_rcFunctionRCIN9
)
{
lightsLoader
.
lights1OutIndex
=
channel
-
4
}
else
if
(
functionFact
.
value
==
_rcFunctionRCIN10
)
{
lightsLoader
.
lights2OutIndex
=
channel
-
4
}
}
}
function
setRCFunction
(
channel
,
rcFunction
)
{
// First clear any previous settings for this function
for
(
var
index
=
_firstLightsOutChannel
;
index
<=
_lastLightsOutChannel
;
index
++
)
{
var
functionFact
=
controller
.
getParameterFact
(
-
1
,
"
RC
"
+
index
+
"
_FUNCTION
"
)
if
(
functionFact
.
value
!=
_rcFunctionDisabled
&&
functionFact
.
value
==
rcFunction
)
{
functionFact
.
value
=
_rcFunctionDisabled
}
}
// Now set the function into the new channel
if
(
channel
!=
0
)
{
var
functionFact
=
controller
.
getParameterFact
(
-
1
,
"
RC
"
+
channel
+
"
_FUNCTION
"
)
functionFact
.
value
=
rcFunction
}
}
// Whenever any RC#_FUNCTION parameters chagnes we need to go looking for light output channels again
Connections
{
target
:
_rc5Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc6Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc7Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc8Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc9Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc10Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc11Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc12Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc13Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc14Function
;
onValueChanged
:
calcLightOutValues
()
}
ListModel
{
id
:
lightsOutModel
ListElement
{
text
:
qsTr
(
"
Disabled
"
);
value
:
0
}
ListElement
{
text
:
qsTr
(
"
Channel 5
"
);
value
:
5
}
ListElement
{
text
:
qsTr
(
"
Channel 6
"
);
value
:
6
}
ListElement
{
text
:
qsTr
(
"
Channel 7
"
);
value
:
7
}
ListElement
{
text
:
qsTr
(
"
Channel 8
"
);
value
:
8
}
ListElement
{
text
:
qsTr
(
"
Channel 9
"
);
value
:
9
}
ListElement
{
text
:
qsTr
(
"
Channel 10
"
);
value
:
10
}
ListElement
{
text
:
qsTr
(
"
Channel 11
"
);
value
:
11
}
ListElement
{
text
:
qsTr
(
"
Channel 12
"
);
value
:
12
}
ListElement
{
text
:
qsTr
(
"
Channel 13
"
);
value
:
13
}
ListElement
{
text
:
qsTr
(
"
Channel 14
"
);
value
:
14
}
}
Component
{
id
:
lightSettings
Item
{
width
:
rectangle
.
x
+
rectangle
.
width
height
:
rectangle
.
y
+
rectangle
.
height
QGCLabel
{
id
:
settingsLabel
text
:
qsTr
(
"
Light Settings
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
Rectangle
{
id
:
rectangle
anchors.topMargin
:
_margins
/
2
anchors.top
:
settingsLabel
.
bottom
width
:
lights1Combo
.
x
+
lights1Combo
.
width
+
_margins
height
:
lights2Combo
.
y
+
lights2Combo
.
height
+
_margins
color
:
palette
.
windowShade
QGCLabel
{
id
:
lights1Label
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.baseline
:
lights1Combo
.
baseline
text
:
qsTr
(
"
Lights 1:
"
)
}
QGCComboBox
{
id
:
lights1Combo
anchors.margins
:
_margins
anchors.top
:
parent
.
top
anchors.left
:
lights1Label
.
right
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
model
:
lightsOutModel
currentIndex
:
lights1OutIndex
onActivated
:
setRCFunction
(
lightsOutModel
.
get
(
index
).
value
,
lights1Function
)
}
QGCLabel
{
id
:
lights2Label
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.baseline
:
lights2Combo
.
baseline
text
:
qsTr
(
"
Lights 2:
"
)
}
QGCComboBox
{
id
:
lights2Combo
anchors.margins
:
_margins
anchors.top
:
lights1Combo
.
bottom
anchors.left
:
lights2Label
.
right
width
:
lights1Combo
.
width
model
:
lightsOutModel
currentIndex
:
lights2OutIndex
onActivated
:
setRCFunction
(
lightsOutModel
.
get
(
index
).
value
,
lights2Function
)
}
}
// Rectangle
}
// Item
}
// Component - lightSettings
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
QGCFlickable
{
clip
:
true
anchors.fill
:
parent
contentWidth
:
lightsLoader
.
x
+
lightsLoader
.
width
contentHeight
:
lightsLoader
.
y
+
lightsLoader
.
height
Loader
{
id
:
lightsLoader
sourceComponent
:
lightSettings
anchors.margins
:
_margins
anchors.top
:
parent
.
top
property
int
lights1OutIndex
:
0
property
int
lights2OutIndex
:
0
property
int
lights1Function
:
_rcFunctionRCIN9
property
int
lights2Function
:
_rcFunctionRCIN10
}
}
// Flickable
}
// QGCViewPanel
}
// QGCView
src/AutoPilotPlugins/APM/APMLightsComponentSummary.qml
0 → 100644
View file @
adc0c941
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
FactPanel
{
id
:
panel
anchors.fill
:
parent
color
:
qgcPal
.
windowShadeDark
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
FactPanelController
{
id
:
controller
;
factPanel
:
panel
}
property
Fact
_rc5Function
:
controller
.
getParameterFact
(
-
1
,
"
RC5_FUNCTION
"
)
property
Fact
_rc6Function
:
controller
.
getParameterFact
(
-
1
,
"
RC6_FUNCTION
"
)
property
Fact
_rc7Function
:
controller
.
getParameterFact
(
-
1
,
"
RC7_FUNCTION
"
)
property
Fact
_rc8Function
:
controller
.
getParameterFact
(
-
1
,
"
RC8_FUNCTION
"
)
property
Fact
_rc9Function
:
controller
.
getParameterFact
(
-
1
,
"
RC9_FUNCTION
"
)
property
Fact
_rc10Function
:
controller
.
getParameterFact
(
-
1
,
"
RC10_FUNCTION
"
)
property
Fact
_rc11Function
:
controller
.
getParameterFact
(
-
1
,
"
RC11_FUNCTION
"
)
property
Fact
_rc12Function
:
controller
.
getParameterFact
(
-
1
,
"
RC12_FUNCTION
"
)
property
Fact
_rc13Function
:
controller
.
getParameterFact
(
-
1
,
"
RC13_FUNCTION
"
)
property
Fact
_rc14Function
:
controller
.
getParameterFact
(
-
1
,
"
RC14_FUNCTION
"
)
readonly
property
int
_rcFunctionRCIN9
:
59
readonly
property
int
_rcFunctionRCIN10
:
60
readonly
property
int
_firstLightsOutChannel
:
5
readonly
property
int
_lastLightsOutChannel
:
14
Component.onCompleted
:
{
calcLightOutValues
()
}
/// Light output channels are stored in RC#_FUNCTION parameters. We need to loop through those
/// to find them and setup the ui accordindly.
function
calcLightOutValues
()
{
lightsLoader
.
lights1OutIndex
=
0
lightsLoader
.
lights2OutIndex
=
0
for
(
var
channel
=
_firstLightsOutChannel
;
channel
<=
_lastLightsOutChannel
;
channel
++
)
{
var
functionFact
=
controller
.
getParameterFact
(
-
1
,
"
RC
"
+
channel
+
"
_FUNCTION
"
)
if
(
functionFact
.
value
==
_rcFunctionRCIN9
)
{
lightsLoader
.
lights1OutIndex
=
channel
-
4
}
else
if
(
functionFact
.
value
==
_rcFunctionRCIN10
)
{
lightsLoader
.
lights2OutIndex
=
channel
-
4
}
}
}
// Whenever any RC#_FUNCTION parameters chagnes we need to go looking for light output channels again
Connections
{
target
:
_rc5Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc6Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc7Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc8Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc9Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc10Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc11Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc12Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc13Function
;
onValueChanged
:
calcLightOutValues
()
}
Connections
{
target
:
_rc14Function
;
onValueChanged
:
calcLightOutValues
()
}
ListModel
{
id
:
lightsOutModel
ListElement
{
text
:
qsTr
(
"
Disabled
"
);
value
:
0
}
ListElement
{
text
:
qsTr
(
"
Channel 5
"
);
value
:
5
}
ListElement
{
text
:
qsTr
(
"
Channel 6
"
);
value
:
6
}
ListElement
{
text
:
qsTr
(
"
Channel 7
"
);
value
:
7
}
ListElement
{
text
:
qsTr
(
"
Channel 8
"
);
value
:
8
}
ListElement
{
text
:
qsTr
(
"
Channel 9
"
);
value
:
9
}
ListElement
{
text
:
qsTr
(
"
Channel 10
"
);
value
:
10
}
ListElement
{
text
:
qsTr
(
"
Channel 11
"
);
value
:
11
}
ListElement
{
text
:
qsTr
(
"
Channel 12
"
);
value
:
12
}
ListElement
{
text
:
qsTr
(
"
Channel 13
"
);
value
:
13
}
ListElement
{
text
:
qsTr
(
"
Channel 14
"
);
value
:
14
}
}
Loader
{
id
:
lightsLoader
property
int
lights1OutIndex
:
0
property
int
lights2OutIndex
:
0
property
int
lights1Function
:
_rcFunctionRCIN9
property
int
lights2Function
:
_rcFunctionRCIN10
}
Column
{
anchors.fill
:
parent
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Lights Output 1:
"
)
valueText
:
lightsOutModel
.
get
(
lightsLoader
.
lights1OutIndex
).
text
}
VehicleSummaryRow
{
labelText
:
qsTr
(
"
Lights Output 2:
"
)
valueText
:
lightsOutModel
.
get
(
lightsLoader
.
lights2OutIndex
).
text
}
}
}
src/AutoPilotPlugins/APM/Images/LightsComponentIcon.png
0 → 100644
View file @
adc0c941
2.08 KB
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