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
ebdd072e
Commit
ebdd072e
authored
May 24, 2014
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up threading of UAS object, WIP
parent
ae848a5e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
9 deletions
+39
-9
qgroundcontrol.pro
qgroundcontrol.pro
+4
-2
QGCMAVLinkUASFactory.cc
src/uas/QGCMAVLinkUASFactory.cc
+2
-1
QGCUASWorker.cc
src/uas/QGCUASWorker.cc
+12
-0
QGCUASWorker.h
src/uas/QGCUASWorker.h
+15
-0
UAS.cc
src/uas/UAS.cc
+6
-6
No files found.
qgroundcontrol.pro
View file @
ebdd072e
...
...
@@ -562,7 +562,8 @@ HEADERS += \
src
/
ui
/
designer
/
QGCXYPlot
.
h
\
src
/
ui
/
menuactionhelper
.
h
\
src
/
uas
/
UASManagerInterface
.
h
\
src
/
uas
/
QGCUASParamManagerInterface
.
h
src
/
uas
/
QGCUASParamManagerInterface
.
h
\
src
/
uas
/
QGCUASWorker
.
h
SOURCES
+=
\
src
/
main
.
cc
\
...
...
@@ -745,4 +746,5 @@ SOURCES += \
src
/
ui
/
px4_configuration
/
QGCPX4MulticopterConfig
.
cc
\
src
/
ui
/
px4_configuration
/
QGCPX4SensorCalibration
.
cc
\
src
/
ui
/
designer
/
QGCXYPlot
.
cc
\
src
/
ui
/
menuactionhelper
.
cpp
src
/
ui
/
menuactionhelper
.
cpp
\
src
/
uas
/
QGCUASWorker
.
cc
src/uas/QGCMAVLinkUASFactory.cc
View file @
ebdd072e
#include "QGCMAVLinkUASFactory.h"
#include "UASManager.h"
#include "QGCUASWorker.h"
QGCMAVLinkUASFactory
::
QGCMAVLinkUASFactory
(
QObject
*
parent
)
:
QObject
(
parent
)
...
...
@@ -21,7 +22,7 @@ UASInterface* QGCMAVLinkUASFactory::createUAS(MAVLinkProtocol* mavlink, LinkInte
UASInterface
*
uas
;
Q
Thread
*
worker
=
new
QThread
();
Q
GCUASWorker
*
worker
=
new
QGCUASWorker
();
switch
(
heartbeat
->
autopilot
)
{
...
...
src/uas/QGCUASWorker.cc
0 → 100644
View file @
ebdd072e
#include "QGCUASWorker.h"
#include <QGC.h>
QGCUASWorker
::
QGCUASWorker
()
:
QThread
()
{
}
void
QGCUASWorker
::
run
()
{
QGC
::
SLEEP
::
msleep
(
100
);
}
src/uas/QGCUASWorker.h
0 → 100644
View file @
ebdd072e
#ifndef QGCUASWORKER_H
#define QGCUASWORKER_H
#include <QThread>
class
QGCUASWorker
:
public
QThread
{
public:
QGCUASWorker
();
protected:
void
run
();
};
#endif // QGCUASWORKER_H
src/uas/UAS.cc
View file @
ebdd072e
...
...
@@ -51,7 +51,7 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
commStatus
(
COMM_DISCONNECTED
),
receiveDropRate
(
0
),
sendDropRate
(
0
),
statusTimeout
(
new
QTimer
(
this
)),
statusTimeout
(
new
QTimer
()),
name
(
""
),
type
(
MAV_TYPE_GENERIC
),
...
...
@@ -138,7 +138,7 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
airSpeed
(
std
::
numeric_limits
<
double
>::
quiet_NaN
()),
groundSpeed
(
std
::
numeric_limits
<
double
>::
quiet_NaN
()),
waypointManager
(
this
),
waypointManager
(),
attitudeKnown
(
false
),
attitudeStamped
(
false
),
...
...
@@ -153,7 +153,7 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
paramsOnceRequested
(
false
),
paramMgr
(
this
),
paramMgr
(),
simulation
(
0
),
// The protected members.
...
...
@@ -180,17 +180,17 @@ UAS::UAS(MAVLinkProtocol* protocol, QThread* thread, int id) : UASInterface(),
// Store a list of available actions for this UAS.
// Basically everything exposed as a SLOT with no return value or arguments.
QAction
*
newAction
=
new
QAction
(
tr
(
"Arm"
),
th
is
);
QAction
*
newAction
=
new
QAction
(
tr
(
"Arm"
),
th
read
);
newAction
->
setToolTip
(
tr
(
"Enable the UAS so that all actuators are online"
));
connect
(
newAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
armSystem
()));
actions
.
append
(
newAction
);
newAction
=
new
QAction
(
tr
(
"Disarm"
),
th
is
);
newAction
=
new
QAction
(
tr
(
"Disarm"
),
th
read
);
newAction
->
setToolTip
(
tr
(
"Disable the UAS so that all actuators are offline"
));
connect
(
newAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
disarmSystem
()));
actions
.
append
(
newAction
);
newAction
=
new
QAction
(
tr
(
"Toggle armed"
),
th
is
);
newAction
=
new
QAction
(
tr
(
"Toggle armed"
),
th
read
);
newAction
->
setToolTip
(
tr
(
"Toggle between armed and disarmed"
));
connect
(
newAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
toggleAutonomy
()));
actions
.
append
(
newAction
);
...
...
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