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
4e035193
Commit
4e035193
authored
Dec 20, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix joystick input handling with multi-vehicle scenario
parent
d7e1b707
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
Vehicle.cc
src/Vehicle/Vehicle.cc
+6
-10
Vehicle.h
src/Vehicle/Vehicle.h
+0
-1
No files found.
src/Vehicle/Vehicle.cc
View file @
4e035193
...
...
@@ -182,7 +182,8 @@ Vehicle::Vehicle(LinkInterface* link,
{
_addLink
(
link
);
connect
(
_joystickManager
,
&
JoystickManager
::
activeJoystickChanged
,
this
,
&
Vehicle
::
_activeJoystickChanged
);
connect
(
_joystickManager
,
&
JoystickManager
::
activeJoystickChanged
,
this
,
&
Vehicle
::
_loadSettings
);
connect
(
qgcApp
()
->
toolbox
()
->
multiVehicleManager
(),
&
MultiVehicleManager
::
activeVehicleAvailableChanged
,
this
,
&
Vehicle
::
_loadSettings
);
_mavlink
=
_toolbox
->
mavlinkProtocol
();
...
...
@@ -230,7 +231,6 @@ Vehicle::Vehicle(LinkInterface* link,
connect
(
_mav
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
_updateAttitude
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
connect
(
_mav
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
int
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
_updateAttitude
(
UASInterface
*
,
int
,
double
,
double
,
double
,
quint64
)));
_loadSettings
();
// Ask the vehicle for protocol version info.
sendMavCommand
(
MAV_COMP_ID_ALL
,
// Don't know default component id yet.
...
...
@@ -1611,6 +1611,10 @@ int Vehicle::manualControlReservedButtonCount(void)
void
Vehicle
::
_loadSettings
(
void
)
{
if
(
!
_active
)
{
return
;
}
QSettings
settings
;
settings
.
beginGroup
(
QString
(
_settingsGroup
).
arg
(
_id
));
...
...
@@ -1669,12 +1673,6 @@ QStringList Vehicle::joystickModes(void)
return
list
;
}
void
Vehicle
::
_activeJoystickChanged
(
void
)
{
_loadSettings
();
_startJoystick
(
true
);
}
bool
Vehicle
::
joystickEnabled
(
void
)
{
return
_joystickEnabled
;
...
...
@@ -1713,8 +1711,6 @@ void Vehicle::setActive(bool active)
_active
=
active
;
emit
activeChanged
(
_active
);
}
_startJoystick
(
_active
);
}
QGeoCoordinate
Vehicle
::
homePosition
(
void
)
...
...
src/Vehicle/Vehicle.h
View file @
4e035193
...
...
@@ -870,7 +870,6 @@ private slots:
void
_geoFenceLoadComplete
(
void
);
void
_rallyPointLoadComplete
(
void
);
void
_sendMavCommandAgain
(
void
);
void
_activeJoystickChanged
(
void
);
void
_clearTrajectoryPoints
(
void
);
void
_clearCameraTriggerPoints
(
void
);
void
_updateDistanceToHome
(
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