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 <zachthorson@gmail.com>
This commit is contained in:
zthorson 2017-02-27 15:36:32 -08:00 committed by Lorenz Meier
parent e63ee9d8bd
commit 63857c6afc
1 changed files with 8 additions and 0 deletions

View File

@ -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);
}