diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2014-02-08 22:56:25 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2014-02-08 22:56:25 +0100 |
commit | 4bb2b588699d99c0c4ec2abb28f5a421a4629ac3 (patch) | |
tree | 3e76ad6ab65e0c80aa23c473709107f234e3e4fc | |
parent | Add a note that the Ultra Easy is also known as Ultra Mini. (diff) | |
download | glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.tar glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.tar.gz glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.tar.bz2 glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.tar.lz glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.tar.xz glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.tar.zst glucometerutils-4bb2b588699d99c0c4ec2abb28f5a421a4629ac3.zip |
-rw-r--r-- | glucometerutils/drivers/otultra2.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py index 8f21ac2..f44450a 100644 --- a/glucometerutils/drivers/otultra2.py +++ b/glucometerutils/drivers/otultra2.py @@ -130,8 +130,7 @@ class Device(object): timeout=1, xonxoff=False, rtscts=False, dsrdtr=False, writeTimeout=None) def connect(self): - self.serial_.write(b'\x11\r') - self.serial_.flush() + return def disconnect(self): return @@ -142,7 +141,7 @@ class Device(object): Args: cmd: command and parameters to send (without newline) """ - cmdstring = bytes(cmd + '\r', 'ascii') + cmdstring = bytes('\x11\r' + cmd + '\r', 'ascii') self.serial_.write(cmdstring) self.serial_.flush() |