From 8dfbb43e0014dd6519b06218b992b77ad42e1b7b Mon Sep 17 00:00:00 2001 From: Miguel Arroyo <mayanez@users.noreply.github.com> Date: Wed, 7 Sep 2016 02:17:41 -0400 Subject: [PATCH] Adds Navio Kill Switch Logic (#5461) --- src/drivers/navio_sysfs_pwm_out/navio_sysfs_pwm_out.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/drivers/navio_sysfs_pwm_out/navio_sysfs_pwm_out.cpp b/src/drivers/navio_sysfs_pwm_out/navio_sysfs_pwm_out.cpp index 6a20a3c306..ac4fa7f8cf 100644 --- a/src/drivers/navio_sysfs_pwm_out/navio_sysfs_pwm_out.cpp +++ b/src/drivers/navio_sysfs_pwm_out/navio_sysfs_pwm_out.cpp @@ -360,7 +360,13 @@ void task_main(int argc, char *argv[]) pwm, &_pwm_limit); - send_outputs_pwm(pwm); + + if (_armed.lockdown) { + send_outputs_pwm(disarmed_pwm); + + } else { + send_outputs_pwm(pwm); + } if (_outputs_pub != nullptr) { orb_publish(ORB_ID(actuator_outputs), _outputs_pub, &_outputs); -- GitLab