diff options
Diffstat (limited to 'ROMFS')
-rw-r--r-- | ROMFS/px4fmu_common/init.d/10019_sk450_deadcat | 5 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.interface | 36 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rcS | 5 |
3 files changed, 45 insertions, 1 deletions
diff --git a/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat b/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat index 8a90c9169..c6861c2d4 100644 --- a/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat +++ b/ROMFS/px4fmu_common/init.d/10019_sk450_deadcat @@ -30,4 +30,9 @@ set MIXER sk450_deadcat set PWM_OUT 1234 set PWM_MIN 1050 +set PWM_AUX_OUT 1234 +# set PWM_AUX_MIN 900 +# set PWM_AUX_MAX 2100 +set PWM_AUX_RATE 100 + gimbal start diff --git a/ROMFS/px4fmu_common/init.d/rc.interface b/ROMFS/px4fmu_common/init.d/rc.interface index 767a4564e..5101acc07 100644 --- a/ROMFS/px4fmu_common/init.d/rc.interface +++ b/ROMFS/px4fmu_common/init.d/rc.interface @@ -103,6 +103,7 @@ then # set MIXER_AUX_FILE none + set OUTPUT_AUX_DEV /dev/pwm_output1 if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.mix ] then @@ -119,10 +120,43 @@ then then if fmu mode_pwm then - mixer load /dev/pwm_output1 $MIXER_AUX_FILE + mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE else tone_alarm $TUNE_ERR fi + + if [ $PWM_AUX_OUT != none ] + then + # + # Set PWM_AUX output frequency + # + if [ $PWM_AUX_RATE != none ] + then + pwm rate -c $PWM_AUX_OUT -r $PWM_AUX_RATE -d $OUTPUT_AUX_DEV + fi + + # + # Set disarmed, min and max PWM_AUX values + # + if [ $PWM_AUX_DISARMED != none ] + then + pwm disarmed -c $PWM_AUX_OUT -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV + fi + if [ $PWM_AUX_MIN != none ] + then + pwm min -c $PWM_AUX_OUT -p $PWM_AUX_MIN -d $OUTPUT_AUX_DEV + fi + if [ $PWM_AUX_MAX != none ] + then + pwm max -c $PWM_AUX_OUT -p $PWM_AUX_MAX -d $OUTPUT_AUX_DEV + fi + fi + + if [ $FAILSAFE_AUX != none ] + then + pwm failsafe -d $OUTPUT_AUX_DEV $FAILSAFE + fi + fi fi unset OUTPUT_DEV diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 1d21d7772..59abdc8e3 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -109,6 +109,11 @@ then set PWM_DISARMED none set PWM_MIN none set PWM_MAX none + set PWM_AUX_OUT none + set PWM_AUX_RATE none + set PWM_AUX_DISARMED none + set PWM_AUX_MIN none + set PWM_AUX_MAX none set MK_MODE none set FMU_MODE pwm set MAVLINK_F default |