Skip to content

Commit

Permalink
iradio_uv_5118plus.py: use space padding for channel names
Browse files Browse the repository at this point in the history
  • Loading branch information
KC9HI authored and kk7ds committed Jun 29, 2023
1 parent 64974a7 commit b970ba3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chirp/drivers/iradio_uv_5118plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def get_memory(self, number):
else:
mem.offset = 0

mem.name = str(_mem.name).rstrip('\xFF ')
mem.name = str(_mem.name).rstrip(" ").replace("\xFF", " ")

mem.mode = _mem.isnarrow and "NFM" or "FM"

Expand Down Expand Up @@ -565,7 +565,7 @@ def set_memory(self, mem):

# if empty memory
if mem.empty:
_mem.set_raw("\xFF" * 22 + "\20" * 10)
_mem.set_raw("\xFF" * 22 + "\x20" * 10)
return

_mem.set_raw("\xFF" * 4 + "\x00\x30" + "\xFF" * 4 + "\x00\x30" +
Expand All @@ -582,7 +582,7 @@ def set_memory(self, mem):
else:
_mem.txfreq = mem.freq / 10

_mem.name = mem.name.rstrip(' ').ljust(10, '\xFF')
_mem.name = mem.name.rstrip('\xFF').ljust(10, '\x20')

_mem.scan = mem.skip != "S"
_mem.isnarrow = mem.mode == "NFM"
Expand Down

0 comments on commit b970ba3

Please sign in to comment.