Skip to content

Commit

Permalink
remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelburgos committed May 31, 2024
1 parent 28afb45 commit dc07251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Gateware/applet/open_beam_interface/base_commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ def test_response(self):
@property
def byte_response(self):
cookie = struct.pack('>H', self._cookie)
print(f"{cookie=}")
print(f"{len(cookie)=}")
return struct.pack('>HBB', 0xffff, cookie[0], cookie[1])


Expand Down
5 changes: 2 additions & 3 deletions obi_software/stream_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,16 @@ async def _synchronize(self):
seq = CommandSequence(cookie=cookie, output=OutputMode.SixteenBit, raster=False)
seq.add(FlushCommand())
res = SynchronizeCommand(cookie=cookie, output=OutputMode.SixteenBit, raster=False).byte_response
print(f"{res=}")
self._stream.send(seq.message)
while True:
print("trying to synchronize...")
self._logger.debug("trying to synchronize...")
try:
flushed = await self._stream._reader.readuntil(res)
self._logger.debug(f"synchronized after {len(flushed)} bytes")
self._synchronized = True
break
except asyncio.LimitOverrunError:
print("LimitOverrunError")
self._logger.debug("LimitOverrunError")
# If we're here, it means the read buffer has exactly `self.read_buffer_size` bytes
# in it (set by the `open_connection(limit=)` argument). A partial response could
# still be at the very end of the buffer, so read less than that.
Expand Down

0 comments on commit dc07251

Please sign in to comment.