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
1b29384e
Commit
1b29384e
authored
Nov 23, 2016
by
Don Gagne
Browse files
RallyPoint support should be optional
parent
d1cc23a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/FirmwarePlugin/APM/APMRallyPointManager.cc
View file @
1b29384e
...
...
@@ -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 @
1b29384e
...
...
@@ -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