mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 09:26:25 +08:00
bebop uploader : kill and restart autostarted PX4 daemon
This commit is contained in:
committed by
Lorenz Meier
parent
cd902d32ef
commit
f266b91cc9
@@ -34,11 +34,25 @@ adb shell mount -o remount,rw /
|
||||
adb shell touch /home/root/parameters
|
||||
adb shell mkdir -p /data/ftp/internal_000/fs/microsd
|
||||
|
||||
# kill PX4 if it is already running from autostart
|
||||
restart_px4=false
|
||||
adb_return=$(adb shell killall -KILL px4)
|
||||
if [[ $adb_return == "" ]]; then
|
||||
echo "Killed running PX4 process"
|
||||
restart_px4=true
|
||||
fi
|
||||
|
||||
${PX4_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip \
|
||||
-R .comment -R .gnu.version \
|
||||
../build_posix_bebop_default/src/firmware/posix/px4
|
||||
|
||||
../Tools/adb_upload.sh $@
|
||||
|
||||
echo "Disconnecting from bebop"
|
||||
# restart the process after uploading
|
||||
if [ "$restart_px4" = true ]; then
|
||||
echo "Restarting PX4 process"
|
||||
adb shell /etc/init.d/rcS_mode_default 2>/dev/null 1>/dev/null &
|
||||
fi
|
||||
|
||||
echo "Disconnecting from Bebop"
|
||||
adb disconnect
|
||||
|
||||
Reference in New Issue
Block a user