diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-02 11:33:52 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-02 11:33:52 +0200 |
commit | cae070c73e661f3242ec816cfae28bbeb37897da (patch) | |
tree | a34c62e576b52c642a3bf2e9ecd258e0aa555db0 /apps/commander | |
parent | e9373752d1a651cc65555781b3c6c0ab6134ccc5 (diff) | |
download | px4-firmware-cae070c73e661f3242ec816cfae28bbeb37897da.tar.gz px4-firmware-cae070c73e661f3242ec816cfae28bbeb37897da.tar.bz2 px4-firmware-cae070c73e661f3242ec816cfae28bbeb37897da.zip |
Changed to publishing armed state in commander
Diffstat (limited to 'apps/commander')
-rw-r--r-- | apps/commander/state_machine_helper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/commander/state_machine_helper.c b/apps/commander/state_machine_helper.c index 7db920f91..4e2166a3a 100644 --- a/apps/commander/state_machine_helper.c +++ b/apps/commander/state_machine_helper.c @@ -43,6 +43,7 @@ #include <uORB/uORB.h> #include <uORB/topics/vehicle_status.h> +#include <uORB/topics/actuator_controls.h> #include <systemlib/systemlib.h> #include <arch/board/up_hrt.h> #include <mavlink/mavlink_log.h> @@ -198,6 +199,10 @@ int do_state_update(int status_pub, struct vehicle_status_s *current_status, con if (invalid_state == false || old_state != new_state) { current_status->state_machine = new_state; state_machine_publish(status_pub, current_status, mavlink_fd); + struct actuator_armed_s armed; + armed.armed = current_status->flag_system_armed; + orb_advert_t armed_pub = orb_advertise(ORB_ID(actuator_armed), &armed); + orb_publish(ORB_ID(actuator_armed), armed_pub, &armed); ret = OK; } if (invalid_state) { |