Skip to content

Commit

Permalink
aesthetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Poofjunior committed Aug 13, 2020
1 parent 8853342 commit 864bca2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sonication_station/jubilee_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ def parse_string_buffer_into_dicts(packet_buffer_str):
# Acknowledge patch and request more; apply the patch; sleep
j = json.dumps({"command": "Acknowledge"}).encode()
subscribe_socket.sendall(j)
# TODO: Optimize. If we are in patch mode, only the first few
# packets need a big buffer.
# TODO: Optimize. If we are in patch mode, only the first few packets need a big buffer.
start_time = time.perf_counter()
try:
packet_buffer_str = subscribe_socket.recv(self.__class__.MM_BUFFER_SIZE).decode()
Expand Down Expand Up @@ -166,9 +165,8 @@ def parse_string_buffer_into_dicts(packet_buffer_str):
#print(f"thread sleeping. next update time: {self.wake_time}")
time.sleep(self.wake_time - time.perf_counter())
else:
# TODO: maybe accumulate or raise an error here?
print("Error: thread update speed too fast! "
"Missed update deadline!")
print("Error: thread update speed too fast! Missed update deadline!")

subscribe_socket.shutdown(socket.SHUT_RDWR)
subscribe_socket.close()

Expand Down

0 comments on commit 864bca2

Please sign in to comment.