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
5fce1d33
Unverified
Commit
5fce1d33
authored
Jul 06, 2020
by
Don Gagne
Committed by
GitHub
Jul 06, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8884 from DonLakeFlyer/PlanPreCheck
Plan: Upload pre-check must be vehicle-class based
parents
c065dbb0
75cc0c75
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
MissionController.cc
src/MissionManager/MissionController.cc
+1
-1
QGCMAVLink.cc
src/comm/QGCMAVLink.cc
+17
-0
QGCMAVLink.h
src/comm/QGCMAVLink.h
+1
-0
No files found.
src/MissionManager/MissionController.cc
View file @
5fce1d33
...
...
@@ -2592,7 +2592,7 @@ MissionController::SendToVehiclePreCheckState MissionController::sendToVehiclePr
if
(
_managerVehicle
->
armed
()
&&
_managerVehicle
->
flightMode
()
==
_managerVehicle
->
missionFlightMode
())
{
return
SendToVehiclePreCheckStateActiveMission
;
}
if
(
_controllerVehicle
->
firmwareType
()
!=
_managerVehicle
->
firmwareType
()
||
_controllerVehicle
->
vehicleType
()
!=
_managerVehicle
->
vehicleType
(
))
{
if
(
_controllerVehicle
->
firmwareType
()
!=
_managerVehicle
->
firmwareType
()
||
QGCMAVLink
::
vehicleClass
(
_controllerVehicle
->
vehicleType
())
!=
QGCMAVLink
::
vehicleClass
(
_managerVehicle
->
vehicleType
()
))
{
return
SendToVehiclePreCheckStateFirwmareVehicleMismatch
;
}
return
SendToVehiclePreCheckStateOk
;
...
...
src/comm/QGCMAVLink.cc
View file @
5fce1d33
...
...
@@ -61,6 +61,23 @@ bool QGCMAVLink::isVTOL(MAV_TYPE mavType)
}
}
MAV_TYPE
QGCMAVLink
::
vehicleClass
(
MAV_TYPE
mavType
)
{
if
(
isFixedWing
(
mavType
))
{
return
MAV_TYPE_FIXED_WING
;
}
else
if
(
isRover
(
mavType
))
{
return
MAV_TYPE_GROUND_ROVER
;
}
else
if
(
isSub
(
mavType
))
{
return
MAV_TYPE_SUBMARINE
;
}
else
if
(
isMultiRotor
(
mavType
))
{
return
MAV_TYPE_QUADROTOR
;
}
else
if
(
isVTOL
(
mavType
))
{
return
MAV_TYPE_VTOL_QUADROTOR
;
}
return
MAV_TYPE_GENERIC
;
}
QString
QGCMAVLink
::
mavResultToString
(
MAV_RESULT
result
)
{
switch
(
result
)
{
...
...
src/comm/QGCMAVLink.h
View file @
5fce1d33
...
...
@@ -53,6 +53,7 @@ public:
static
bool
isSub
(
MAV_TYPE
mavType
);
static
bool
isMultiRotor
(
MAV_TYPE
mavType
);
static
bool
isVTOL
(
MAV_TYPE
mavType
);
static
MAV_TYPE
vehicleClass
(
MAV_TYPE
mavType
);
static
QString
mavResultToString
(
MAV_RESULT
result
);
};
...
...
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