diff options
author | Arturs Artamonovs <dos21h@gmail.com> | 2023-03-08 18:46:54 +0000 |
---|---|---|
committer | Arturs Artamonovs <dos21h@gmail.com> | 2023-03-08 18:46:54 +0000 |
commit | fba22599d2ce386517c5c7f93403e0b3a4c92877 (patch) | |
tree | 35c306958c1ca037238d828b7ff64042b8995bf8 /airspyhf_rx.py | |
parent | 7d629e71afd4ef97c45ad2a0cbf93631aa4a9bc9 (diff) | |
download | pyairspyhf-fba22599d2ce386517c5c7f93403e0b3a4c92877.tar.gz pyairspyhf-fba22599d2ce386517c5c7f93403e0b3a4c92877.zip |
Fix the airspyhf_rx, update README
Diffstat (limited to 'airspyhf_rx.py')
-rw-r--r-- | airspyhf_rx.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/airspyhf_rx.py b/airspyhf_rx.py index da0e32e..8ba5557 100644 --- a/airspyhf_rx.py +++ b/airspyhf_rx.py @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import os from airspyhf import * from ctypes import * @@ -38,7 +39,8 @@ if args.serial != None: else: serial = c_uint64(0) libairspyhf.airspyhf_list_devices(byref(serial), 1) - ret = libairspyhf.airspyhf_open_sn(dev_p, f"{hex(serial.value)}") + print(hex(serial.value)) + ret = libairspyhf.airspyhf_open_sn(dev_p, int(hex(serial.value),16)) print("open_sn: Returned %d"%(ret)) if (ret != 0): print("airspyhf_open_sn returned != 0, error") @@ -116,17 +118,13 @@ except: ret = libairspyhf.airspyhf_stop(dev_p) print(f"airspyhf_stop ret={ret}") - +time.sleep(1) #Not close for now ret = libairspyhf.close(dev_p) print("closed: Returned %d"%(ret)) print(f"Total samples received {sample_count}") -libairspyhf.py_test() - -libairspyhf.py_test_cb(read_samples_cb) - wave_file.close() print("All is ok") |