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
e107a34a
Commit
e107a34a
authored
Jan 02, 2021
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
40da114d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
218 additions
and
61 deletions
+218
-61
qgroundcontrol.pro
qgroundcontrol.pro
+4
-0
NemoInterface.cpp
src/MeasurementComplexItem/NemoInterface.cpp
+142
-53
NemoInterface.h
src/MeasurementComplexItem/NemoInterface.h
+16
-8
Command.cpp
src/MeasurementComplexItem/nemo_interface/Command.cpp
+9
-0
Command.h
src/MeasurementComplexItem/nemo_interface/Command.h
+30
-0
CommandDispatcher.cpp
...asurementComplexItem/nemo_interface/CommandDispatcher.cpp
+6
-0
CommandDispatcher.h
...MeasurementComplexItem/nemo_interface/CommandDispatcher.h
+11
-0
No files found.
qgroundcontrol.pro
View file @
e107a34a
...
...
@@ -453,6 +453,8 @@ HEADERS += \
src
/
MeasurementComplexItem
/
geometry
/
TileDiff
.
h
\
src
/
MeasurementComplexItem
/
geometry
/
geometry
.
h
\
src
/
MeasurementComplexItem
/
HashFunctions
.
h
\
src
/
MeasurementComplexItem
/
nemo_interface
/
Command
.
h
\
src
/
MeasurementComplexItem
/
nemo_interface
/
CommandDispatcher
.
h
\
src
/
MeasurementComplexItem
/
nemo_interface
/
MeasurementTile
.
h
\
src
/
QmlControls
/
QmlUnitsConversion
.
h
\
src
/
MeasurementComplexItem
/
geometry
/
GeoArea
.
h
\
...
...
@@ -534,6 +536,8 @@ SOURCES += \
src
/
MeasurementComplexItem
/
geometry
/
SafeArea
.
cc
\
src
/
MeasurementComplexItem
/
geometry
/
geometry
.
cpp
\
src
/
MeasurementComplexItem
/
HashFunctions
.
cpp
\
src
/
MeasurementComplexItem
/
nemo_interface
/
Command
.
cpp
\
src
/
MeasurementComplexItem
/
nemo_interface
/
CommandDispatcher
.
cpp
\
src
/
MeasurementComplexItem
/
nemo_interface
/
MeasurementTile
.
cpp
\
src
/
Vehicle
/
VehicleEscStatusFactGroup
.
cc
\
src
/
MeasurementComplexItem
/
AreaData
.
cc
\
...
...
src/MeasurementComplexItem/NemoInterface.cpp
View file @
e107a34a
This diff is collapsed.
Click to expand it.
src/MeasurementComplexItem/NemoInterface.h
View file @
e107a34a
...
...
@@ -9,6 +9,7 @@
#include "LogicalArray.h"
#include "TileArray.h"
#include "TilePtrArray.h"
#include "geometry/ProgressArray.h"
// Singelton class used to interface measurement devices implementing the nemo
// interface.
...
...
@@ -26,11 +27,11 @@ public:
static
NemoInterface
*
instance
();
enum
class
STATUS
{
NOT_CONNECTED
=
0
,
HEARTBEAT_DETECTED
=
1
,
WEBSOCKET_DETECTED
=
2
,
TIMEOUT
=
-
1
,
INVALID_HEARTBEAT
=
-
2
NOT_CONNECTED
,
READY
,
WEBSOCKET_DETECTED
,
TIMEOUT
,
INVALID_HEARTBEAT
};
Q_ENUM
(
STATUS
)
...
...
@@ -39,9 +40,12 @@ public:
Q_PROPERTY
(
QString
editorQml
READ
editorQml
CONSTANT
)
Q_PROPERTY
(
bool
running
READ
running
NOTIFY
runningChanged
)
QString
editorQml
();
Q_INVOKABLE
void
start
();
Q_INVOKABLE
void
stop
();
// Tile editing.
void
addTiles
(
const
TilePtrArray
&
tileArray
);
void
addTiles
(
const
TileArray
&
tileArray
);
void
removeTiles
(
const
IDArray
&
idArray
);
...
...
@@ -49,18 +53,22 @@ public:
TileArray
getTiles
(
const
IDArray
&
idArray
);
TileArray
getAllTiles
();
LogicalArray
containsTiles
(
const
IDArray
&
idArray
);
TileArray
extractTiles
(
const
IDArray
&
idArray
);
std
::
size_t
size
();
bool
empty
();
// Progress.
ProgressArray
getProgress
();
ProgressArray
getProgress
(
const
IDArray
&
idArray
);
// Status.
STATUS
status
()
const
;
QString
statusString
()
const
;
QString
editorQml
();
bool
running
();
signals:
void
statusChanged
();
void
progressChanged
();
void
progressChanged
(
const
ProgressArray
&
progressArray
);
void
tilesChanged
();
void
runningChanged
();
private:
...
...
src/MeasurementComplexItem/nemo_interface/Command.cpp
0 → 100644
View file @
e107a34a
#include "Command.h"
namespace
nemo_interface
{
Command
::
Command
(
Functor
onExec
)
:
_onExec
(
onExec
)
{}
QFuture
<
Command
::
ERROR
>
Command
::
exec
()
{
return
_onExec
();
}
}
// namespace nemo_interface
src/MeasurementComplexItem/nemo_interface/Command.h
0 → 100644
View file @
e107a34a
#ifndef COMMAND_H
#define COMMAND_H
#include <QFuture>
#include <functional>
namespace
nemo_interface
{
class
Command
{
public:
enum
class
ERROR
{
NO_ERROR
,
NETWORK_TIMEOUT
,
PARAMETER_ERROR
,
UNEXPECTED_SERVER_RESPONSE
};
typedef
QFuture
<
ERROR
>
ReturnType
;
typedef
std
::
function
<
ReturnType
()
>
Functor
;
Command
(
Functor
onExec
);
QFuture
<
ERROR
>
exec
();
private:
Functor
_onExec
;
};
}
// namespace nemo_interface
#endif // COMMAND_H
src/MeasurementComplexItem/nemo_interface/CommandDispatcher.cpp
0 → 100644
View file @
e107a34a
#include "CommandDispatcher.h"
CommandDispatcher
::
CommandDispatcher
()
{
}
src/MeasurementComplexItem/nemo_interface/CommandDispatcher.h
0 → 100644
View file @
e107a34a
#ifndef COMMANDDISPATCHER_H
#define COMMANDDISPATCHER_H
class
CommandDispatcher
{
public:
CommandDispatcher
();
};
#endif // COMMANDDISPATCHER_H
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