This commit is contained in:
David St-Onge 2017-02-19 18:41:45 -05:00
parent 3695ced541
commit 225143a6a1
1 changed files with 2 additions and 1 deletions

View File

@ -104,6 +104,7 @@ neighbors.listen("cmd",
}
function takeoff() {
log("TakeOff: ", flight.status)
if( flight.status == 2 and position.altitude >= TARGET_ALTITUDE-TARGET_ALTITUDE/20.0) {
barrier_set(ROBOTS,hexagon)
barrier_ready()
@ -115,7 +116,7 @@ function takeoff() {
}
}
function land() {
#log("Land: ", flight.status)
log("Land: ", flight.status)
if(flight.status == 2 or flight.status == 3){
neighbors.broadcast("cmd", 21)
uav_land()