This commit is contained in:
David St-Onge 2017-04-02 22:49:04 -04:00
parent 71f72e5e59
commit 4b71014572
1 changed files with 3 additions and 3 deletions

View File

@ -168,13 +168,13 @@ function step() {
neighbors.listen("cmd",
function(vid, value, rid) {
print("Got (", vid, ",", value, ") from robot #", rid)
if(value==22 and statef==idle) {
if(value==22 and CURSTATE=="IDLE") {
statef=takeoff
} else if(value==21) {
statef=land
} else if(value==400 and statef==idle) {
} else if(value==400 and CURSTATE=="IDLE") {
uav_arm()
} else if(value==401 and statef==idle){
} else if(value==401 and CURSTATE=="IDLE"){
uav_disarm()
}
}