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
64c86bf1
Commit
64c86bf1
authored
Feb 26, 2017
by
nanthony21
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused code
parent
9d805767
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
127 deletions
+0
-127
JoystickConfig.qml
src/VehicleSetup/JoystickConfig.qml
+0
-2
JoystickConfigController.cc
src/VehicleSetup/JoystickConfigController.cc
+0
-95
JoystickConfigController.h
src/VehicleSetup/JoystickConfigController.h
+0
-30
No files found.
src/VehicleSetup/JoystickConfig.qml
View file @
64c86bf1
...
...
@@ -84,8 +84,6 @@ SetupPage {
property
int
axisValue
:
0
property
int
deadbandValue
:
0
property
int
__lastAxisValue
:
0
readonly
property
int
__axisValueMaxJitter
:
100
property
color
__barColor
:
qgcPal
.
windowShade
// Bar
...
...
src/VehicleSetup/JoystickConfigController.cc
View file @
64c86bf1
...
...
@@ -144,26 +144,6 @@ void JoystickConfigController::_axisValueChanged(int axis, int value)
// We always update raw values
_axisRawValue
[
axis
]
=
value
;
emit
axisValueChanged
(
axis
,
_axisRawValue
[
axis
]);
// Signal attitude axis values to Qml if mapped
if
(
_rgAxisInfo
[
axis
].
function
!=
Joystick
::
maxFunction
)
{
switch
(
_rgAxisInfo
[
axis
].
function
)
{
case
Joystick
:
:
rollFunction
:
emit
rollAxisValueChanged
(
_axisRawValue
[
axis
]);
break
;
case
Joystick
:
:
pitchFunction
:
emit
pitchAxisValueChanged
(
_axisRawValue
[
axis
]);
break
;
case
Joystick
:
:
yawFunction
:
emit
yawAxisValueChanged
(
_axisRawValue
[
axis
]);
break
;
case
Joystick
:
:
throttleFunction
:
emit
throttleAxisValueChanged
(
_axisRawValue
[
axis
]);
break
;
default:
break
;
}
}
//qCDebug(JoystickConfigControllerLog) << "Raw value" << axis << value;
...
...
@@ -685,77 +665,7 @@ int JoystickConfigController::axisCount(void)
return
_axisCount
;
}
int
JoystickConfigController
::
rollAxisValue
(
void
)
{
if
(
_rgFunctionAxisMapping
[
Joystick
::
rollFunction
]
!=
_axisNoAxis
)
{
return
_axisRawValue
[
Joystick
::
rollFunction
];
}
else
{
return
1500
;
}
}
int
JoystickConfigController
::
pitchAxisValue
(
void
)
{
if
(
_rgFunctionAxisMapping
[
Joystick
::
pitchFunction
]
!=
_axisNoAxis
)
{
return
_axisRawValue
[
Joystick
::
pitchFunction
];
}
else
{
return
1500
;
}
}
int
JoystickConfigController
::
yawAxisValue
(
void
)
{
if
(
_rgFunctionAxisMapping
[
Joystick
::
yawFunction
]
!=
_axisNoAxis
)
{
return
_axisRawValue
[
Joystick
::
yawFunction
];
}
else
{
return
1500
;
}
}
int
JoystickConfigController
::
throttleAxisValue
(
void
)
{
if
(
_rgFunctionAxisMapping
[
Joystick
::
throttleFunction
]
!=
_axisNoAxis
)
{
return
_axisRawValue
[
Joystick
::
throttleFunction
];
}
else
{
return
1500
;
}
}
int
JoystickConfigController
::
rollAxisDeadband
(
void
)
{
if
((
_rgFunctionAxisMapping
[
Joystick
::
rollFunction
]
!=
_axisNoAxis
)
&&
(
_activeJoystick
->
deadband
()))
{
return
_rgAxisInfo
[
_rgFunctionAxisMapping
[
Joystick
::
rollFunction
]].
deadband
;
}
else
{
return
0
;
}
}
int
JoystickConfigController
::
pitchAxisDeadband
(
void
)
{
if
((
_rgFunctionAxisMapping
[
Joystick
::
pitchFunction
]
!=
_axisNoAxis
)
&&
(
_activeJoystick
->
deadband
()))
{
return
_rgAxisInfo
[
_rgFunctionAxisMapping
[
Joystick
::
pitchFunction
]].
deadband
;
}
else
{
return
0
;
}
}
int
JoystickConfigController
::
yawAxisDeadband
(
void
)
{
if
((
_rgFunctionAxisMapping
[
Joystick
::
yawFunction
]
!=
_axisNoAxis
)
&&
(
_activeJoystick
->
deadband
()))
{
return
_rgAxisInfo
[
_rgFunctionAxisMapping
[
Joystick
::
yawFunction
]].
deadband
;
}
else
{
return
0
;
}
}
int
JoystickConfigController
::
throttleAxisDeadband
(
void
)
{
if
((
_rgFunctionAxisMapping
[
Joystick
::
throttleFunction
]
!=
_axisNoAxis
)
&&
(
_activeJoystick
->
deadband
()))
{
return
_rgAxisInfo
[
_rgFunctionAxisMapping
[
Joystick
::
throttleFunction
]].
deadband
;
}
else
{
return
0
;
}
}
bool
JoystickConfigController
::
rollAxisMapped
(
void
)
{
...
...
@@ -839,11 +749,6 @@ void JoystickConfigController::_signalAllAttitudeValueChanges(void)
emit
yawAxisReversedChanged
(
yawAxisReversed
());
emit
throttleAxisReversedChanged
(
throttleAxisReversed
());
emit
rollAxisDeadbandChanged
(
rollAxisDeadband
());
emit
pitchAxisDeadbandChanged
(
pitchAxisDeadband
());
emit
yawAxisDeadbandChanged
(
yawAxisDeadband
());
emit
throttleAxisDeadbandChanged
(
throttleAxisDeadband
());
emit
transmitterModeChanged
(
_transmitterMode
);
}
...
...
src/VehicleSetup/JoystickConfigController.h
View file @
64c86bf1
...
...
@@ -52,16 +52,6 @@ public:
Q_PROPERTY
(
bool
yawAxisMapped
READ
yawAxisMapped
NOTIFY
yawAxisMappedChanged
)
Q_PROPERTY
(
bool
throttleAxisMapped
READ
throttleAxisMapped
NOTIFY
throttleAxisMappedChanged
)
Q_PROPERTY
(
int
rollAxisValue
READ
rollAxisValue
NOTIFY
rollAxisValueChanged
)
Q_PROPERTY
(
int
pitchAxisValue
READ
pitchAxisValue
NOTIFY
pitchAxisValueChanged
)
Q_PROPERTY
(
int
yawAxisValue
READ
yawAxisValue
NOTIFY
yawAxisValueChanged
)
Q_PROPERTY
(
int
throttleAxisValue
READ
throttleAxisValue
NOTIFY
throttleAxisValueChanged
)
Q_PROPERTY
(
int
rollAxisDeadband
READ
rollAxisDeadband
NOTIFY
rollAxisDeadbandChanged
)
Q_PROPERTY
(
int
pitchAxisDeadband
READ
pitchAxisDeadband
NOTIFY
pitchAxisDeadbandChanged
)
Q_PROPERTY
(
int
yawAxisDeadband
READ
yawAxisDeadband
NOTIFY
yawAxisDeadbandChanged
)
Q_PROPERTY
(
int
throttleAxisDeadband
READ
throttleAxisDeadband
NOTIFY
throttleAxisDeadbandChanged
)
Q_PROPERTY
(
int
rollAxisReversed
READ
rollAxisReversed
NOTIFY
rollAxisReversedChanged
)
Q_PROPERTY
(
int
pitchAxisReversed
READ
pitchAxisReversed
NOTIFY
pitchAxisReversedChanged
)
Q_PROPERTY
(
int
yawAxisReversed
READ
yawAxisReversed
NOTIFY
yawAxisReversedChanged
)
...
...
@@ -78,16 +68,6 @@ public:
Q_INVOKABLE
void
nextButtonClicked
(
void
);
Q_INVOKABLE
void
start
(
void
);
int
rollAxisValue
(
void
);
int
pitchAxisValue
(
void
);
int
yawAxisValue
(
void
);
int
throttleAxisValue
(
void
);
int
rollAxisDeadband
(
void
);
int
pitchAxisDeadband
(
void
);
int
yawAxisDeadband
(
void
);
int
throttleAxisDeadband
(
void
);
bool
rollAxisMapped
(
void
);
bool
pitchAxisMapped
(
void
);
bool
yawAxisMapped
(
void
);
...
...
@@ -116,16 +96,6 @@ signals:
void
pitchAxisMappedChanged
(
bool
mapped
);
void
yawAxisMappedChanged
(
bool
mapped
);
void
throttleAxisMappedChanged
(
bool
mapped
);
void
rollAxisValueChanged
(
int
value
);
void
pitchAxisValueChanged
(
int
value
);
void
yawAxisValueChanged
(
int
value
);
void
throttleAxisValueChanged
(
int
value
);
void
rollAxisDeadbandChanged
(
int
value
);
void
pitchAxisDeadbandChanged
(
int
value
);
void
yawAxisDeadbandChanged
(
int
value
);
void
throttleAxisDeadbandChanged
(
int
value
);
void
rollAxisReversedChanged
(
bool
reversed
);
void
pitchAxisReversedChanged
(
bool
reversed
);
...
...
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