diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-05 11:37:17 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-05 11:37:17 +0200 |
commit | 84e11a0cac53f753f65b0bea4659e1f2d9c0b35e (patch) | |
tree | 05ca5f3573c7cfbc1c43e71a3cbdc5ca58d3cee5 /apps/ardrone_interface | |
parent | 86a2a4fb9fd2b5ed38b330923823e06b96af01f3 (diff) | |
download | px4-firmware-84e11a0cac53f753f65b0bea4659e1f2d9c0b35e.tar.gz px4-firmware-84e11a0cac53f753f65b0bea4659e1f2d9c0b35e.tar.bz2 px4-firmware-84e11a0cac53f753f65b0bea4659e1f2d9c0b35e.zip |
Fixed correct RC loss detection, AR.Drone is now shutting down motors after 1 s of RC loss. Added debug topic.
Diffstat (limited to 'apps/ardrone_interface')
-rw-r--r-- | apps/ardrone_interface/ardrone_interface.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/ardrone_interface/ardrone_interface.c b/apps/ardrone_interface/ardrone_interface.c index a865992ed..220c3d3b5 100644 --- a/apps/ardrone_interface/ardrone_interface.c +++ b/apps/ardrone_interface/ardrone_interface.c @@ -289,7 +289,10 @@ int ardrone_interface_thread_main(int argc, char *argv[]) orb_copy(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_controls_sub, &actuator_controls); orb_copy(ORB_ID(actuator_armed), armed_sub, &armed); - if (armed.armed) { + /* for now only spin if armed and immediately shut down + * if in failsafe + */ + if (armed.armed && !armed.failsafe) { ardrone_mixing_and_output(ardrone_write, &actuator_controls); } else { /* Silently lock down motor speeds to zero */ |