diff options
Diffstat (limited to 'ROMFS')
-rw-r--r-- | ROMFS/px4fmu_common/init.d/02_io_quad_x | 22 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/10_io_f330 | 37 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.sensors | 4 | ||||
-rw-r--r-- | ROMFS/px4fmu_common/init.d/rc.usb | 49 | ||||
-rwxr-xr-x | ROMFS/px4fmu_common/init.d/rcS | 23 |
5 files changed, 62 insertions, 73 deletions
diff --git a/ROMFS/px4fmu_common/init.d/02_io_quad_x b/ROMFS/px4fmu_common/init.d/02_io_quad_x index 131abf8c4..c63e92f6d 100644 --- a/ROMFS/px4fmu_common/init.d/02_io_quad_x +++ b/ROMFS/px4fmu_common/init.d/02_io_quad_x @@ -40,28 +40,6 @@ fi param set MAV_TYPE 2 # -# Check if PX4IO Firmware should be upgraded (from Andrew Tridgell) -# -if [ -f /fs/microsd/px4io.bin ] -then - echo "PX4IO Firmware found. Checking Upgrade.." - if cmp /fs/microsd/px4io.bin /fs/microsd/px4io.bin.current - then - echo "No newer version, skipping upgrade." - else - echo "Loading /fs/microsd/px4io.bin" - if px4io update /fs/microsd/px4io.bin > /fs/microsd/px4io_update.log - then - cp /fs/microsd/px4io.bin /fs/microsd/px4io.bin.current - echo "Flashed /fs/microsd/px4io.bin OK" >> /fs/microsd/px4io_update.log - else - echo "Failed flashing /fs/microsd/px4io.bin" >> /fs/microsd/px4io_update.log - echo "Failed to upgrade PX4IO firmware - check if PX4IO is in bootloader mode" - fi - fi -fi - -# # Start MAVLink (depends on orb) # mavlink start -d /dev/ttyS1 -b 57600 diff --git a/ROMFS/px4fmu_common/init.d/10_io_f330 b/ROMFS/px4fmu_common/init.d/10_io_f330 index 4107fab4f..4450eb50d 100644 --- a/ROMFS/px4fmu_common/init.d/10_io_f330 +++ b/ROMFS/px4fmu_common/init.d/10_io_f330 @@ -15,20 +15,19 @@ then # Set all params here, then disable autoconfig param set SYS_AUTOCONFIG 0 - param set MC_ATTRATE_D 0.007 + param set MC_ATTRATE_D 0.005 param set MC_ATTRATE_I 0.0 - param set MC_ATTRATE_P 0.13 + param set MC_ATTRATE_P 0.1 param set MC_ATT_D 0.0 param set MC_ATT_I 0.0 - param set MC_ATT_P 7.0 - param set MC_POS_P 0.1 + param set MC_ATT_P 4.5 param set MC_RCLOSS_THR 0.0 param set MC_YAWPOS_D 0.0 - param set MC_YAWPOS_I 0.5 - param set MC_YAWPOS_P 1.0 + param set MC_YAWPOS_I 0.3 + param set MC_YAWPOS_P 0.6 param set MC_YAWRATE_D 0.0 param set MC_YAWRATE_I 0.0 - param set MC_YAWRATE_P 0.2 + param set MC_YAWRATE_P 0.1 param save /fs/microsd/params fi @@ -41,28 +40,6 @@ fi param set MAV_TYPE 2 # -# Check if PX4IO Firmware should be upgraded (from Andrew Tridgell) -# -if [ -f /fs/microsd/px4io2.bin ] -then - echo "PX4IO Firmware found. Checking Upgrade.." - if cmp /fs/microsd/px4io2.bin /fs/microsd/px4io2.cur - then - echo "No newer version, skipping upgrade." - else - echo "Loading /fs/microsd/px4io2.bin" - if px4io update /fs/microsd/px4io2.bin > /fs/microsd/px4io2.log - then - cp /fs/microsd/px4io2.bin /fs/microsd/px4io2.cur - echo "Flashed /fs/microsd/px4io2.bin OK" >> /fs/microsd/px4io2.log - else - echo "Failed flashing /fs/microsd/px4io2.bin" >> /fs/microsd/px4io2.log - echo "Failed to upgrade PX4IO2 firmware - check if PX4IO2 is in bootloader mode" - fi - fi -fi - -# # Start MAVLink (depends on orb) # mavlink start @@ -128,7 +105,7 @@ multirotor_att_control start # # Start logging # -sdlog2 start -r 20 -a -b 14 +sdlog2 start -r 20 -a -b 16 # # Start system state diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 73f40c503..5e80ddc2f 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -25,7 +25,7 @@ then else echo "using L3GD20 and LSM303D" l3gd20 start - lsm303 start + lsm303d start fi # @@ -40,4 +40,4 @@ then # Check sensors - run AFTER 'sensors start' # preflight_check & -fi
\ No newline at end of file +fi diff --git a/ROMFS/px4fmu_common/init.d/rc.usb b/ROMFS/px4fmu_common/init.d/rc.usb index c89932bb5..5b1bd272e 100644 --- a/ROMFS/px4fmu_common/init.d/rc.usb +++ b/ROMFS/px4fmu_common/init.d/rc.usb @@ -13,35 +13,46 @@ if mavlink stop then echo "stopped other MAVLink instance" fi +sleep 2 mavlink start -b 230400 -d /dev/ttyACM0 -if [ $MODE == autostart ] +# Start the commander +if commander start then + echo "Commander started" +fi - # Start the commander - commander start +# Start px4io if present +if px4io start +then + echo "PX4IO driver started" +else + if fmu mode_serial + then + echo "FMU driver started" + fi +fi - # Start sensors - sh /etc/init.d/rc.sensors +# Start sensors +sh /etc/init.d/rc.sensors - # Start one of the estimators - if attitude_estimator_ekf status +# Start one of the estimators +if attitude_estimator_ekf status +then + echo "multicopter att filter running" +else + if att_pos_estimator_ekf status then - echo "multicopter att filter running" + echo "fixedwing att filter running" else - if att_pos_estimator_ekf status - then - echo "fixedwing att filter running" - else - attitude_estimator_ekf start - fi + attitude_estimator_ekf start fi +fi - # Start GPS - if gps start - then - echo "GPS started" - fi +# Start GPS +if gps start +then + echo "GPS started" fi echo "MAVLink started, exiting shell.." diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index b22591f3c..f0ee1a0c6 100755 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -81,6 +81,26 @@ else fi fi +# +# Check if PX4IO Firmware should be upgraded (from Andrew Tridgell) +# +if [ -f /fs/microsd/px4io.bin ] +then + echo "PX4IO Firmware found. Checking Upgrade.." + if cmp /fs/microsd/px4io.bin /fs/microsd/px4io.cur + then + echo "No newer version, skipping upgrade." + else + echo "Loading /fs/microsd/px4io.bin" + if px4io update /fs/microsd/px4io.bin > /fs/microsd/px4io.log + then + cp /fs/microsd/px4io.bin /fs/microsd/px4io.cur + echo "Flashed /fs/microsd/px4io.bin OK" >> /fs/microsd/px4io.log + else + echo "Failed flashing /fs/microsd/px4io.bin" >> /fs/microsd/px4io.log + echo "Failed to upgrade px4io firmware - check if px4io is in bootloader mode" + fi + fi fi # @@ -121,3 +141,6 @@ if param compare SYS_AUTOSTART 31 then sh /etc/init.d/31_io_phantom fi + +# End of autostart +fi |