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
1c146595
Unverified
Commit
1c146595
authored
Oct 24, 2019
by
Beat Küng
Committed by
GitHub
Oct 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7941 from mavlink/px4_motor_test
PX4: enable motor test UI
parents
f36047c0
3328476b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
32 deletions
+37
-32
MotorComponent.qml
src/AutoPilotPlugins/Common/MotorComponent.qml
+37
-29
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+0
-3
No files found.
src/AutoPilotPlugins/Common/MotorComponent.qml
View file @
1c146595
...
...
@@ -20,9 +20,10 @@ SetupPage {
id
:
motorPage
pageComponent
:
pageComponent
readonly
property
int
_barHeight
:
10
readonly
property
int
_barWidth
:
5
readonly
property
int
_sliderHeight
:
10
readonly
property
int
_barHeight
:
10
readonly
property
int
_barWidth
:
5
readonly
property
int
_sliderHeight
:
10
readonly
property
int
_motorTimeoutSecs
:
3
FactPanelController
{
id
:
controller
...
...
@@ -32,7 +33,13 @@ SetupPage {
id
:
pageComponent
Column
{
spacing
:
10
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
text
:
qsTr
(
"
Warning: Unable to determine motor count
"
)
color
:
qgcPal
.
warningText
visible
:
controller
.
vehicle
.
motorCount
==
-
1
}
Row
{
id
:
motorSliders
...
...
@@ -46,20 +53,6 @@ SetupPage {
Column
{
property
alias
motorSlider
:
slider
Timer
{
interval
:
250
running
:
true
repeat
:
true
property
real
_lastValue
:
0
onTriggered
:
{
if
(
_lastValue
!==
slider
.
value
)
{
controller
.
vehicle
.
motorTest
(
index
+
1
,
slider
.
value
,
1
)
}
}
}
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
index
+
1
...
...
@@ -69,8 +62,30 @@ SetupPage {
id
:
slider
height
:
ScreenTools
.
defaultFontPixelHeight
*
_sliderHeight
orientation
:
Qt
.
Vertical
minimumValue
:
0
maximumValue
:
100
stepSize
:
1
value
:
0
updateValueWhileDragging
:
false
onValueChanged
:
{
controller
.
vehicle
.
motorTest
(
index
+
1
,
value
,
value
==
0
?
0
:
_motorTimeoutSecs
)
if
(
value
!=
0
)
{
motorTimer
.
restart
()
}
}
Timer
{
id
:
motorTimer
interval
:
_motorTimeoutSecs
*
1000
repeat
:
false
running
:
false
onTriggered
:
{
allSlider
.
value
=
0
slider
.
value
=
0
}
}
}
}
// Column
}
// Repeater
...
...
@@ -85,8 +100,11 @@ SetupPage {
id
:
allSlider
height
:
ScreenTools
.
defaultFontPixelHeight
*
_sliderHeight
orientation
:
Qt
.
Vertical
minimumValue
:
0
maximumValue
:
100
stepSize
:
1
value
:
0
updateValueWhileDragging
:
false
onValueChanged
:
{
for
(
var
sliderIndex
=
0
;
sliderIndex
<
sliderRepeater
.
count
;
sliderIndex
++
)
{
...
...
@@ -95,16 +113,6 @@ SetupPage {
}
}
}
// Column
MultiRotorMotorDisplay
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
height
motorCount
:
controller
.
vehicle
.
motorCount
xConfig
:
controller
.
vehicle
.
xConfigMotors
coaxial
:
controller
.
vehicle
.
coaxialMotors
}
}
// Row
QGCLabel
{
...
...
@@ -131,7 +139,7 @@ SetupPage {
QGCLabel
{
color
:
qgcPal
.
warningText
text
:
qsTr
(
"
Propellers are removed - Enable motor sliders
"
)
text
:
safetySwitch
.
checked
?
qsTr
(
"
Careful: Motor sliders are enabled
"
)
:
qsTr
(
"
Propellers are removed - Enable motor sliders
"
)
}
}
// Row
}
// Column
...
...
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
1c146595
...
...
@@ -84,12 +84,9 @@ const QVariantList& PX4AutoPilotPlugin::vehicleComponents(void)
_powerComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_powerComponent
));
#if 0
// Coming soon
_motorComponent
=
new
MotorComponent
(
_vehicle
,
this
);
_motorComponent
->
setupTriggerSignals
();
_components
.
append
(
QVariant
::
fromValue
((
VehicleComponent
*
)
_motorComponent
));
#endif
_safetyComponent
=
new
SafetyComponent
(
_vehicle
,
this
);
_safetyComponent
->
setupTriggerSignals
();
...
...
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