Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Sourcery refactored master branch #1

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PoC.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def transmit_bits(tmpfile, bits, T0, readsize):
fp.seek(offset)
for b in list(bits):
# sync()
if (b == '0'):
print("0 sleep " + str(T0))
if b == '0':
print(f"0 sleep {str(T0)}")
time.sleep(T0)
if (b == '1'):
elif b == '1':
Comment on lines -32 to +35
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function transmit_bits refactored with the following changes:

sync()
fp.seek(offset)
print("1 read %d bytes" % len(fp.read(readsize)))
Expand All @@ -44,7 +44,7 @@ def manchester(bits):
for b in list(bits):
if b == '0':
r += '01'
if b == '1':
elif b == '1':
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function manchester refactored with the following changes:

  • Simplify conditional into switch-like form (switch)

r += '10'
return r

Expand Down