From c206e0f1ac9ef4a90a57f73f843ac46136187a54 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 28 Mar 2018 09:46:40 +0200 Subject: [PATCH] vtol_type.cpp: close pwm output device file descriptor Signed-off-by: Roman --- src/modules/vtol_att_control/vtol_type.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 42d55726cd..4c8893f35d 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -302,6 +302,8 @@ bool VtolType::apply_pwm_limits(struct pwm_output_values &pwm_values, pwm_limit_ ret = px4_ioctl(fd, PWM_SERVO_SET_MAX_PWM, (long unsigned int)&pwm_values); } + px4_close(fd); + if (ret != OK) { PX4_ERR("failed setting max values");