diff --git a/scripts/post-update.sh b/scripts/post-update.sh index 793757a0..0cf111e6 100755 --- a/scripts/post-update.sh +++ b/scripts/post-update.sh @@ -296,6 +296,9 @@ PRE_0_0_19=$(( git rev-list --count --left-right 0.0.18...revert-point || echo 0 if (( $PRE_0_0_19 > 0 )); then echo "config-server" > /home/pi/network.conf + + # Use the last version of bluerobotics-ping + sudo pip install bluerobotics-ping==0.0.10 --upgrade --force-reinstall fi echo 'Update Complete, refresh your browser' diff --git a/tools/PingBootloader.py b/tools/PingBootloader.py index 83ddae72..0488741b 100755 --- a/tools/PingBootloader.py +++ b/tools/PingBootloader.py @@ -15,7 +15,7 @@ # we shut down the proxy before communicating with the device # then restart the proxy when we are finished -from brping import Ping1D, PingMessage, pingmessage +from brping import Ping1D, PingMessage, definitions import platform import time import os @@ -48,7 +48,7 @@ # send ping device to bootloader print("Sending device to bootloader...") -bootloader_msg = PingMessage(pingmessage.PING1D_GOTO_BOOTLOADER) +bootloader_msg = PingMessage(definitions.PING1D_GOTO_BOOTLOADER) bootloader_msg.pack_msg_data() myPing.iodev.write(bootloader_msg.msg_data) diff --git a/tools/ping_enumerator.py b/tools/ping_enumerator.py index 8aeb2f2f..c6995ab0 100755 --- a/tools/ping_enumerator.py +++ b/tools/ping_enumerator.py @@ -36,7 +36,12 @@ def detect_device(self, dev): device was not detected """ - ping = PingDevice("/dev/serial/by-id/" + dev, 115200) + try: + ping = PingDevice("/dev/serial/by-id/" + dev, 115200) + except Exception as exception: + print("An exception has occurred: ", exception) + return None + if not ping.initialize(): return None