Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup rpttool #1031

Merged
merged 1 commit into from
May 14, 2024
Merged
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
14 changes: 7 additions & 7 deletions chirp/drivers/idrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def set_freq(pipe, freq):
resp = send(pipe, buf)
for frame in resp:
if len(frame) == 6:
if frame[4] == b"\xfb":
if frame[4] == 251:
kk7ds marked this conversation as resolved.
Show resolved Hide resolved
return True

raise errors.InvalidDataError("Repeater reported error")
Expand All @@ -96,14 +96,14 @@ def get_freq(pipe):
resp = send(pipe, buf)

for frame in resp:
if frame[4] == b"\x03":
if frame[4] == 3:
els = frame[5:10]

freq = int("%02x%02x%02x%02x%02x" % (ord(els[4]),
ord(els[3]),
ord(els[2]),
ord(els[1]),
ord(els[0])))
freq = int("%02x%02x%02x%02x%02x" % (els[4],
els[3],
els[2],
els[1],
els[0]))
LOG.debug("Freq: %f" % freq)
return freq
else:
Expand Down
4 changes: 2 additions & 2 deletions chirp/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def bcd_encode(val, bigendian=True, width=None):
digits = []
while val != 0:
digits.append(val % 10)
val /= 10
val //= 10

result = ""
result = b""

if len(digits) % 2 != 0:
digits.append(0)
Expand Down
4 changes: 2 additions & 2 deletions rpttool
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def _set_freq(rp):
return True


def set_freq():
rp = open_device()
def set_freq(dev):
rp = open_device(dev)
if not rp:
return

Expand Down
Loading