aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/rc.custom_io_esc
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@student.ethz.ch>2013-10-31 12:16:26 +0100
committerThomas Gubler <thomasgubler@student.ethz.ch>2013-10-31 12:16:26 +0100
commite2f08dacc91312559233571079783c0da4a8af34 (patch)
treea8c8d4abb0fd88e94994fb34cc0d7092c827080d /ROMFS/px4fmu_common/init.d/rc.custom_io_esc
parent820d19eb025b1696f0ff85b4134659b7fb691ae8 (diff)
parent7d443eb3325cfff469c88864fdc96b68612d36c0 (diff)
downloadpx4-firmware-e2f08dacc91312559233571079783c0da4a8af34.tar.gz
px4-firmware-e2f08dacc91312559233571079783c0da4a8af34.tar.bz2
px4-firmware-e2f08dacc91312559233571079783c0da4a8af34.zip
Merge remote-tracking branch 'upstream/master' into fw_staging_ouputlimit_master
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/rc.custom_io_esc')
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.custom_io_esc30
1 files changed, 16 insertions, 14 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.custom_io_esc b/ROMFS/px4fmu_common/init.d/rc.custom_io_esc
index 2bfaed76c..0c0cfa53d 100644
--- a/ROMFS/px4fmu_common/init.d/rc.custom_io_esc
+++ b/ROMFS/px4fmu_common/init.d/rc.custom_io_esc
@@ -61,20 +61,9 @@ then
mavlink start -d /dev/ttyS1 -b 57600
usleep 5000
- sh /etc/init.d/rc.io
+ commander start
- if [ $ESC_MAKER = afro ]
- then
- # Set PWM values for Afro ESCs
- px4io idle 1050 1050 1050 1050
- px4io min 1080 1080 1080 1080
- px4io max 1860 1860 1860 1860
- else
- # Set PWM values for typical ESCs
- px4io idle 900 900 900 900
- px4io min 1110 1100 1100 1100
- px4io max 1800 1800 1800 1800
- fi
+ sh /etc/init.d/rc.io
else
fmu mode_pwm
# Start MAVLink (on UART1 / ttyS0)
@@ -84,6 +73,19 @@ else
set EXIT_ON_END yes
fi
+if [ $ESC_MAKER = afro ]
+then
+ # Set PWM values for Afro ESCs
+ pwm disarmed -c 1234 -p 1050
+ pwm min -c 1234 -p 1080
+ pwm max -c 1234 -p 1860
+else
+ # Set PWM values for typical ESCs
+ pwm disarmed -c 1234 -p 900
+ pwm min -c 1234 -p 980
+ pwm max -c 1234 -p 1800
+fi
+
#
# Load mixer
#
@@ -105,7 +107,7 @@ fi
#
# Set PWM output frequency
#
-pwm -u 400 -m 0xff
+pwm rate -r 400 -c 1234
#
# Start common for all multirotors apps