mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-23 03:46:34 +00:00
Improve use of MAVSDK::Action module
Added more logging. Type: Improvement Issue: https://denyspopov.atlassian.net/browse/AZ-19
This commit is contained in:
@@ -28,7 +28,7 @@ AzDroneController::AzDroneController(AzMission &mission, QObject *parent)
|
|||||||
this,
|
this,
|
||||||
&AzDroneController::missionIndexChangedSlot);
|
&AzDroneController::missionIndexChangedSlot);
|
||||||
|
|
||||||
// Mission controller signal to the slot in this class to finish the flying.
|
// Mission controller signals end of the missions. This will be used to fly to the return point in JSON.
|
||||||
connect(mMissionController, &AzMissionController::finished, this, &AzDroneController::missionFinishedSlot);
|
connect(mMissionController, &AzMissionController::finished, this, &AzDroneController::missionFinishedSlot);
|
||||||
|
|
||||||
// Healt info update from MAVSDK.
|
// Healt info update from MAVSDK.
|
||||||
@@ -113,14 +113,16 @@ bool AzDroneController::stateTelemetryModule(void)
|
|||||||
|
|
||||||
bool AzDroneController::stateActionModule(void)
|
bool AzDroneController::stateActionModule(void)
|
||||||
{
|
{
|
||||||
// TODO!! Check return value and print warnings and errors.
|
|
||||||
mAction = new Action(mSystem);
|
mAction = new Action(mSystem);
|
||||||
if (mAction == nullptr) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (mAction != nullptr) {
|
||||||
mMissionController->setAction(mAction);
|
mMissionController->setAction(mAction);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qWarning() << "Creating new MAVSDK::Action failed";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AzDroneController::stateReadyForArming(void)
|
bool AzDroneController::stateReadyForArming(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user