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
2d54faaa
Commit
2d54faaa
authored
May 31, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mock link for ArduSub
parent
6039eb9a
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
635 additions
and
0 deletions
+635
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
QGroundControlQmlGlobal.cc
src/QmlControls/QGroundControlQmlGlobal.cc
+9
-0
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+1
-0
APMArduSubMockLink.params
src/comm/APMArduSubMockLink.params
+605
-0
MockLink.cc
src/comm/MockLink.cc
+14
-0
MockLink.h
src/comm/MockLink.h
+1
-0
MockLink.qml
src/ui/preferences/MockLink.qml
+4
-0
No files found.
qgroundcontrol.qrc
View file @
2d54faaa
...
...
@@ -3,6 +3,7 @@
<file alias="PX4MockLink.params">src/comm/PX4MockLink.params</file>
<file alias="APMArduCopterMockLink.params">src/comm/APMArduCopterMockLink.params</file>
<file alias="APMArduPlaneMockLink.params">src/comm/APMArduPlaneMockLink.params</file>
<file alias="APMArduSubMockLink.params">src/comm/APMArduSubMockLink.params</file>
<file alias="FactSystemTest.qml">src/FactSystem/FactSystemTest.qml</file>
</qresource>
<qresource prefix="/qml">
...
...
src/QmlControls/QGroundControlQmlGlobal.cc
View file @
2d54faaa
...
...
@@ -137,6 +137,15 @@ void QGroundControlQmlGlobal::startAPMArduPlaneMockLink(bool sendStatusText)
#endif
}
void
QGroundControlQmlGlobal
::
startAPMArduSubMockLink
(
bool
sendStatusText
)
{
#ifdef QT_DEBUG
MockLink
::
startAPMArduSubMockLink
(
sendStatusText
);
#else
Q_UNUSED
(
sendStatusText
);
#endif
}
void
QGroundControlQmlGlobal
::
stopAllMockLinks
(
void
)
{
#ifdef QT_DEBUG
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
2d54faaa
...
...
@@ -123,6 +123,7 @@ public:
Q_INVOKABLE
void
startGenericMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
startAPMArduCopterMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
startAPMArduPlaneMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
startAPMArduSubMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
stopAllMockLinks
(
void
);
/// Converts from meters to the user specified distance unit
...
...
src/comm/APMArduSubMockLink.params
0 → 100755
View file @
2d54faaa
This diff is collapsed.
Click to expand it.
src/comm/MockLink.cc
View file @
2d54faaa
...
...
@@ -180,6 +180,8 @@ void MockLink::_loadParams(void)
if
(
_firmwareType
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
if
(
_vehicleType
==
MAV_TYPE_FIXED_WING
)
{
paramFile
.
setFileName
(
":/unittest/APMArduPlaneMockLink.params"
);
}
else
if
(
_vehicleType
==
MAV_TYPE_SUBMARINE
)
{
paramFile
.
setFileName
(
":/unittest/APMArduSubMockLink.params"
);
}
else
{
paramFile
.
setFileName
(
":/unittest/APMArduCopterMockLink.params"
);
}
...
...
@@ -1030,6 +1032,18 @@ MockLink* MockLink::startAPMArduPlaneMockLink(bool sendStatusText, MockConfigur
return
_startMockLink
(
mockConfig
);
}
MockLink
*
MockLink
::
startAPMArduSubMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
MockConfiguration
*
mockConfig
=
new
MockConfiguration
(
"APM ArduSub MockLink"
);
mockConfig
->
setFirmwareType
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
mockConfig
->
setVehicleType
(
MAV_TYPE_SUBMARINE
);
mockConfig
->
setSendStatusText
(
sendStatusText
);
mockConfig
->
setFailureMode
(
failureMode
);
return
_startMockLink
(
mockConfig
);
}
void
MockLink
::
_sendRCChannels
(
void
)
{
mavlink_message_t
msg
;
...
...
src/comm/MockLink.h
View file @
2d54faaa
...
...
@@ -148,6 +148,7 @@ public:
static
MockLink
*
startGenericMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
=
MockConfiguration
::
FailNone
);
static
MockLink
*
startAPMArduCopterMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
=
MockConfiguration
::
FailNone
);
static
MockLink
*
startAPMArduPlaneMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
=
MockConfiguration
::
FailNone
);
static
MockLink
*
startAPMArduSubMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
=
MockConfiguration
::
FailNone
);
private
slots
:
virtual
void
_writeBytes
(
const
QByteArray
bytes
);
...
...
src/ui/preferences/MockLink.qml
View file @
2d54faaa
...
...
@@ -48,6 +48,10 @@ Rectangle {
text
:
qsTr
(
"
APM ArduPlane Vehicle
"
)
onClicked
:
QGroundControl
.
startAPMArduPlaneMockLink
(
sendStatusText
.
checked
)
}
QGCButton
{
text
:
qsTr
(
"
APM ArduSub Vehicle
"
)
onClicked
:
QGroundControl
.
startAPMArduSubMockLink
(
sendStatusText
.
checked
)
}
QGCButton
{
text
:
qsTr
(
"
Generic Vehicle
"
)
onClicked
:
QGroundControl
.
startGenericMockLink
(
sendStatusText
.
checked
)
...
...
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