Fixes and testing: LT-725UV & update Python3 Driver Testing matrix

This commit is contained in:
Jim Unroe 2022-12-11 17:40:44 -05:00 committed by Dan Smith
parent 73a1c76ad4
commit 766585354e
3 changed files with 20 additions and 20 deletions

View File

@ -265,7 +265,7 @@ def _clean_buffer(radio):
def _rawrecv(radio, amount):
"""Raw read from the radio device"""
data = ""
data = b""
try:
data = radio.pipe.read(amount)
except:
@ -321,12 +321,12 @@ def _do_ident(radio):
# Flush input buffer
_clean_buffer(radio)
magic = "PROM_LIN"
magic = b"PROM_LIN"
_rawsend(radio, magic)
ack = _rawrecv(radio, 1)
if ack != "\x06":
if ack != b"\x06":
_exit_program_mode(radio)
if ack:
LOG.debug(repr(ack))
@ -336,7 +336,7 @@ def _do_ident(radio):
def _exit_program_mode(radio):
endframe = "EXIT"
endframe = b"EXIT"
_rawsend(radio, endframe)
@ -349,13 +349,13 @@ def _download(radio):
# UI progress
status = chirp_common.Status()
status.cur = 0
status.max = MEM_SIZE / BLOCK_SIZE
status.max = MEM_SIZE // BLOCK_SIZE
status.msg = "Cloning from radio..."
radio.status_fn(status)
data = ""
data = b""
for addr in range(0, MEM_SIZE, BLOCK_SIZE):
frame = _make_frame("READ", addr, BLOCK_SIZE)
frame = _make_frame(b"READ", addr, BLOCK_SIZE)
# DEBUG
LOG.info("Request sent:")
LOG.debug(util.hexprint(frame))
@ -370,14 +370,12 @@ def _download(radio):
data += d
# UI Update
status.cur = addr / BLOCK_SIZE
status.cur = addr // BLOCK_SIZE
status.msg = "Cloning from radio..."
radio.status_fn(status)
_exit_program_mode(radio)
data += radio.MODEL.ljust(8)
return data
@ -390,7 +388,7 @@ def _upload(radio):
# UI progress
status = chirp_common.Status()
status.cur = 0
status.max = MEM_SIZE / BLOCK_SIZE
status.max = MEM_SIZE // BLOCK_SIZE
status.msg = "Cloning to radio..."
radio.status_fn(status)
@ -399,19 +397,19 @@ def _upload(radio):
# Sending the data
data = radio.get_mmap()[addr:addr + BLOCK_SIZE]
frame = _make_frame("WRIE", addr, BLOCK_SIZE, data)
frame = _make_frame(b"WRIE", addr, BLOCK_SIZE, data)
_rawsend(radio, frame)
# Receiving the response
ack = _rawrecv(radio, 1)
if ack != "\x06":
if ack != b"\x06":
_exit_program_mode(radio)
msg = "Bad ack writing block 0x%04x" % addr
raise errors.RadioError(msg)
# UI Update
status.cur = addr / BLOCK_SIZE
status.cur = addr // BLOCK_SIZE
status.msg = "Cloning to radio..."
radio.status_fn(status)
@ -447,6 +445,7 @@ class LT725UV(chirp_common.CloneModeRadio):
"""LUITON LT-725UV Radio"""
VENDOR = "LUITON"
MODEL = "LT-725UV"
NEEDS_COMPAT_SERIAL = False
MODES = ["NFM", "FM"]
TONES = chirp_common.TONES
DTCS_CODES = sorted(chirp_common.DTCS_CODES + [645])
@ -578,7 +577,7 @@ class LT725UV(chirp_common.CloneModeRadio):
LOG.exception('Unexpected error during download')
raise errors.RadioError('Unexpected error communicating '
'with the radio')
self._mmap = memmap.MemoryMap(data)
self._mmap = memmap.MemoryMapBytes(data)
self.process_mmap()
def sync_out(self):

View File

@ -55,8 +55,8 @@
| <a name="Baofeng_UV-9G"></a> Baofeng_UV-9G | [@KC9HI](https://github.com/KC9HI) | 3-Dec-2022 | Yes | 0.65% |
| <a name="Baofeng_UV-9R"></a> Baofeng_UV-9R | [@KC9HI](https://github.com/KC9HI) | 3-Dec-2022 | Yes | **2.52%** |
| <a name="Baofeng_UV-B5"></a> Baofeng_UV-B5 | [@KC9HI](https://github.com/KC9HI) | 18-Nov-2022 | Yes | 0.35% |
| <a name="Baojie_BJ-218"></a> Baojie_BJ-218 | | | | 0.29% |
| <a name="Baojie_BJ-318"></a> Baojie_BJ-318 | | | | 0.10% |
| <a name="Baojie_BJ-218"></a> Baojie_BJ-218 | | | Yes | 0.29% |
| <a name="Baojie_BJ-318"></a> Baojie_BJ-318 | | | Yes | 0.10% |
| <a name="Baojie_BJ-9900"></a> Baojie_BJ-9900 | | | | 0.02% |
| <a name="Baojie_BJ-UV55"></a> Baojie_BJ-UV55 | | | Yes | 0.03% |
| <a name="Boblov_X3Plus"></a> Boblov_X3Plus | | | | 0.02% |
@ -190,7 +190,7 @@
| <a name="LUITON_LT-580_UHF"></a> LUITON_LT-580_UHF | [@KC9HI](https://github.com/KC9HI) | 8-Dec-2022 | Yes | 0.01% |
| <a name="LUITON_LT-580_VHF"></a> LUITON_LT-580_VHF | [@KC9HI](https://github.com/KC9HI) | 8-Dec-2022 | Yes | 0.01% |
| <a name="LUITON_LT-588UV"></a> LUITON_LT-588UV | [@KC9HI](https://github.com/KC9HI) | 11-Nov-2022 | Yes | 0.01% |
| <a name="LUITON_LT-725UV"></a> LUITON_LT-725UV | | | | 0.02% |
| <a name="LUITON_LT-725UV"></a> LUITON_LT-725UV | [@KC9HI](https://github.com/KC9HI) | 11-Dec-2022 | Yes | 0.02% |
| <a name="Lanchonlh_HG-UV98"></a> Lanchonlh_HG-UV98 | | | Yes | 0.00% |
| <a name="Leixen_VV-898"></a> Leixen_VV-898 | | | | 0.18% |
| <a name="Leixen_VV-898S"></a> Leixen_VV-898S | | | | 0.10% |
@ -360,9 +360,9 @@
**Drivers:** 355
**Tested:** 58% (209/146) (86% of usage stats)
**Tested:** 59% (210/145) (86% of usage stats)
**Byte clean:** 74% (266/89)
**Byte clean:** 75% (269/86)
## Minimal test prodecure
For the purposes of the Python 3 effort, a "tested" radio means

View File

@ -116,6 +116,7 @@ LUITON_LT-316,+Retevis_RT22,9-Dec-2022
LUITON_LT-580_UHF,@KC9HI,8-Dec-2022
LUITON_LT-580_VHF,@KC9HI,8-Dec-2022
LUITON_LT-588UV,@KC9HI,11-Nov-2022
LUITON_LT-725UV,@KC9HI,11-Dec-2022
MTC_UV-5R-3,+BTECH_UV-5X3,9-Dec-2022
Midland_DBR2500,+Retevis_RT95,13-Nov-2022
Polmar_DB-50M,+AnyTone_5888UV,9-Dec-2022