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
77294085
Commit
77294085
authored
Oct 27, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update new lights step parameter setup for ArduSub
parent
71a57cb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
APMLightsComponent.qml
src/AutoPilotPlugins/APM/APMLightsComponent.qml
+24
-12
No files found.
src/AutoPilotPlugins/APM/APMLightsComponent.qml
View file @
77294085
...
...
@@ -11,6 +11,7 @@
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QGroundControl
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
Palette
1.0
...
...
@@ -32,6 +33,8 @@ SetupPage {
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
bool
_oldFW
:
!
(
_activeVehicle
.
firmwareMajorVersion
>
3
||
_activeVehicle
.
firmwareMinorVersion
>
5
||
_activeVehicle
.
firmwarePatchVersion
>=
2
)
property
Fact
_rc5Function
:
controller
.
getParameterFact
(
-
1
,
"
r.SERVO5_FUNCTION
"
)
property
Fact
_rc6Function
:
controller
.
getParameterFact
(
-
1
,
"
r.SERVO6_FUNCTION
"
)
property
Fact
_rc7Function
:
controller
.
getParameterFact
(
-
1
,
"
r.SERVO7_FUNCTION
"
)
...
...
@@ -42,7 +45,8 @@ SetupPage {
property
Fact
_rc12Function
:
controller
.
getParameterFact
(
-
1
,
"
r.SERVO12_FUNCTION
"
)
property
Fact
_rc13Function
:
controller
.
getParameterFact
(
-
1
,
"
r.SERVO13_FUNCTION
"
)
property
Fact
_rc14Function
:
controller
.
getParameterFact
(
-
1
,
"
r.SERVO14_FUNCTION
"
)
property
Fact
_stepSize
:
controller
.
getParameterFact
(
-
1
,
"
JS_LIGHTS_STEP
"
)
property
Fact
_stepSize
:
_oldFW
?
controller
.
getParameterFact
(
-
1
,
"
JS_LIGHTS_STEP
"
)
:
null
// v3.5.1 and prior
property
Fact
_numSteps
:
_oldFW
?
null
:
controller
.
getParameterFact
(
-
1
,
"
JS_LIGHTS_STEPS
"
)
// v3.5.2 and up
readonly
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
int
_rcFunctionDisabled
:
0
...
...
@@ -88,22 +92,30 @@ SetupPage {
}
function
calcCurrentStep
()
{
var
i
=
1
for
(
i
;
i
<=
10
;
i
++
)
{
var
stepSize
=
(
1900
-
1100
)
/
i
if
(
_stepSize
.
value
>=
stepSize
)
{
_stepSize
.
value
=
stepSize
;
break
;
if
(
_oldFW
)
{
var
i
=
1
for
(
i
;
i
<=
10
;
i
++
)
{
var
stepSize
=
(
1900
-
1100
)
/
i
if
(
_stepSize
.
value
>=
stepSize
)
{
_stepSize
.
value
=
stepSize
;
break
;
}
}
if
(
_stepSize
.
value
<
80
)
{
_stepSize
.
value
=
80
;
}
lightsLoader
.
lightsSteps
=
i
}
else
{
lightsLoader
.
lightsSteps
=
_numSteps
.
value
}
if
(
_stepSize
.
value
<
80
)
{
_stepSize
.
value
=
80
;
}
lightsLoader
.
lightsSteps
=
i
}
function
calcStepSize
(
steps
)
{
_stepSize
.
value
=
(
1900
-
1100
)
/
steps
if
(
_oldFW
)
{
_stepSize
.
value
=
(
1900
-
1100
)
/
steps
}
else
{
_numSteps
.
value
=
steps
}
}
// Whenever any SERVO#_FUNCTION parameters chagnes we need to go looking for light output channels again
...
...
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