mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-05 20:14:07 +05:30
Added error message for unsuccessful connection
This commit is contained in:
parent
038e0cf9b4
commit
63a3296007
@ -264,7 +264,11 @@ class Arduino:
|
|||||||
def get_baud(self):
|
def get_baud(self):
|
||||||
''' Get the current baud rate on the serial port.
|
''' Get the current baud rate on the serial port.
|
||||||
'''
|
'''
|
||||||
return int(self.execute('b'));
|
try:
|
||||||
|
return int(self.execute('b'))
|
||||||
|
except:
|
||||||
|
print "Failed to determine baud rate of Arduino so aborting!"
|
||||||
|
os._exit(1)
|
||||||
|
|
||||||
def get_encoder_counts(self):
|
def get_encoder_counts(self):
|
||||||
values = self.execute_array('e')
|
values = self.execute_array('e')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user