Commit cc5ba699 authored by Valentin Platzgummer's avatar Valentin Platzgummer

about to add survey to wimaController

parent 07975ff6
......@@ -146,6 +146,7 @@ void WimaController::resumeMission()
bool WimaController::updateMission()
{
// pick first WimaGOperationArea
WimaGOperationArea* opArea = nullptr;
for (int i = 0; i < _visualItems->count(); i++) {
WimaGOperationArea* currentArea = qobject_cast<WimaGOperationArea*>(_visualItems->get(i));
......@@ -155,6 +156,7 @@ bool WimaController::updateMission()
}
}
// pick first WimaServiceArea
WimaServiceArea* serArea = nullptr;
for (int i = 0; i < _visualItems->count(); i++) {
WimaServiceArea* currentArea = qobject_cast<WimaServiceArea*>(_visualItems->get(i));
......@@ -164,8 +166,21 @@ bool WimaController::updateMission()
}
}
// calc. vehicle corridor
if (opArea != nullptr && serArea != nullptr){
return addVehicleCorridor(opArea, serArea);
if(!addVehicleCorridor(opArea, serArea)){
return false;
}
}else{
return false;
}
// create survey mission, will be extened with more mission types in the future
int secNumber = _missionController->insertComplexMissionItem(_missionController->surveyComplexItemName(), new QGeoCoordinate(), _missionController->visualItems()->count());
SurveyComplexItem* survey = qobject_cast<SurveyComplexItem*>(_missionController->visualItems()->get(secNumber));
if (survey != nullptr)
{
survey->
}else{
return false;
}
......
......@@ -11,6 +11,7 @@
#include "PlanMasterController.h"
#include "MissionController.h"
#include "SurveyComplexItem.h"
class WimaController : public QObject
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment