diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-12-15 00:50:49 -0500 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-12-15 00:50:49 -0500 |
commit | db626076acc73fbcd499b3235bf4503c22b47e2b (patch) | |
tree | e9d3c4e8ff64b099ef619824d1c14b71da0d51f0 | |
parent | 11167eff189b0d23d8f88ada09f975dc7f2d80fc (diff) |
remove print statement
-rw-r--r-- | Recv.py | 7 | ||||
-rw-r--r-- | Sender.py | 4 | ||||
-rw-r--r-- | __pycache__/utils.cpython-38.pyc | bin | 2503 -> 2403 bytes | |||
-rw-r--r-- | utils.py | 2 |
4 files changed, 7 insertions, 6 deletions
@@ -9,9 +9,9 @@ from utils import * class Recv: - def __init__(self, start_freq=18000): + def __init__(self, start_freq=19000): self.start_freq = start_freq - self.freq_range = 2000 + self.freq_range = 500 self.sampling_rate = 44100 self.p = pyaudio.PyAudio() self.bytes_per_transmit = 1 @@ -82,6 +82,7 @@ class Recv: # just started receiving data bytes_seen = [] recv_buffer = [] + print("started receiving data!") is_data_flag = bits[-1] if prev_is_data_flag == '0' and is_data_flag == '0': @@ -99,7 +100,7 @@ class Recv: # FIXME: what to do with buffer? # for now print buffer as string buffer_as_string = ''.join([utils.receive_string(byte) for byte in recv_buffer]) - print("received data: ", buffer_as_string) + print("data received: ", buffer_as_string) # clear data structure & buffer continue @@ -131,9 +131,9 @@ def receive_string(data, start_freq=18000, freq_step=250): class LinkLayer: - def __init__(self, start_freq=18000): + def __init__(self, start_freq=19000): self.start_freq = start_freq - self.freq_range = 2000 + self.freq_range = 500 self.sampling_rate = 44100 self.p = pyaudio.PyAudio() self.isReceiving = False diff --git a/__pycache__/utils.cpython-38.pyc b/__pycache__/utils.cpython-38.pyc Binary files differindex 972bdec..690b063 100644 --- a/__pycache__/utils.cpython-38.pyc +++ b/__pycache__/utils.cpython-38.pyc @@ -63,7 +63,7 @@ def frequencies_to_bits(frequencies, expected_freqs): def play_data(data, start_freq, freq_step, bytes_per_transmit, stream): freq_list = calculate_send_frequencies(start_freq, freq_step, bytes_per_transmit) - send_duration = 1.0 + send_duration = .35 flip_flag = 0 # TODO: make this global between plays for byte in data: |