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
e42fd916
Unverified
Commit
e42fd916
authored
Nov 12, 2018
by
Don Gagne
Committed by
GitHub
Nov 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6999 from DonLakeFlyer/RadioSetup
Radio setup: Rework ui
parents
dff4c0ef
75f419d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
77 deletions
+50
-77
RadioComponent.qml
src/AutoPilotPlugins/Common/RadioComponent.qml
+45
-44
MockLink.cc
src/comm/MockLink.cc
+4
-10
MainWindow.cc
src/ui/MainWindow.cc
+0
-3
MainWindow.ui
src/ui/MainWindow.ui
+1
-20
No files found.
src/AutoPilotPlugins/Common/RadioComponent.qml
View file @
e42fd916
...
...
@@ -7,10 +7,10 @@
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.11
import
QGroundControl
1.0
import
QGroundControl
.
FactSystem
1.0
...
...
@@ -348,9 +348,8 @@ SetupPage {
}
Connections
{
target
:
controller
onThrottleChannelRCValueChanged
:
throttleLoader
.
item
.
rcValue
=
rcValue
target
:
controller
onThrottleChannelRCValueChanged
:
throttleLoader
.
item
.
rcValue
=
rcValue
}
}
}
// Column - Attitude Control labels
...
...
@@ -362,15 +361,13 @@ SetupPage {
QGCButton
{
id
:
skipButton
text
:
qsTr
(
"
Skip
"
)
onClicked
:
controller
.
skipButtonClicked
()
onClicked
:
controller
.
skipButtonClicked
()
}
QGCButton
{
id
:
cancelButton
text
:
qsTr
(
"
Cancel
"
)
onClicked
:
controller
.
cancelButtonClicked
()
onClicked
:
controller
.
cancelButtonClicked
()
}
QGCButton
{
...
...
@@ -395,11 +392,6 @@ SetupPage {
wrapMode
:
Text
.
WordWrap
}
Item
{
width
:
10
height
:
defaultTextHeight
*
4
}
Rectangle
{
width
:
parent
.
width
height
:
1
...
...
@@ -409,42 +401,50 @@ SetupPage {
QGCLabel
{
text
:
qsTr
(
"
Additional Radio setup:
"
)
}
QGCButton
{
id
:
bindButton
text
:
qsTr
(
"
Spektrum Bind
"
)
onClicked
:
showDialog
(
spektrumBindDialogComponent
,
dialogTitle
,
radioPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
GridLayout
{
id
:
switchSettingsGrid
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columns
:
2
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
QGCButton
{
text
:
qsTr
(
"
Copy Trims
"
)
onClicked
:
showDialog
(
copyTrimsDialogComponent
,
dialogTitle
,
radioPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
Repeater
{
model
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
px4Firmware
?
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
multiRotor
?
[
"
RC_MAP_AUX1
"
,
"
RC_MAP_AUX2
"
,
"
RC_MAP_PARAM1
"
,
"
RC_MAP_PARAM2
"
,
"
RC_MAP_PARAM3
"
]
:
[
"
RC_MAP_FLAPS
"
,
"
RC_MAP_AUX1
"
,
"
RC_MAP_AUX2
"
,
"
RC_MAP_PARAM1
"
,
"
RC_MAP_PARAM2
"
,
"
RC_MAP_PARAM3
"
])
:
0
Repeater
{
model
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
px4Firmware
?
(
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
multiRotor
?
[
"
RC_MAP_AUX1
"
,
"
RC_MAP_AUX2
"
,
"
RC_MAP_PARAM1
"
,
"
RC_MAP_PARAM2
"
,
"
RC_MAP_PARAM3
"
]
:
[
"
RC_MAP_FLAPS
"
,
"
RC_MAP_AUX1
"
,
"
RC_MAP_AUX2
"
,
"
RC_MAP_PARAM1
"
,
"
RC_MAP_PARAM2
"
,
"
RC_MAP_PARAM3
"
])
:
0
RowLayout
{
Layout.fillWidth
:
true
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
modelData
)
property
Fact
fact
:
controller
.
getParameterFact
(
-
1
,
modelData
)
QGCLabel
{
anchors.baseline
:
optCombo
.
baseline
text
:
fact
.
shortDescription
+
"
:
"
QGCLabel
{
Layout.fillWidth
:
true
text
:
fact
.
shortDescription
}
FactComboBox
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
parent
.
fact
indexModel
:
false
}
}
}
}
FactComboBox
{
id
:
optCombo
width
:
ScreenTools
.
defaultFontPixelWidth
*
15
fact
:
parent
.
fact
indexModel
:
false
}
RowLayout
{
QGCButton
{
id
:
bindButton
text
:
qsTr
(
"
Spektrum Bind
"
)
onClicked
:
showDialog
(
spektrumBindDialogComponent
,
dialogTitle
,
radioPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
// Repeater
QGCButton
{
text
:
qsTr
(
"
Copy Trims
"
)
onClicked
:
showDialog
(
copyTrimsDialogComponent
,
dialogTitle
,
radioPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
// Column - Left Column
Item
{
...
...
@@ -458,7 +458,7 @@ SetupPage {
id
:
rightColumn
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
width
:
Math
.
min
(
radioPage
.
defaultTextWidth
*
35
,
availableWidth
*
0.4
)
width
:
ScreenTools
.
defaultFontPixelWidth
*
40
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
Row
{
...
...
@@ -491,7 +491,8 @@ SetupPage {
}
RCChannelMonitor
{
width
:
parent
.
width
width
:
parent
.
width
twoColumn
:
true
}
}
// Column - Right Column
}
// Item
...
...
src/comm/MockLink.cc
View file @
e42fd916
...
...
@@ -1220,16 +1220,10 @@ void MockLink::_sendRCChannels(void)
_mavlinkChannel
,
&
msg
,
0
,
// time_boot_ms
8
,
// chancount
1500
,
// chan1_raw
1500
,
// chan2_raw
1500
,
// chan3_raw
1500
,
// chan4_raw
1500
,
// chan5_raw
1500
,
// chan6_raw
1500
,
// chan7_raw
1500
,
// chan8_raw
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
UINT16_MAX
,
16
,
// chancount
1500
,
1500
,
1500
,
1500
,
1500
,
1500
,
1500
,
1500
,
// channel 1-8
1500
,
1500
,
1500
,
1500
,
1500
,
1500
,
1500
,
1500
,
// channel 9-16
UINT16_MAX
,
UINT16_MAX
,
0
);
// rssi
respondWithMavlinkMessage
(
msg
);
...
...
src/ui/MainWindow.cc
View file @
e42fd916
...
...
@@ -131,9 +131,6 @@ MainWindow::MainWindow()
emit
initStatusChanged
(
tr
(
"Setting up user interface"
),
Qt
::
AlignLeft
|
Qt
::
AlignBottom
,
QColor
(
62
,
93
,
141
));
_ui
.
setupUi
(
this
);
// Make sure tool bar elements all fit before changing minimum width
setMinimumWidth
(
1024
);
setMinimumHeight
(
620
);
configureWindowName
();
// Setup central widget with a layout to hold the views
...
...
src/ui/MainWindow.ui
View file @
e42fd916
...
...
@@ -10,12 +10,6 @@
<height>
600
</height>
</rect>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
640
</width>
<height>
400
</height>
</size>
</property>
<property
name=
"baseSize"
>
<size>
<width>
1100
</width>
...
...
@@ -31,20 +25,7 @@
<property
name=
"styleSheet"
>
<string
notr=
"true"
/>
</property>
<widget
class=
"QWidget"
name=
"centralWidget"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"MinimumExpanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
200
</width>
<height>
150
</height>
</size>
</property>
</widget>
<widget
class=
"QWidget"
name=
"centralWidget"
/>
<widget
class=
"QMenuBar"
name=
"menuBar"
>
<property
name=
"geometry"
>
<rect>
...
...
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