From e688b40939122ac6bb24d777d8d4666793390d47 Mon Sep 17 00:00:00 2001 From: Mehmet Killioglu Date: Thu, 21 Dec 2023 09:59:37 +0200 Subject: [PATCH] SITL airframe for ssrc_fog_x fixed CA_ROTOR and PWM_MAIN_FUNC params added to init.d-posix/4400 airframe to make actuator outputs working for sitl --- .../init.d-posix/airframes/4400_ssrc_fog_x | 71 +++++++++++-------- 1 file changed, 42 insertions(+), 29 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/airframes/4400_ssrc_fog_x b/ROMFS/px4fmu_common/init.d-posix/airframes/4400_ssrc_fog_x index 7013727882b4..73ed0882fe41 100644 --- a/ROMFS/px4fmu_common/init.d-posix/airframes/4400_ssrc_fog_x +++ b/ROMFS/px4fmu_common/init.d-posix/airframes/4400_ssrc_fog_x @@ -13,32 +13,45 @@ . ${R}etc/init.d/rc.mc_defaults -set MIXER quad_x -set PWM_OUT 1234 - -if [ $AUTOCNF = yes ] -then - param set IMU_GYRO_CUTOFF 60 - param set IMU_DGYRO_CUTOFF 30 - param set MC_ROLLRATE_P 0.14 - param set MC_PITCHRATE_P 0.14 - param set MC_ROLLRATE_I 0.3 - param set MC_PITCHRATE_I 0.3 - param set MC_ROLLRATE_D 0.004 - param set MC_PITCHRATE_D 0.004 - - param set BAT_N_CELLS 4 - - param set MAV_0_CONFIG 0 - param set RTPS_MAV_CONFIG 101 - param set SER_TEL1_BAUD 460800 - - # Disable Multi-EKF - param set EKF2_MULTI_IMU 0 - param set SENS_IMU_MODE 1 - param set EKF2_MULTI_MAG 0 - param set SENS_MAG_MODE 1 - - # Logger used only while flying - param set SDLOG_MODE 0 -fi +param set IMU_GYRO_CUTOFF 60 +param set IMU_DGYRO_CUTOFF 30 +param set MC_ROLLRATE_P 0.14 +param set MC_PITCHRATE_P 0.14 +param set MC_ROLLRATE_I 0.3 +param set MC_PITCHRATE_I 0.3 +param set MC_ROLLRATE_D 0.004 +param set MC_PITCHRATE_D 0.004 + +param set BAT_N_CELLS 4 + +# Control allocator parameters +param set-default CA_ROTOR_COUNT 4 +param set-default CA_ROTOR0_PX 0.175 +param set-default CA_ROTOR0_PY 0.175 +param set-default CA_ROTOR1_PX -0.175 +param set-default CA_ROTOR1_PY -0.175 +param set-default CA_ROTOR2_PX 0.175 +param set-default CA_ROTOR2_PY -0.175 +param set-default CA_ROTOR2_KM -0.05 +param set-default CA_ROTOR3_PX -0.175 +param set-default CA_ROTOR3_PY 0.175 +param set-default CA_ROTOR3_KM -0.05 + + +param set-default PWM_MAIN_FUNC1 101 +param set-default PWM_MAIN_FUNC2 102 +param set-default PWM_MAIN_FUNC3 103 +param set-default PWM_MAIN_FUNC4 104 + +param set MAV_0_CONFIG 0 +param set RTPS_MAV_CONFIG 101 +param set SER_TEL1_BAUD 3000000 + +# Disable Multi-EKF +param set EKF2_MULTI_IMU 0 +param set SENS_IMU_MODE 1 +param set EKF2_MULTI_MAG 0 +param set SENS_MAG_MODE 1 + +# Logger used only while flying +param set SDLOG_MODE 0