mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-03 19:24:09 +05:30
Added try-except around get_baud()
This commit is contained in:
parent
9231e6c8bd
commit
dc6873ee08
@ -258,7 +258,10 @@ 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.
|
||||||
'''
|
'''
|
||||||
|
try:
|
||||||
return int(self.execute('b'));
|
return int(self.execute('b'));
|
||||||
|
except:
|
||||||
|
return None
|
||||||
|
|
||||||
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