Skip to content

Commit

Permalink
SITL airframe for ssrc_fog_x fixed
Browse files Browse the repository at this point in the history
CA_ROTOR and PWM_MAIN_FUNC params added to init.d-posix/4400 airframe
to make actuator outputs working for sitl
  • Loading branch information
mehmetkillioglu committed Dec 21, 2023
1 parent 63e5611 commit e688b40
Showing 1 changed file with 42 additions and 29 deletions.
71 changes: 42 additions & 29 deletions ROMFS/px4fmu_common/init.d-posix/airframes/4400_ssrc_fog_x
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e688b40

Please sign in to comment.