Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit 510154f

Browse files
committed
px4fmu: allow control of safety state on FMUv4
allows for MAVLink control of safety state
1 parent 4f1bb33 commit 510154f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/drivers/px4fmu/fmu.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,9 +1521,16 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg)
15211521

15221522
case PWM_SERVO_SET_ARM_OK:
15231523
case PWM_SERVO_CLEAR_ARM_OK:
1524+
break;
1525+
15241526
case PWM_SERVO_SET_FORCE_SAFETY_OFF:
1527+
/* force safety switch off */
1528+
_safety_off = true;
1529+
break;
1530+
15251531
case PWM_SERVO_SET_FORCE_SAFETY_ON:
1526-
// these are no-ops, as no safety switch
1532+
/* force safety switch on */
1533+
_safety_off = false;
15271534
break;
15281535

15291536
case PWM_SERVO_DISARM:

0 commit comments

Comments
 (0)