mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-23 06:36:45 +08:00
[Bebop 2] also upload mixer and config files
This commit is contained in:
committed by
Beat Küng
parent
918c397ae7
commit
ca446982ab
@@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z ${BEBOP_IP+x} ]; then
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
SRC_DIR="$BASEDIR/../"
|
||||
|
||||
if [ -z ${BEBOP_IP+x} ]; then
|
||||
ip=192.168.42.1
|
||||
echo "\$BEBOP_IP is not set (use default: $ip)"
|
||||
else
|
||||
@@ -42,7 +45,13 @@ if [[ $adb_return == "" ]]; then
|
||||
restart_px4=true
|
||||
fi
|
||||
|
||||
$(dirname "$0")/adb_upload.sh $@
|
||||
# upload PX4
|
||||
$BASEDIR/adb_upload.sh $@
|
||||
|
||||
# upload mixer and config files
|
||||
echo "Uploading mixer and config files to /home/root"
|
||||
adb push $SRC_DIR/ROMFS/px4fmu_common/mixers/bebop.main.mix /home/root
|
||||
adb push $SRC_DIR/posix-configs/bebop/px4.config /home/root
|
||||
|
||||
# restart the process after uploading
|
||||
if [ "$restart_px4" = true ]; then
|
||||
@@ -50,5 +59,9 @@ if [ "$restart_px4" = true ]; then
|
||||
adb shell /etc/init.d/rcS_mode_default 2>/dev/null 1>/dev/null &
|
||||
fi
|
||||
|
||||
# make sure all buffered blocks are written to disk
|
||||
echo "Syncing FS..."
|
||||
adb shell sync
|
||||
|
||||
echo "Disconnecting from Bebop"
|
||||
adb disconnect
|
||||
|
||||
Reference in New Issue
Block a user