From f79dad1e63cc8de15e0784350a9af369c775b2f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 5 Oct 2022 07:54:48 +0200 Subject: [PATCH] fix ROMFS: run camera trigger, capture and PPS before pwm_out As they might need to reserve the pwm pins. --- ROMFS/px4fmu_common/init.d/rcS | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 968f867aa7..956c05491a 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -324,6 +324,27 @@ else rc_update start manual_control start + # Start camera trigger, capture and PPS before pwm_out as they might access + # pwm pins + if param greater -s TRIG_MODE 0 + then + camera_trigger start + camera_feedback start + fi + # PPS capture driver + if param greater -s PPS_CAP_ENABLE 0 + then + pps_capture start + fi + # Camera capture driver + if param greater -s CAM_CAP_FBACK 0 + then + if camera_capture start + then + camera_capture on + fi + fi + # # Sensors System (start before Commander so Preflight checks are properly run). # Commander needs to be this early for in-air-restarts. @@ -390,12 +411,6 @@ else mag_bias_estimator start fi - if param greater -s TRIG_MODE 0 - then - camera_trigger start - camera_feedback start - fi - # # Optional board mavlink streams: rc.board_mavlink # @@ -416,21 +431,6 @@ else # Must be started after the serial config is read rc_input start $RC_INPUT_ARGS - # PPS capture driver (before pwm_out) - if param greater -s PPS_CAP_ENABLE 0 - then - pps_capture start - fi - - # Camera capture driver (before pwm_out) - if param greater -s CAM_CAP_FBACK 0 - then - if camera_capture start - then - camera_capture on - fi - fi - # # Play the startup tune (if not disabled or there is an error) #