From 8f762b57670d8ccf9e37b66699122135fdc624ff Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 21 Apr 2015 12:27:52 +0200 Subject: [PATCH 1/4] more specifications in firefly6 config file --- ROMFS/px4fmu_common/init.d/13002_firefly6 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/13002_firefly6 b/ROMFS/px4fmu_common/init.d/13002_firefly6 index 29167f1ede..9489bfd9a2 100644 --- a/ROMFS/px4fmu_common/init.d/13002_firefly6 +++ b/ROMFS/px4fmu_common/init.d/13002_firefly6 @@ -8,10 +8,14 @@ sh /etc/init.d/rc.vtol_defaults set MIXER firefly6 -set MIXER_AUX firefly6 +set PWM_OUT 123456 -set PWM_OUT 12345678 -set PWM_AUX_OUT 1234 +set MIXER_AUX firefly6 set PWM_AUX_RATE 50 +set PWM_AUX_OUT 1234 +set PWM_AUX_DISARMED 1000 +set PWM_AUX_MIN 1000 +set PWM_AUX_MAX 2000 + param set VT_MOT_COUNT 6 param set VT_IDLE_PWM_MC 1080 From 05847fd4c7049f09ff6e72a32f10074129f0235f Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 21 Apr 2015 12:35:35 +0200 Subject: [PATCH 2/4] improve serial output during loading of mixers --- ROMFS/px4fmu_common/init.d/rc.interface | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.interface b/ROMFS/px4fmu_common/init.d/rc.interface index efdba9506e..7a424970f6 100644 --- a/ROMFS/px4fmu_common/init.d/rc.interface +++ b/ROMFS/px4fmu_common/init.d/rc.interface @@ -45,7 +45,7 @@ then if mixer load $OUTPUT_DEV $MIXER_FILE then - echo "[i] Mixer: $MIXER_FILE" + echo "[i] Mixer: $MIXER_FILE on $OUTPUT_DEV" else echo "[i] Error loading mixer: $MIXER_FILE" tone_alarm $TUNE_ERR @@ -105,7 +105,7 @@ then set MIXER_AUX_FILE none set OUTPUT_AUX_DEV /dev/pwm_output1 - if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.mix ] + if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix ] then set MIXER_AUX_FILE $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix else @@ -120,7 +120,12 @@ then then if fmu mode_pwm then - mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE + if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE + then + echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV" + else + echo "[i] Error loading mixer: $MIXER_AUX_FILE" + fi else tone_alarm $TUNE_ERR fi From 15f11ae1e231422cd57cc65cdf89ad714f8a6ed4 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 21 Apr 2015 12:36:46 +0200 Subject: [PATCH 3/4] add control output for tilting rotors --- src/modules/vtol_att_control/vtol_att_control_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/vtol_att_control/vtol_att_control_main.cpp b/src/modules/vtol_att_control/vtol_att_control_main.cpp index defcff8e4a..d9425f2bb3 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -176,7 +176,7 @@ private: bool flag_idle_mc; //false = "idle is set for fixed wing mode"; true = "idle is set for multicopter mode" unsigned _motor_count; // number of motors float _airspeed_tot; - + float _tilt_control; //*****************Member functions*********************************************************************** void task_main(); //main task @@ -241,6 +241,7 @@ VtolAttitudeControl::VtolAttitudeControl() : flag_idle_mc = true; _airspeed_tot = 0.0f; + _tilt_control = 0.0f; memset(& _vtol_vehicle_status, 0, sizeof(_vtol_vehicle_status)); _vtol_vehicle_status.vtol_in_rw_mode = true; /* start vtol in rotary wing mode*/ @@ -521,6 +522,7 @@ void VtolAttitudeControl::fill_mc_att_control_output() //set neutral position for elevons _actuators_out_1.control[0] = _actuators_mc_in.control[2]; //roll elevon _actuators_out_1.control[1] = _actuators_mc_in.control[1];; //pitch elevon + _actuators_out_1.control[4] = _tilt_control; // for tilt-rotor control } /** From 5e044e5b676747a278513ec7501a472dea25aac6 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 21 Apr 2015 13:16:59 +0200 Subject: [PATCH 4/4] completed auxiliary mixer file for firefly6 --- ROMFS/px4fmu_common/mixers/firefly6.aux.mix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ROMFS/px4fmu_common/mixers/firefly6.aux.mix b/ROMFS/px4fmu_common/mixers/firefly6.aux.mix index 9ed6eeed91..b0b4250926 100644 --- a/ROMFS/px4fmu_common/mixers/firefly6.aux.mix +++ b/ROMFS/px4fmu_common/mixers/firefly6.aux.mix @@ -1,4 +1,14 @@ -# mixer for the FireFly6 elevons +# mixer for the FireFly6 tilt mechansim servo, elevons and landing gear +======================================================================= + +Tilt mechanism servo mixer +--------------------------- +M: 1 +O: 10000 10000 0 -10000 10000 +S: 1 4 10000 10000 0 -10000 10000 + +Elevon mixers +------------- M: 2 O: 10000 10000 0 -10000 10000 S: 1 0 7500 7500 0 -10000 10000 @@ -8,3 +18,9 @@ M: 2 O: 10000 10000 0 -10000 10000 S: 1 0 7500 7500 0 -10000 10000 S: 1 1 -8000 -8000 0 -10000 10000 + +Landing gear mixer +------------------ +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 7 10000 10000 0 -10000 10000