diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.com> | 2020-03-22 17:41:48 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-22 17:50:42 +0100 |
commit | d0a282b552922f31f80b2e979b79d5697fbbbcda (patch) | |
tree | c6e76cd3333bf60e1db8b787c2209043589bbdf9 /reversing_tools | |
parent | Exclude mypy from Python 3.9 (diff) | |
download | glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.tar glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.tar.gz glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.tar.bz2 glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.tar.lz glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.tar.xz glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.tar.zst glucometerutils-d0a282b552922f31f80b2e979b79d5697fbbbcda.zip |
Diffstat (limited to 'reversing_tools')
-rwxr-xr-x | reversing_tools/abbott/freestyle_hid_console.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/reversing_tools/abbott/freestyle_hid_console.py b/reversing_tools/abbott/freestyle_hid_console.py index 654a97c..0ed4705 100755 --- a/reversing_tools/abbott/freestyle_hid_console.py +++ b/reversing_tools/abbott/freestyle_hid_console.py @@ -45,11 +45,11 @@ def main(): logging.basicConfig(level=args.vlog) - device = freestyle.FreeStyleHidDevice(args.device) - device.TEXT_CMD = args.text_cmd_type - device.TEXT_REPLY_CMD = args.text_reply_type + session = freestyle.FreeStyleHidSession( + None, args.device, args.text_cmd_type, args.text_reply_type + ) - device.connect() + session.connect() while True: if sys.stdin.isatty(): @@ -59,7 +59,7 @@ def main(): print(f">>> {command}") try: - print(device._send_text_command(bytes(command, "ascii"))) + print(session.send_text_command(bytes(command, "ascii"))) except exceptions.InvalidResponse as error: print(f"! {error}") |