def sendBinaryToDevice(self, data):
    if self.debug:
        print((('Sending ' + str(len(data))) + ' bytes of binary data.'))
    self.ser.write(data)
def sendBinaryToDevice(self, data):
    if self.debug:
        print((('Sending ' + str(len(data))) + ' bytes of binary data.'))
    self.ser.write(data)