aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-10-19 10:44:38 +0200
committerJulian Oes <julian@oes.ch>2013-10-19 10:44:38 +0200
commite457248d1e3750f0e257f69fe75630a6a48a66b0 (patch)
treefdd06b62b9427f44abcdd4f72cd1b26d4a1b5186 /ROMFS/px4fmu_common
parent1d3f25ee6c9983ec5da9de4d4f7b463f880f3a87 (diff)
downloadpx4-firmware-e457248d1e3750f0e257f69fe75630a6a48a66b0.tar.gz
px4-firmware-e457248d1e3750f0e257f69fe75630a6a48a66b0.tar.bz2
px4-firmware-e457248d1e3750f0e257f69fe75630a6a48a66b0.zip
Use new pwm cmds in rc.custom_io_esc
Diffstat (limited to 'ROMFS/px4fmu_common')
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.custom_io_esc28
1 files changed, 14 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 e645d9d54..999422767 100644
--- a/ROMFS/px4fmu_common/init.d/rc.custom_io_esc
+++ b/ROMFS/px4fmu_common/init.d/rc.custom_io_esc
@@ -62,19 +62,6 @@ then
usleep 5000
sh /etc/init.d/rc.io
-
- 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
else
fmu mode_pwm
# Start MAVLink (on UART1 / ttyS0)
@@ -84,6 +71,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 +105,7 @@ fi
#
# Set PWM output frequency
#
-pwm -u 400 -m 0xff
+pwm rate -r 400 -c 1234
#
# Start common for all multirotors apps