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
6d14e392
Commit
6d14e392
authored
Feb 10, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2761 from DonLakeFlyer/OfflineEditOverride
Fix mission command overrides for offline edit
parents
82fa217b
f7274e93
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
23 deletions
+22
-23
MavCmdInfoCommon.json
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
+15
-0
MavCmdInfoFixedWing.json
src/FirmwarePlugin/APM/MavCmdInfoFixedWing.json
+0
-15
MissionCommands.cc
src/MissionManager/MissionCommands.cc
+4
-4
MissionItem.cc
src/MissionManager/MissionItem.cc
+2
-1
MissionManagerTest.cc
src/MissionManager/MissionManagerTest.cc
+1
-3
No files found.
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
View file @
6d14e392
...
@@ -2,5 +2,20 @@
...
@@ -2,5 +2,20 @@
"version"
:
1
,
"version"
:
1
,
"mavCmdInfo"
:
[
"mavCmdInfo"
:
[
{
"id"
:
22
,
"rawName"
:
"MAV_CMD_NAV_TAKEOFF"
,
"friendlyName"
:
"Takeoff"
,
"description"
:
"Take off from the ground."
,
"specifiesCoordinate"
:
false
,
"friendlyEdit"
:
true
,
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Pitch:"
,
"units"
:
"radians"
,
"default"
:
0.26179939
,
"decimalPlaces"
:
2
}
}
]
]
}
}
src/FirmwarePlugin/APM/MavCmdInfoFixedWing.json
View file @
6d14e392
...
@@ -2,20 +2,5 @@
...
@@ -2,20 +2,5 @@
"version"
:
1
,
"version"
:
1
,
"mavCmdInfo"
:
[
"mavCmdInfo"
:
[
{
"id"
:
22
,
"rawName"
:
"MAV_CMD_NAV_TAKEOFF"
,
"friendlyName"
:
"Takeoff"
,
"description"
:
"Take off from the ground."
,
"specifiesCoordinate"
:
false
,
"friendlyEdit"
:
true
,
"category"
:
"Basic"
,
"param1"
:
{
"label"
:
"Pitch:"
,
"units"
:
"radians"
,
"default"
:
0.26179939
,
"decimalPlaces"
:
2
}
}
]
]
}
}
src/MissionManager/MissionCommands.cc
View file @
6d14e392
...
@@ -153,11 +153,11 @@ MavCmdInfo* MissionCommands::getMavCmdInfo(MAV_CMD command, Vehicle* vehicle) co
...
@@ -153,11 +153,11 @@ MavCmdInfo* MissionCommands::getMavCmdInfo(MAV_CMD command, Vehicle* vehicle) co
if
(
_autopilotToMultiRotorMissionCommands
[
firmwareType
]
->
contains
(
command
))
{
if
(
_autopilotToMultiRotorMissionCommands
[
firmwareType
]
->
contains
(
command
))
{
mavCmdInfo
=
_autopilotToMultiRotorMissionCommands
[
firmwareType
]
->
getMavCmdInfo
(
command
);
mavCmdInfo
=
_autopilotToMultiRotorMissionCommands
[
firmwareType
]
->
getMavCmdInfo
(
command
);
}
}
}
else
{
if
(
_autopilotToCommonMissionCommands
[
firmwareType
]
->
contains
(
command
))
{
mavCmdInfo
=
_autopilotToCommonMissionCommands
[
firmwareType
]
->
getMavCmdInfo
(
command
);
}
}
}
}
if
(
!
mavCmdInfo
&&
_autopilotToCommonMissionCommands
[
firmwareType
]
->
contains
(
command
))
{
mavCmdInfo
=
_autopilotToCommonMissionCommands
[
firmwareType
]
->
getMavCmdInfo
(
command
);
}
}
if
(
!
mavCmdInfo
)
{
if
(
!
mavCmdInfo
)
{
...
...
src/MissionManager/MissionItem.cc
View file @
6d14e392
...
@@ -813,7 +813,8 @@ void MissionItem::setDefaultsForCommand(void)
...
@@ -813,7 +813,8 @@ void MissionItem::setDefaultsForCommand(void)
MAV_CMD
command
=
(
MAV_CMD
)
this
->
command
();
MAV_CMD
command
=
(
MAV_CMD
)
this
->
command
();
if
(
_missionCommands
->
contains
(
command
))
{
if
(
_missionCommands
->
contains
(
command
))
{
foreach
(
const
MavCmdParamInfo
*
paramInfo
,
_missionCommands
->
getMavCmdInfo
(
command
,
_vehicle
)
->
paramInfoMap
())
{
MavCmdInfo
*
mavCmdInfo
=
_missionCommands
->
getMavCmdInfo
(
command
,
_vehicle
);
foreach
(
const
MavCmdParamInfo
*
paramInfo
,
mavCmdInfo
->
paramInfoMap
())
{
Fact
*
rgParamFacts
[
7
]
=
{
&
_param1Fact
,
&
_param2Fact
,
&
_param3Fact
,
&
_param4Fact
,
&
_param5Fact
,
&
_param6Fact
,
&
_param7Fact
};
Fact
*
rgParamFacts
[
7
]
=
{
&
_param1Fact
,
&
_param2Fact
,
&
_param3Fact
,
&
_param4Fact
,
&
_param5Fact
,
&
_param6Fact
,
&
_param7Fact
};
rgParamFacts
[
paramInfo
->
param
()
-
1
]
->
setRawValue
(
paramInfo
->
defaultValue
());
rgParamFacts
[
paramInfo
->
param
()
-
1
]
->
setRawValue
(
paramInfo
->
defaultValue
());
...
...
src/MissionManager/MissionManagerTest.cc
View file @
6d14e392
...
@@ -31,9 +31,7 @@ const MissionManagerTest::TestCase_t MissionManagerTest::_rgTestCases[] = {
...
@@ -31,9 +31,7 @@ const MissionManagerTest::TestCase_t MissionManagerTest::_rgTestCases[] = {
{
"2
\t
0
\t
3
\t
18
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
2
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_TURNS
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"2
\t
0
\t
3
\t
18
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
2
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_TURNS
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"3
\t
0
\t
3
\t
19
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
3
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_TIME
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"3
\t
0
\t
3
\t
19
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
3
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LOITER_TIME
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"4
\t
0
\t
3
\t
21
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
4
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LAND
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"4
\t
0
\t
3
\t
21
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
4
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_LAND
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"5
\t
0
\t
3
\t
22
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
5
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_NAV_TAKEOFF
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_GLOBAL_RELATIVE_ALT
}
},
{
"6
\t
0
\t
2
\t
112
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
5
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_CONDITION_DELAY
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_MISSION
}
},
{
"6
\t
0
\t
2
\t
112
\t
10
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
6
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_CONDITION_DELAY
,
10.0
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_MISSION
}
},
{
"7
\t
0
\t
2
\t
177
\t
3
\t
20
\t
30
\t
40
\t
-10
\t
-20
\t
-30
\t
1
\r\n
"
,
{
7
,
QGeoCoordinate
(
-
10.0
,
-
20.0
,
-
30.0
),
MAV_CMD_DO_JUMP
,
3
,
20.0
,
30.0
,
40.0
,
true
,
false
,
MAV_FRAME_MISSION
}
},
};
};
const
size_t
MissionManagerTest
::
_cTestCases
=
sizeof
(
_rgTestCases
)
/
sizeof
(
_rgTestCases
[
0
]);
const
size_t
MissionManagerTest
::
_cTestCases
=
sizeof
(
_rgTestCases
)
/
sizeof
(
_rgTestCases
[
0
]);
...
...
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