|
@@ -83,16 +83,8 @@ class Arduino:
|
|
|
|
|
|
def i2c_connect(self):
|
|
|
try:
|
|
|
- rospy.loginfo("Connecting to Arduino on IIC addr:"+str(self.i2c_slave_addr))
|
|
|
+ rospy.loginfo("Connecting to Arduino on IIC addr: "+str(self.i2c_slave_addr))
|
|
|
test = self.i2c_get_baud()
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
if test != self.baudrate:
|
|
|
time.sleep(1)
|
|
|
test = self.i2c_get_baud()
|
|
@@ -333,7 +325,6 @@ class Arduino:
|
|
|
|
|
|
def i2c_get_encoder_counts(self):
|
|
|
|
|
|
-
|
|
|
try:
|
|
|
self.i2c_bus.write_byte(self.i2c_slave_addr, int(ord('e')))
|
|
|
self.i2c_bus.write_byte(self.i2c_slave_addr, ord('\r'))
|
|
@@ -357,7 +348,6 @@ class Arduino:
|
|
|
traceback.print_exc(file=sys.stdout)
|
|
|
return None
|
|
|
|
|
|
-
|
|
|
def reset_encoders(self):
|
|
|
''' Reset the encoder counts to 0 by serial port
|
|
|
'''
|
|
@@ -529,7 +519,6 @@ class Arduino:
|
|
|
except:
|
|
|
return None
|
|
|
|
|
|
-
|
|
|
def getBatPercent(self):
|
|
|
'''get the remaining power percentage
|
|
|
'''
|