Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions psk.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@
for k, v in psk.items():
decode_psk[v] = k

def encode(string):
def encode(string, sigil):
result = []
for c in string:
result.append(psk[c])
return '00'.join(result) + '00'
return sigil.join(result) + sigil

def decode(string):
try:
Expand Down
2 changes: 1 addition & 1 deletion send.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def play_buffer(buffer):
while True:
message = user_input("> ")
try:
pattern = psk.encode(message)
pattern = psk.encode(message, options.sigil)
buffer = make_buffer_from_bit_pattern(pattern, FREQ, FREQ_OFF)
play_buffer(buffer)
except KeyError:
Expand Down