aboutsummaryrefslogtreecommitdiff
path: root/apps/commander/state_machine_helper.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-09-21 12:55:41 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-09-21 12:55:41 +0200
commit082074f99196f8c936e21740a84b6738cb87875e (patch)
tree92863b8532541d9dcfc8a160a7f659c5e1475b35 /apps/commander/state_machine_helper.c
parent572efc3383c6c98769efc65806a6d2e596787c4d (diff)
downloadpx4-firmware-082074f99196f8c936e21740a84b6738cb87875e.tar.gz
px4-firmware-082074f99196f8c936e21740a84b6738cb87875e.tar.bz2
px4-firmware-082074f99196f8c936e21740a84b6738cb87875e.zip
Completely implemented offboard control
Diffstat (limited to 'apps/commander/state_machine_helper.c')
-rw-r--r--apps/commander/state_machine_helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/commander/state_machine_helper.c b/apps/commander/state_machine_helper.c
index da85d0868..e1d24d6a6 100644
--- a/apps/commander/state_machine_helper.c
+++ b/apps/commander/state_machine_helper.c
@@ -223,7 +223,8 @@ void publish_armed_status(const struct vehicle_status_s *current_status) {
/* lock down actuators if required */
// XXX FIXME Currently any loss of RC will completely disable all actuators
// needs proper failsafe
- armed.lockdown = (current_status->rc_signal_lost || current_status->flag_hil_enabled) ? true : false;
+ armed.lockdown = ((current_status->rc_signal_lost && current_status->offboard_control_signal_lost)
+ || current_status->flag_hil_enabled) ? true : false;
orb_advert_t armed_pub = orb_advertise(ORB_ID(actuator_armed), &armed);
orb_publish(ORB_ID(actuator_armed), armed_pub, &armed);
}