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

Check if drone is alredy armed

parent 4c26d4ae
...@@ -260,6 +260,10 @@ int arm(void) { ...@@ -260,6 +260,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