diff --git a/ROMFS/px4fmu_common/init.d/4051_s250aq b/ROMFS/px4fmu_common/init.d/4051_s250aq new file mode 100644 index 0000000000..72841bee35 --- /dev/null +++ b/ROMFS/px4fmu_common/init.d/4051_s250aq @@ -0,0 +1,57 @@ +#!nsh +# +# @name Spedix S250AQ +# +# @type Quadrotor asymmetric +# +# @output MAIN1 motor1 (front right: CCW) +# @output MAIN2 motor2 (back left: CCW) +# @output MAIN3 motor3 (front left: CW) +# @output MAIN4 motor4 (back right: CW) +# +# @output MAIN5 feed-through of RC AUX1 channel +# @output MAIN6 feed-through of RC AUX2 channel +# +# @maintainer Mark Whitehorn +# + +sh /etc/init.d/rc.mc_defaults + +set MIXER quad_s250aq +set MAV_TYPE 2 + +set PWM_OUT 1234 + +if [ $AUTOCNF == yes ] +then + param set MC_ROLL_P 8.0 + param set MC_ROLLRATE_P 0.19 + param set MC_ROLLRATE_I 0.1 + param set MC_ROLLRATE_D 0.0055 + param set MC_PITCH_P 8.0 + param set MC_PITCHRATE_P 0.19 + param set MC_PITCHRATE_I 0.1 + param set MC_PITCHRATE_D 0.0055 + param set MC_YAW_P 4.0 + param set MC_YAWRATE_P 0.2 + param set MC_YAWRATE_I 0.1 + param set MC_YAWRATE_D 0.0 + param set MC_YAW_FF 0.5 + param set MC_ROLLRATE_MAX 720.0 + param set MC_PITCHRATE_MAX 720.0 + param set MC_YAWRATE_MAX 400.0 + param set MC_ACRO_R_MAX 360.0 + param set MC_ACRO_P_MAX 360.0 + param set MC_TPA_BREAK_P 0.5 + param set MC_TPA_RATE_P 0.5 + + + param set PWM_MIN 1075 + + param set MPC_THR_MIN 0.06 + param set MPC_MANTHR_MIN 0.06 + + param set ATT_BIAS_MAX 0.0 + + param set CBRK_IO_SAFETY 22027 +fi diff --git a/ROMFS/px4fmu_common/mixers/quad_s250aq.main.mix b/ROMFS/px4fmu_common/mixers/quad_s250aq.main.mix new file mode 100644 index 0000000000..549ff3a41c --- /dev/null +++ b/ROMFS/px4fmu_common/mixers/quad_s250aq.main.mix @@ -0,0 +1,7 @@ +R: 4s 10000 10000 10000 0 +M: 1 +O: 10000 10000 0 -10000 10000 +S: 3 5 10000 10000 0 -10000 10000 +M: 1 +O: 10000 10000 0 -10000 10000 +S: 3 6 10000 10000 0 -10000 10000 diff --git a/src/modules/systemlib/mixer/mixer_multirotor.cpp b/src/modules/systemlib/mixer/mixer_multirotor.cpp index 4f47378c8c..981fc3cdf2 100644 --- a/src/modules/systemlib/mixer/mixer_multirotor.cpp +++ b/src/modules/systemlib/mixer/mixer_multirotor.cpp @@ -167,6 +167,9 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl } else if (!strcmp(geomname, "4w")) { geometry = MultirotorGeometry::QUAD_WIDE; + } else if (!strcmp(geomname, "4s")) { + geometry = MultirotorGeometry::QUAD_S250AQ; + } else if (!strcmp(geomname, "4dc")) { geometry = MultirotorGeometry::QUAD_DEADCAT; diff --git a/src/modules/systemlib/mixer/multi_tables.py b/src/modules/systemlib/mixer/multi_tables.py index afa1173a62..1584ccf1de 100755 --- a/src/modules/systemlib/mixer/multi_tables.py +++ b/src/modules/systemlib/mixer/multi_tables.py @@ -97,6 +97,13 @@ quad_wide = [ [ 129, CW], ] +quad_s250aq = [ + [ 59, CCW, 1.0 ], + [ -139, CCW, 0.67], + [ -59, CW, 1.0 ], + [ 139, CW, 0.67], +] + hex_x = [ [ 90, CW], [ -90, CCW], @@ -189,7 +196,7 @@ tri_y = [ ] -tables = [quad_x, quad_h, quad_plus, quad_v, quad_wide, quad_deadcat, hex_x, hex_plus, hex_cox, hex_t, octa_x, octa_plus, octa_cox, octa_cox_wide, twin_engine, tri_y] +tables = [quad_x, quad_h, quad_plus, quad_v, quad_wide, quad_s250aq, quad_deadcat, hex_x, hex_plus, hex_cox, hex_t, octa_x, octa_plus, octa_cox, octa_cox_wide, twin_engine, tri_y] def variableName(variable): for variableName, value in list(globals().items()):