summaryrefslogtreecommitdiffstats
path: root/reversing_tools/abbott
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2019-09-08 21:12:45 +0200
committerDiego Elio Pettenò <flameeyes@flameeyes.com>2019-09-08 21:12:45 +0200
commitde5cc942773bcf1fd93b86202a350d97f05183c1 (patch)
treee661fc008149286f702f400c49cdd5c4a4df1ca7 /reversing_tools/abbott
parentfreestyle devices: don't error out if there are no readings. (diff)
downloadglucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.tar
glucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.tar.gz
glucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.tar.bz2
glucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.tar.lz
glucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.tar.xz
glucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.tar.zst
glucometerutils-de5cc942773bcf1fd93b86202a350d97f05183c1.zip
Diffstat (limited to 'reversing_tools/abbott')
-rwxr-xr-xreversing_tools/abbott/freestyle_hid_console.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/reversing_tools/abbott/freestyle_hid_console.py b/reversing_tools/abbott/freestyle_hid_console.py
index 5acd958..908fb4e 100755
--- a/reversing_tools/abbott/freestyle_hid_console.py
+++ b/reversing_tools/abbott/freestyle_hid_console.py
@@ -4,6 +4,7 @@
import argparse
import logging
+import sys
from glucometerutils import exceptions
from glucometerutils.support import freestyle
@@ -36,7 +37,12 @@ def main():
device.connect()
while True:
- command = input('>>> ')
+ if sys.stdin.isatty():
+ command = input('>>> ')
+ else:
+ command = input()
+ print(f'>>> {command}')
+
try:
print(device._send_text_command(bytes(command, 'ascii')))
except exceptions.InvalidResponse as error: