aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_common/init.d/2100_mpx_easystar
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-01-10 13:18:34 +0100
committerAnton Babushkin <anton.babushkin@me.com>2014-01-10 13:18:34 +0100
commitb5d56523bc100d7bf95a6dfbac95c1afc89e345e (patch)
treea54be4fa60168cab7c03aa8622ddf05c1cf275b3 /ROMFS/px4fmu_common/init.d/2100_mpx_easystar
parent891cb3f8c2755fdc566711448f1f19a06938bd2f (diff)
downloadpx4-firmware-b5d56523bc100d7bf95a6dfbac95c1afc89e345e.tar.gz
px4-firmware-b5d56523bc100d7bf95a6dfbac95c1afc89e345e.tar.bz2
px4-firmware-b5d56523bc100d7bf95a6dfbac95c1afc89e345e.zip
Init scripts cleanup, WIP
Diffstat (limited to 'ROMFS/px4fmu_common/init.d/2100_mpx_easystar')
-rw-r--r--ROMFS/px4fmu_common/init.d/2100_mpx_easystar58
1 files changed, 7 insertions, 51 deletions
diff --git a/ROMFS/px4fmu_common/init.d/2100_mpx_easystar b/ROMFS/px4fmu_common/init.d/2100_mpx_easystar
index 97c2d7c90..9bf01c60c 100644
--- a/ROMFS/px4fmu_common/init.d/2100_mpx_easystar
+++ b/ROMFS/px4fmu_common/init.d/2100_mpx_easystar
@@ -1,13 +1,12 @@
#!nsh
-echo "[init] PX4FMU v1, v2 with or without IO on EasyStar"
+echo "[init] EasyStar"
-#
-# Load default params for this platform
-#
-if param compare SYS_AUTOCONFIG 1
+if [ $DO_AUTOCONFIG == yes ]
then
- # Set all params here, then disable autoconfig
+ #
+ # Default parameters for this platform
+ #
param set FW_P_D 0
param set FW_P_I 0
param set FW_P_IMAX 15
@@ -31,50 +30,7 @@ then
param set FW_L1_PERIOD 16
param set RC_SCALE_ROLL 1.0
param set RC_SCALE_PITCH 1.0
-
- param set SYS_AUTOCONFIG 0
- param save
fi
-#
-# Force some key parameters to sane values
-# MAV_TYPE 1 = fixed wing
-#
-param set MAV_TYPE 1
-
-#
-# Start and configure PX4IO or FMU interface
-#
-if px4io detect
-then
- # Start MAVLink (depends on orb)
- mavlink start
-
- sh /etc/init.d/rc.io
- # Limit to 100 Hz updates and (implicit) 50 Hz PWM
- px4io limit 100
-else
- # Start MAVLink (on UART1 / ttyS0)
- mavlink start -d /dev/ttyS0
-
- fmu mode_pwm
- param set BAT_V_SCALING 0.004593
- set EXIT_ON_END yes
-fi
-
-#
-# Load mixer and start controllers (depends on px4io)
-#
-if [ -f /fs/microsd/etc/mixers/FMU_RET.mix ]
-then
- echo "Using /fs/microsd/etc/mixers/FMU_RET.mix"
- mixer load /dev/pwm_output /fs/microsd/etc/mixers/FMU_RET.mix
-else
- echo "Using /etc/mixers/FMU_RET.mix"
- mixer load /dev/pwm_output /etc/mixers/FMU_RET.mix
-fi
-
-#
-# Start common fixedwing apps
-#
-sh /etc/init.d/rc.fixedwing
+set FRAME_TYPE fw
+set FRAME_GEOMETRY RET