mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 23:26:33 +00:00
Improve arming of the drone in Autopilot
Improved logging. Type: Improvement Issue: https://denyspopov.atlassian.net/browse/AZ-21
This commit is contained in:
@@ -136,8 +136,15 @@ bool AzDroneController::stateReadyForArming(void)
|
|||||||
|
|
||||||
bool AzDroneController::stateArm(void)
|
bool AzDroneController::stateArm(void)
|
||||||
{
|
{
|
||||||
// TODO!! Check return value and print warnings and errors.
|
Action::Result result = mAction->arm();
|
||||||
return mAction->arm() == Action::Result::Success;
|
|
||||||
|
if (result == Action::Result::Success) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
std::cerr << "MAVSDK::Action::arm() failed. Reason: " << result << endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AzDroneController::stateTakeoff(void)
|
bool AzDroneController::stateTakeoff(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user