This commit is contained in:
David St-Onge 2017-02-19 18:31:20 -05:00
parent 98ebdf39ea
commit 3695ced541
1 changed files with 3 additions and 2 deletions

View File

@ -116,11 +116,12 @@ function takeoff() {
} }
function land() { function land() {
#log("Land: ", flight.status) #log("Land: ", flight.status)
if(flight.status != 0 and flight.status != 4){ if(flight.status == 2 or flight.status == 3){
neighbors.broadcast("cmd", 21) neighbors.broadcast("cmd", 21)
uav_land() uav_land()
} }
uav_land() else
statef=idle
} }
# Executed once at init time. # Executed once at init time.