lj test
This commit is contained in:
parent
965c9850ba
commit
f51e657103
|
@ -115,8 +115,8 @@ int buzzuav_goto(buzzvm_t vm) {
|
||||||
//buzzvm_type_assert(vm, 3, BUZZTYPE_FLOAT);
|
//buzzvm_type_assert(vm, 3, BUZZTYPE_FLOAT);
|
||||||
buzzvm_type_assert(vm, 2, BUZZTYPE_FLOAT);
|
buzzvm_type_assert(vm, 2, BUZZTYPE_FLOAT);
|
||||||
buzzvm_type_assert(vm, 1, BUZZTYPE_FLOAT);
|
buzzvm_type_assert(vm, 1, BUZZTYPE_FLOAT);
|
||||||
float dx = buzzvm_stack_at(vm, 1)->f.value;
|
float dy = buzzvm_stack_at(vm, 1)->f.value;
|
||||||
float dy = buzzvm_stack_at(vm, 2)->f.value;
|
float dx = buzzvm_stack_at(vm, 2)->f.value;
|
||||||
// float d = sqrt(dx*dx+dy*dy);
|
// float d = sqrt(dx*dx+dy*dy);
|
||||||
// float b = atan2(dy,dx);
|
// float b = atan2(dy,dx);
|
||||||
printf(" Vector for Goto: %.7f,%.7f\n",dx,dy);
|
printf(" Vector for Goto: %.7f,%.7f\n",dx,dy);
|
||||||
|
|
|
@ -98,6 +98,9 @@ neighbors.listen("cmd",
|
||||||
statef=land
|
statef=land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( flight.status == 2 and position.altitude >= TARGET_ALTITUDE-TARGET_ALTITUDE/20.0)
|
||||||
|
statef=hexagon
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue