diff options
author | Julian Oes <julian@oes.ch> | 2013-07-15 22:15:15 +0200 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-07-15 22:15:15 +0200 |
commit | 1b38cf715d85b15f2200d49b64fbe22a05b71937 (patch) | |
tree | 1df1db43a7ac8dad47d96059eef8efff65b6248d /src/drivers/ardrone_interface/ardrone_interface.c | |
parent | bf2ff98856b7e6b107a7ec5bbde3b00e38713804 (diff) | |
download | px4-firmware-1b38cf715d85b15f2200d49b64fbe22a05b71937.tar.gz px4-firmware-1b38cf715d85b15f2200d49b64fbe22a05b71937.tar.bz2 px4-firmware-1b38cf715d85b15f2200d49b64fbe22a05b71937.zip |
Renamed actuator_safety back to actuator_armed, compiling but untested
Diffstat (limited to 'src/drivers/ardrone_interface/ardrone_interface.c')
-rw-r--r-- | src/drivers/ardrone_interface/ardrone_interface.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/drivers/ardrone_interface/ardrone_interface.c b/src/drivers/ardrone_interface/ardrone_interface.c index 187820372..b88f61ce8 100644 --- a/src/drivers/ardrone_interface/ardrone_interface.c +++ b/src/drivers/ardrone_interface/ardrone_interface.c @@ -53,9 +53,10 @@ #include <sys/prctl.h> #include <drivers/drv_hrt.h> #include <uORB/uORB.h> -#include <uORB/topics/vehicle_status.h> +#include <uORB/topics/safety.h> #include <uORB/topics/actuator_controls.h> -#include <uORB/topics/actuator_safety.h> +#include <uORB/topics/actuator_armed.h> +#include <uORB/topics/vehicle_control_mode.h> #include <systemlib/systemlib.h> @@ -244,17 +245,15 @@ int ardrone_interface_thread_main(int argc, char *argv[]) int led_counter = 0; /* declare and safely initialize all structs */ - struct vehicle_status_s state; - memset(&state, 0, sizeof(state)); struct actuator_controls_s actuator_controls; memset(&actuator_controls, 0, sizeof(actuator_controls)); - struct actuator_safety_s safety; - safety.armed = false; + struct actuator_armed_s armed; + //XXX is this necessairy? + armed.armed = false; /* subscribe to attitude, motor setpoints and system state */ int actuator_controls_sub = orb_subscribe(ORB_ID_VEHICLE_ATTITUDE_CONTROLS); - int state_sub = orb_subscribe(ORB_ID(vehicle_status)); - int safety_sub = orb_subscribe(ORB_ID(actuator_safety)); + int armed_sub = orb_subscribe(ORB_ID(actuator_armed)); printf("[ardrone_interface] Motors initialized - ready.\n"); fflush(stdout); @@ -325,12 +324,12 @@ int ardrone_interface_thread_main(int argc, char *argv[]) /* get a local copy of the actuator controls */ orb_copy(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_controls_sub, &actuator_controls); - orb_copy(ORB_ID(actuator_safety), safety_sub, &safety); + orb_copy(ORB_ID(actuator_armed), armed_sub, &armed); /* for now only spin if armed and immediately shut down * if in failsafe */ - if (safety.armed && !safety.lockdown) { + if (armed.armed && !armed.lockdown) { ardrone_mixing_and_output(ardrone_write, &actuator_controls); } else { |