From 4298f68fcd39aa9820f9b522c38869ff0eb8bb0a Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 26 Nov 2012 17:43:07 +0100 Subject: [PATCH 1/3] IO does not arm in HIL mode --- apps/drivers/px4io/px4io.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index f2c87473c4..bf23c3937c 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -500,7 +500,8 @@ PX4IO::io_send() // XXX relays - cmd.arm_ok = _armed.armed; + /* armed and not locked down */ + cmd.arm_ok = (_armed.armed && !_armed.lockdown); ret = hx_stream_send(_io_stream, &cmd, sizeof(cmd)); if (ret) From b757ebbda83a254a997126fd8f932f30174584cf Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 26 Nov 2012 17:45:11 +0100 Subject: [PATCH 2/3] Not arming FMU in HIL mode --- apps/drivers/px4fmu/fmu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/drivers/px4fmu/fmu.cpp b/apps/drivers/px4fmu/fmu.cpp index 3eb4a9ef22..9743a1ae53 100644 --- a/apps/drivers/px4fmu/fmu.cpp +++ b/apps/drivers/px4fmu/fmu.cpp @@ -382,8 +382,8 @@ PX4FMU::task_main() /* get new value */ orb_copy(ORB_ID(actuator_armed), _t_armed, &aa); - /* update PWM servo armed status */ - up_pwm_servo_arm(aa.armed); + /* update PWM servo armed status if armed and not locked down */ + up_pwm_servo_arm((aa.armed && !aa.lockdown); } } From 11b0242f551dea2c67ae3306737a74ddd8edbe20 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 26 Nov 2012 17:45:11 +0100 Subject: [PATCH 3/3] Not arming FMU in HIL mode --- apps/drivers/px4fmu/fmu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/drivers/px4fmu/fmu.cpp b/apps/drivers/px4fmu/fmu.cpp index 3eb4a9ef22..61dd418f86 100644 --- a/apps/drivers/px4fmu/fmu.cpp +++ b/apps/drivers/px4fmu/fmu.cpp @@ -382,8 +382,8 @@ PX4FMU::task_main() /* get new value */ orb_copy(ORB_ID(actuator_armed), _t_armed, &aa); - /* update PWM servo armed status */ - up_pwm_servo_arm(aa.armed); + /* update PWM servo armed status if armed and not locked down */ + up_pwm_servo_arm(aa.armed && !aa.lockdown); } }