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
c0ea93e9
Unverified
Commit
c0ea93e9
authored
Apr 18, 2019
by
Don Gagne
Committed by
GitHub
Apr 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7365 from DonLakeFlyer/RoverFollow
ArduPilot: Add Follow mode to Rover
parents
a7ae45a2
4f643563
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
35 deletions
+36
-35
ArduRoverFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc
+2
-0
ArduRoverFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h
+1
-0
QGroundControlQmlGlobal.cc
src/QmlControls/QGroundControlQmlGlobal.cc
+9
-0
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+1
-0
MockLink.cc
src/comm/MockLink.cc
+17
-35
MockLink.h
src/comm/MockLink.h
+2
-0
MockLink.qml
src/ui/preferences/MockLink.qml
+4
-0
No files found.
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc
View file @
c0ea93e9
...
...
@@ -22,6 +22,7 @@ APMRoverMode::APMRoverMode(uint32_t mode, bool settable)
enumToString
.
insert
(
STEERING
,
"Steering"
);
enumToString
.
insert
(
HOLD
,
"Hold"
);
enumToString
.
insert
(
LOITER
,
"Loiter"
);
enumToString
.
insert
(
FOLLOW
,
"Follow"
);
enumToString
.
insert
(
SIMPLE
,
"Simple"
);
enumToString
.
insert
(
AUTO
,
"Auto"
);
enumToString
.
insert
(
RTL
,
"RTL"
);
...
...
@@ -40,6 +41,7 @@ ArduRoverFirmwarePlugin::ArduRoverFirmwarePlugin(void)
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
STEERING
,
true
);
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
HOLD
,
true
);
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
LOITER
,
true
);
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
FOLLOW
,
true
);
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
SIMPLE
,
true
);
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
AUTO
,
true
);
supportedFlightModes
<<
APMRoverMode
(
APMRoverMode
::
RTL
,
true
);
...
...
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h
View file @
c0ea93e9
...
...
@@ -25,6 +25,7 @@ public:
STEERING
=
3
,
HOLD
=
4
,
LOITER
=
5
,
FOLLOW
=
6
,
SIMPLE
=
7
,
AUTO
=
10
,
RTL
=
11
,
...
...
src/QmlControls/QGroundControlQmlGlobal.cc
View file @
c0ea93e9
...
...
@@ -147,6 +147,15 @@ void QGroundControlQmlGlobal::startAPMArduSubMockLink(bool sendStatusText)
#endif
}
void
QGroundControlQmlGlobal
::
startAPMArduRoverMockLink
(
bool
sendStatusText
)
{
#ifdef QT_DEBUG
MockLink
::
startAPMArduRoverMockLink
(
sendStatusText
);
#else
Q_UNUSED
(
sendStatusText
);
#endif
}
void
QGroundControlQmlGlobal
::
stopOneMockLink
(
void
)
{
#ifdef QT_DEBUG
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
c0ea93e9
...
...
@@ -121,6 +121,7 @@ public:
Q_INVOKABLE
void
startAPMArduCopterMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
startAPMArduPlaneMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
startAPMArduSubMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
startAPMArduRoverMockLink
(
bool
sendStatusText
);
Q_INVOKABLE
void
stopOneMockLink
(
void
);
/// Converts from meters to the user specified distance unit
...
...
src/comm/MockLink.cc
View file @
c0ea93e9
...
...
@@ -1159,64 +1159,46 @@ MockLink* MockLink::_startMockLink(MockConfiguration* mockConfig)
return
qobject_cast
<
MockLink
*>
(
linkMgr
->
createConnectedLink
(
config
));
}
MockLink
*
MockLink
::
startPX4MockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
MockLink
*
MockLink
::
_startMockLinkWorker
(
QString
configName
,
MAV_AUTOPILOT
firmwareType
,
MAV_TYPE
vehicleType
,
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
MockConfiguration
*
mockConfig
=
new
MockConfiguration
(
"PX4 MockLink"
);
MockConfiguration
*
mockConfig
=
new
MockConfiguration
(
configName
);
mockConfig
->
setFirmwareType
(
MAV_AUTOPILOT_PX4
);
mockConfig
->
setVehicleType
(
MAV_TYPE_QUADROTOR
);
mockConfig
->
setFirmwareType
(
firmwareType
);
mockConfig
->
setVehicleType
(
vehicleType
);
mockConfig
->
setSendStatusText
(
sendStatusText
);
mockConfig
->
setFailureMode
(
failureMode
);
return
_startMockLink
(
mockConfig
);
}
MockLink
*
MockLink
::
start
Generic
MockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
MockLink
*
MockLink
::
start
PX4
MockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
MockConfiguration
*
mockConfig
=
new
MockConfiguration
(
"Generic MockLink"
);
mockConfig
->
setFirmwareType
(
MAV_AUTOPILOT_GENERIC
);
mockConfig
->
setVehicleType
(
MAV_TYPE_QUADROTOR
);
mockConfig
->
setSendStatusText
(
sendStatusText
);
mockConfig
->
setFailureMode
(
failureMode
);
return
_startMockLinkWorker
(
"PX4 MultiRotor MockLink"
,
MAV_AUTOPILOT_PX4
,
MAV_TYPE_QUADROTOR
,
sendStatusText
,
failureMode
);
}
return
_startMockLink
(
mockConfig
);
MockLink
*
MockLink
::
startGenericMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
return
_startMockLinkWorker
(
"Generic MockLink"
,
MAV_AUTOPILOT_GENERIC
,
MAV_TYPE_QUADROTOR
,
sendStatusText
,
failureMode
);
}
MockLink
*
MockLink
::
startAPMArduCopterMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
MockConfiguration
*
mockConfig
=
new
MockConfiguration
(
"APM ArduCopter MockLink"
);
mockConfig
->
setFirmwareType
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
mockConfig
->
setVehicleType
(
MAV_TYPE_QUADROTOR
);
mockConfig
->
setSendStatusText
(
sendStatusText
);
mockConfig
->
setFailureMode
(
failureMode
);
return
_startMockLink
(
mockConfig
);
return
_startMockLinkWorker
(
"ArduCopter MockLink"
,
MAV_AUTOPILOT_ARDUPILOTMEGA
,
MAV_TYPE_QUADROTOR
,
sendStatusText
,
failureMode
);
}
MockLink
*
MockLink
::
startAPMArduPlaneMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
MockConfiguration
*
mockConfig
=
new
MockConfiguration
(
"APM ArduPlane MockLink"
);
mockConfig
->
setFirmwareType
(
MAV_AUTOPILOT_ARDUPILOTMEGA
);
mockConfig
->
setVehicleType
(
MAV_TYPE_FIXED_WING
);
mockConfig
->
setSendStatusText
(
sendStatusText
);
mockConfig
->
setFailureMode
(
failureMode
);
return
_startMockLink
(
mockConfig
);
return
_startMockLinkWorker
(
"ArduPlane MockLink"
,
MAV_AUTOPILOT_ARDUPILOTMEGA
,
MAV_TYPE_FIXED_WING
,
sendStatusText
,
failureMode
);
}
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
_startMockLinkWorker
(
"ArduSub MockLink"
,
MAV_AUTOPILOT_ARDUPILOTMEGA
,
MAV_TYPE_SUBMARINE
,
sendStatusText
,
failureMode
);
}
return
_startMockLink
(
mockConfig
);
MockLink
*
MockLink
::
startAPMArduRoverMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
)
{
return
_startMockLinkWorker
(
"ArduRover MockLink"
,
MAV_AUTOPILOT_ARDUPILOTMEGA
,
MAV_TYPE_GROUND_ROVER
,
sendStatusText
,
failureMode
);
}
void
MockLink
::
_sendRCChannels
(
void
)
...
...
src/comm/MockLink.h
View file @
c0ea93e9
...
...
@@ -156,6 +156,7 @@ public:
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
);
static
MockLink
*
startAPMArduRoverMockLink
(
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
=
MockConfiguration
::
FailNone
);
private
slots
:
virtual
void
_writeBytes
(
const
QByteArray
bytes
);
...
...
@@ -203,6 +204,7 @@ private:
void
_sendADSBVehicles
(
void
);
void
_moveADSBVehicle
(
void
);
static
MockLink
*
_startMockLinkWorker
(
QString
configName
,
MAV_AUTOPILOT
firmwareType
,
MAV_TYPE
vehicleType
,
bool
sendStatusText
,
MockConfiguration
::
FailureMode_t
failureMode
);
static
MockLink
*
_startMockLink
(
MockConfiguration
*
mockConfig
);
MockLinkMissionItemHandler
_missionItemHandler
;
...
...
src/ui/preferences/MockLink.qml
View file @
c0ea93e9
...
...
@@ -52,6 +52,10 @@ Rectangle {
text
:
qsTr
(
"
APM ArduSub Vehicle
"
)
onClicked
:
QGroundControl
.
startAPMArduSubMockLink
(
sendStatusText
.
checked
)
}
QGCButton
{
text
:
qsTr
(
"
APM ArduRover Vehicle
"
)
onClicked
:
QGroundControl
.
startAPMArduRoverMockLink
(
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