From 155e82c1b309619b4c10092b3e3f78be6e567830 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 25 Nov 2015 18:10:30 +1100 Subject: [PATCH] HAL_PX4: fixed PWM output for FMUv4 --- libraries/AP_HAL_PX4/RCOutput.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_HAL_PX4/RCOutput.cpp b/libraries/AP_HAL_PX4/RCOutput.cpp index 06edc72e22..9a5be9b6e6 100644 --- a/libraries/AP_HAL_PX4/RCOutput.cpp +++ b/libraries/AP_HAL_PX4/RCOutput.cpp @@ -45,11 +45,13 @@ void PX4RCOutput::init(void* unused) _outputs[i].pwm_sub = orb_subscribe_multi(ORB_ID(actuator_outputs), i); } +#if !defined(CONFIG_ARCH_BOARD_PX4FMU_V4) _alt_fd = open("/dev/px4fmu", O_RDWR); if (_alt_fd == -1) { hal.console->printf("RCOutput: failed to open /dev/px4fmu"); return; } +#endif // ensure not to write zeros to disabled channels _enabled_channels = 0;