diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-15 00:10:48 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-15 00:10:48 -0500 |
commit | 11167eff189b0d23d8f88ada09f975dc7f2d80fc (patch) | |
tree | 520b081119c4c7f29668dd5245c8ec383facb3af /utils.py | |
parent | 224ea0e1d3db375356f7fc6456b6e28554b4d77b (diff) |
remove print statement
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -68,11 +68,9 @@ def play_data(data, start_freq, freq_step, bytes_per_transmit, stream): flip_flag = 0 # TODO: make this global between plays for byte in data: byte = byte + str(flip_flag) + '1' - print(byte) samples = None for i, bit in enumerate(byte): if bit == '1': - print(freq_list[i]) s = .125 * np.sin(2 * np.pi * np.arange(44100 * send_duration) * freq_list[i] / 44100) if samples is None: samples = s @@ -86,8 +84,8 @@ def play_data(data, start_freq, freq_step, bytes_per_transmit, stream): def receive_string(binary): binary_string = ''.join(binary) try: - print(chr(int(binary_string, 2))) + # print(chr(int(binary_string, 2))) return chr(int(binary_string, 2)) except ValueError: - print("Warn: Invalid binary data: ", binary_string) - return 'X' + # print("Warn: Invalid binary data: ", binary_string) + return '' |