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
f8a07f3c
Commit
f8a07f3c
authored
Jan 24, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable joystick TX mode selection during calibration
parent
21099441
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+4
-0
JoystickConfigController.cc
src/VehicleSetup/JoystickConfigController.cc
+3
-1
JoystickConfigController.h
src/VehicleSetup/JoystickConfigController.h
+4
-0
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
f8a07f3c
...
...
@@ -659,6 +659,7 @@ SetupPage {
exclusiveGroup
:
modeGroup
text
:
"
1
"
checked
:
controller
.
transmitterMode
==
1
enabled
:
!
controller
.
calibrating
onClicked
:
controller
.
transmitterMode
=
1
}
...
...
@@ -667,6 +668,7 @@ SetupPage {
exclusiveGroup
:
modeGroup
text
:
"
2
"
checked
:
controller
.
transmitterMode
==
2
enabled
:
!
controller
.
calibrating
onClicked
:
controller
.
transmitterMode
=
2
}
...
...
@@ -675,6 +677,7 @@ SetupPage {
exclusiveGroup
:
modeGroup
text
:
"
3
"
checked
:
controller
.
transmitterMode
==
3
enabled
:
!
controller
.
calibrating
onClicked
:
controller
.
transmitterMode
=
3
}
...
...
@@ -683,6 +686,7 @@ SetupPage {
exclusiveGroup
:
modeGroup
text
:
"
4
"
checked
:
controller
.
transmitterMode
==
4
enabled
:
!
controller
.
calibrating
onClicked
:
controller
.
transmitterMode
=
4
}
...
...
src/VehicleSetup/JoystickConfigController.cc
View file @
f8a07f3c
...
...
@@ -597,6 +597,7 @@ void JoystickConfigController::_startCalibration(void)
_currentStep
=
0
;
_setupCurrentState
();
emit
calibratingChanged
();
}
/// @brief Cancels the calibration process, setting things back to initial state.
...
...
@@ -615,6 +616,7 @@ void JoystickConfigController::_stopCalibration(void)
_skipButton
->
setEnabled
(
false
);
_setHelpImage
(
_imageCenter
);
emit
calibratingChanged
();
}
/// @brief Saves the current axis values, so that we can detect when the use moves an input.
...
...
@@ -810,7 +812,7 @@ void JoystickConfigController::setTransmitterMode(int mode)
{
if
(
mode
>
0
&&
mode
<=
4
)
{
_transmitterMode
=
mode
;
if
(
_currentStep
!=
-
1
)
{
if
(
_currentStep
!=
-
1
)
{
// This should never be true, mode selection is disabled during calibration
const
stateMachineEntry
*
state
=
_getStateMachineEntry
(
_currentStep
);
_setHelpImage
(
state
->
image
);
}
else
{
...
...
src/VehicleSetup/JoystickConfigController.h
View file @
f8a07f3c
...
...
@@ -71,6 +71,7 @@ public:
Q_PROPERTY
(
int
transmitterMode
READ
transmitterMode
WRITE
setTransmitterMode
NOTIFY
transmitterModeChanged
)
Q_PROPERTY
(
QString
imageHelp
MEMBER
_imageHelp
NOTIFY
imageHelpChanged
)
Q_PROPERTY
(
bool
calibrating
READ
calibrating
NOTIFY
calibratingChanged
)
Q_INVOKABLE
void
cancelButtonClicked
(
void
);
Q_INVOKABLE
void
skipButtonClicked
(
void
);
...
...
@@ -104,6 +105,8 @@ public:
int
transmitterMode
(
void
)
{
return
_transmitterMode
;
}
void
setTransmitterMode
(
int
mode
);
bool
calibrating
(
void
)
{
return
_currentStep
!=
-
1
;
}
signals:
void
axisValueChanged
(
int
axis
,
int
value
);
...
...
@@ -132,6 +135,7 @@ signals:
void
imageHelpChanged
(
QString
source
);
void
transmitterModeChanged
(
int
mode
);
void
calibratingChanged
(
void
);
// @brief Signalled when in unit test mode and a message box should be displayed by the next button
void
nextButtonMessageBoxDisplayed
(
void
);
...
...
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