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
e87936cc
Commit
e87936cc
authored
Sep 08, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DSM-X support
parent
5322c774
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
7 deletions
+38
-7
QGCPX4VehicleConfig.cc
src/ui/QGCPX4VehicleConfig.cc
+15
-1
QGCPX4VehicleConfig.ui
src/ui/QGCPX4VehicleConfig.ui
+23
-6
No files found.
src/ui/QGCPX4VehicleConfig.cc
View file @
e87936cc
...
...
@@ -335,9 +335,23 @@ void QGCPX4VehicleConfig::toggleCalibrationRC(bool enabled)
void
QGCPX4VehicleConfig
::
toggleSpektrumPairing
(
bool
enabled
)
{
if
(
!
ui
->
dsm2RadioButton
->
isChecked
()
&&
!
ui
->
dsmxRadioButton
)
{
// Reject
QMessageBox
warnMsgBox
;
warnMsgBox
.
setText
(
tr
(
"Please select a Spektrum Protocol Version"
));
warnMsgBox
.
setInformativeText
(
tr
(
"Please select either DSM2 or DSM-X
\n
directly below the pair button,
\n
based on the receiver type."
));
warnMsgBox
.
setStandardButtons
(
QMessageBox
::
Ok
);
warnMsgBox
.
setDefaultButton
(
QMessageBox
::
Ok
);
(
void
)
warnMsgBox
.
exec
();
}
if
(
enabled
)
{
mav
->
getParamManager
()
->
setPendingParam
(
0
,
"RC_DSM_BIND"
,
(
int
)
1
);
int
mode
=
1
;
// DSM2
if
(
ui
->
dsmxRadioButton
->
isChecked
())
mode
=
2
;
// DSMX
mav
->
getParamManager
()
->
setPendingParam
(
0
,
"RC_DSM_BIND"
,
mode
);
// Do not save this parameter, just set in RAM
mav
->
getParamManager
()
->
sendPendingParameters
();
}
...
...
src/ui/QGCPX4VehicleConfig.ui
View file @
e87936cc
...
...
@@ -205,6 +205,23 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"dsm2RadioButton"
>
<property
name=
"text"
>
<string>
DSM2 Mode
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"dsmxRadioButton"
>
<property
name=
"text"
>
<string>
DSMX Mode
</string>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer_3"
>
<property
name=
"orientation"
>
...
...
@@ -853,8 +870,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
16
</width>
<height>
16
</height>
<width>
98
</width>
<height>
28
</height>
</rect>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
...
...
@@ -890,8 +907,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
16
</width>
<height>
16
</height>
<width>
98
</width>
<height>
28
</height>
</rect>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_5"
>
...
...
@@ -941,8 +958,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
16
</width>
<height>
16
</height>
<width>
98
</width>
<height>
28
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_7"
>
...
...
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