aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/px4io
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2014-10-09 15:35:18 +1100
committerAndrew Tridgell <tridge@samba.org>2014-10-30 08:44:00 +1100
commitdd23d0acbcce9f4c79e120ec782a522164a25d83 (patch)
treeea8c19c5e8698f1b56a52d0f7cfae4ccca675012 /src/drivers/px4io
parent2e33683630002aef5881734c96383685b7e8443f (diff)
downloadpx4-firmware-dd23d0acbcce9f4c79e120ec782a522164a25d83.tar.gz
px4-firmware-dd23d0acbcce9f4c79e120ec782a522164a25d83.tar.bz2
px4-firmware-dd23d0acbcce9f4c79e120ec782a522164a25d83.zip
drivers: allow forcing the safety switch on
This allows forcing the safety switch to the on position from software which stops the pwm outputs
Diffstat (limited to 'src/drivers/px4io')
-rw-r--r--src/drivers/px4io/px4io.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp
index 3871b4a2c..fd9eb4170 100644
--- a/src/drivers/px4io/px4io.cpp
+++ b/src/drivers/px4io/px4io.cpp
@@ -2278,6 +2278,11 @@ PX4IO::ioctl(file * filep, int cmd, unsigned long arg)
ret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_OFF, PX4IO_FORCE_SAFETY_MAGIC);
break;
+ case PWM_SERVO_SET_FORCE_SAFETY_ON:
+ /* force safety switch on */
+ ret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_FORCE_SAFETY_ON, PX4IO_FORCE_SAFETY_MAGIC);
+ break;
+
case PWM_SERVO_SET_FORCE_FAILSAFE:
/* force failsafe mode instantly */
if (arg == 0) {