From 63857c6afcc719a060c986a20410e8670c1aa971 Mon Sep 17 00:00:00 2001 From: zthorson Date: Mon, 27 Feb 2017 15:36:32 -0800 Subject: [PATCH] px4fmu-v4: Fix for HIL Unable to Set Control Surfaces. Fixes #5651 The sensor_rest command added to the startup script for px4fmu_v4 hardware was leaving the /dev/pwm_output0 driver open. This would prevent the pwm_out_sim module from registering as a simulated driver. The result would cause the system to properly boot in HIL mode, but you would not be able to set any control surfaces. Since sensor_rest and peripheral_reset are only used on initialization, the drivers can be shut down after they have performed their reset functions. Signed-off-by: zthorson --- src/drivers/px4fmu/fmu.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/drivers/px4fmu/fmu.cpp b/src/drivers/px4fmu/fmu.cpp index 03024743bb..3cee284a2d 100644 --- a/src/drivers/px4fmu/fmu.cpp +++ b/src/drivers/px4fmu/fmu.cpp @@ -3396,6 +3396,10 @@ fmu_main(int argc, char *argv[]) warnx("resettet default time"); } + // When we are done resetting, we should clean up the fmu drivers + // Failure to do so prevents other devices (HIL sim driver) + // from starting. + fmu_stop(); exit(0); } @@ -3409,6 +3413,10 @@ fmu_main(int argc, char *argv[]) warnx("resettet default time"); } + // When we are done resetting, we should clean up the fmu drivers + // Failure to do so prevents other devices (HIL sim driver) + // from starting. + fmu_stop(); exit(0); }