Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
11d87639
Commit
11d87639
authored
Nov 24, 2016
by
Don Gagne
Committed by
GitHub
Nov 24, 2016
Browse files
Merge pull request #4240 from DonLakeFlyer/RallyPointOptional
RallyPoint support should be optional
parents
d1cc23a2
1b29384e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/FirmwarePlugin/APM/APMRallyPointManager.cc
View file @
11d87639
...
...
@@ -31,7 +31,7 @@ APMRallyPointManager::~APMRallyPointManager()
void
APMRallyPointManager
::
sendToVehicle
(
const
QList
<
QGeoCoordinate
>&
rgPoints
)
{
if
(
_vehicle
->
isOfflineEditingVehicle
())
{
if
(
_vehicle
->
isOfflineEditingVehicle
()
||
!
rallyPointsSupported
()
)
{
return
;
}
...
...
@@ -53,7 +53,7 @@ void APMRallyPointManager::sendToVehicle(const QList<QGeoCoordinate>& rgPoints)
void
APMRallyPointManager
::
loadFromVehicle
(
void
)
{
if
(
_vehicle
->
isOfflineEditingVehicle
()
||
_readTransactionInProgress
)
{
if
(
_vehicle
->
isOfflineEditingVehicle
()
||
!
rallyPointsSupported
()
||
_readTransactionInProgress
)
{
return
;
}
...
...
@@ -144,3 +144,8 @@ bool APMRallyPointManager::inProgress(void) const
{
return
_readTransactionInProgress
||
_writeTransactionInProgress
;
}
bool
APMRallyPointManager
::
rallyPointsSupported
(
void
)
const
{
return
_vehicle
->
parameterManager
()
->
parameterExists
(
_vehicle
->
defaultComponentId
(),
_rallyTotalParam
);
}
src/FirmwarePlugin/APM/APMRallyPointManager.h
View file @
11d87639
...
...
@@ -25,7 +25,7 @@ public:
bool
inProgress
(
void
)
const
final
;
void
loadFromVehicle
(
void
)
final
;
void
sendToVehicle
(
const
QList
<
QGeoCoordinate
>&
rgPoints
)
final
;
bool
rallyPointsSupported
(
void
)
const
final
{
return
true
;
}
bool
rallyPointsSupported
(
void
)
const
final
;
QString
editorQml
(
void
)
const
final
{
return
QStringLiteral
(
"qrc:/FirmwarePlugin/APM/APMRallyPointEditor.qml"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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