From cae070c73e661f3242ec816cfae28bbeb37897da Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 2 Sep 2012 11:33:52 +0200 Subject: Changed to publishing armed state in commander --- apps/commander/state_machine_helper.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/commander/state_machine_helper.c') 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 #include +#include #include #include #include @@ -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) { -- cgit v1.2.3