mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-23 01:06: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)
|
||||
{
|
||||
// TODO!! Check return value and print warnings and errors.
|
||||
return mAction->arm() == Action::Result::Success;
|
||||
Action::Result result = mAction->arm();
|
||||
|
||||
if (result == Action::Result::Success) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
std::cerr << "MAVSDK::Action::arm() failed. Reason: " << result << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool AzDroneController::stateTakeoff(void)
|
||||
|
||||
Reference in New Issue
Block a user