Commit 4b5f4edd authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

Check if drone is alredy armed

parent aaeac1d4
...@@ -266,6 +266,10 @@ int arm(void) { ...@@ -266,6 +266,10 @@ int arm(void) {
if(!mavsdk_started) if(!mavsdk_started)
return -1; return -1;
if (telemetry->armed()) {
return 0;
}
while(!telemetry->health().is_home_position_ok) { while(!telemetry->health().is_home_position_ok) {
log("Waiting for home position to be set"); log("Waiting for home position to be set");
sleep_for(seconds(1)); sleep_for(seconds(1));
......
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