mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 18:47:18 +00:00
Fixes and testing: Abree AR-518 & update Python3 Driver Testing Matrix
This commit is contained in:
parent
ef440082b1
commit
2c3d7adae1
@ -136,7 +136,7 @@ struct {
|
||||
|
||||
"""
|
||||
|
||||
CMD_ACK = "\x06"
|
||||
CMD_ACK = b"\x06"
|
||||
|
||||
RB15_DTCS = sorted(chirp_common.DTCS_CODES + [645])
|
||||
|
||||
@ -161,7 +161,7 @@ TXALLOW_VALUES = [0xFF, 0x00]
|
||||
def _checksum(data):
|
||||
cs = 0
|
||||
for byte in data:
|
||||
cs += ord(byte)
|
||||
cs += byte
|
||||
return cs % 256
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ def _enter_programming_mode(radio):
|
||||
def _exit_programming_mode(radio):
|
||||
serial = radio.pipe
|
||||
try:
|
||||
serial.write("93" + "\x05\xEE\x5F")
|
||||
serial.write(b"93" + b"\x05\xEE\x5F")
|
||||
except:
|
||||
raise errors.RadioError("Radio refused to exit programming mode")
|
||||
|
||||
@ -205,13 +205,13 @@ def _exit_programming_mode(radio):
|
||||
def _read_block(radio, block_addr, block_size):
|
||||
serial = radio.pipe
|
||||
|
||||
cmd = struct.pack(">BH", ord('R'), block_addr + 0x0340)
|
||||
cmd = struct.pack(">BH", ord(b'R'), block_addr + 0x0340)
|
||||
|
||||
ccs = _checksum(cmd)
|
||||
ccs = bytes([_checksum(cmd)])
|
||||
|
||||
expectedresponse = "R" + cmd[1:]
|
||||
expectedresponse = b"R" + cmd[1:]
|
||||
|
||||
cmd = cmd + chr(ccs)
|
||||
cmd = cmd + ccs
|
||||
|
||||
LOG.debug("Reading block %04x..." % (block_addr + 0x0340))
|
||||
|
||||
@ -227,7 +227,7 @@ def _read_block(radio, block_addr, block_size):
|
||||
|
||||
chunk = response[3:]
|
||||
|
||||
if ord(chunk[-1]) != cs:
|
||||
if chunk[-1] != cs:
|
||||
raise Exception("Block failed checksum!")
|
||||
|
||||
block_data = chunk[:-1]
|
||||
@ -243,10 +243,10 @@ def _write_block(radio, block_addr, block_size):
|
||||
|
||||
data = radio.get_mmap()[block_addr:block_addr + block_size]
|
||||
|
||||
cmd = struct.pack(">BH", ord('W'), block_addr + 0x0340)
|
||||
cmd = struct.pack(">BH", ord(b'W'), block_addr + 0x0340)
|
||||
|
||||
cs = _checksum(cmd + data)
|
||||
data += chr(cs)
|
||||
cs = bytes([_checksum(cmd + data)])
|
||||
data += cs
|
||||
|
||||
LOG.debug("Writing Data:")
|
||||
LOG.debug(util.hexprint(cmd + data))
|
||||
@ -264,7 +264,7 @@ def do_download(radio):
|
||||
LOG.debug("download")
|
||||
_enter_programming_mode(radio)
|
||||
|
||||
data = ""
|
||||
data = b""
|
||||
|
||||
status = chirp_common.Status()
|
||||
status.msg = "Cloning from radio"
|
||||
@ -284,7 +284,7 @@ def do_download(radio):
|
||||
|
||||
_exit_programming_mode(radio)
|
||||
|
||||
return memmap.MemoryMap(data)
|
||||
return memmap.MemoryMapBytes(data)
|
||||
|
||||
|
||||
def do_upload(radio):
|
||||
@ -325,9 +325,10 @@ class IradioUV5118(chirp_common.CloneModeRadio):
|
||||
VENDOR = "Iradio"
|
||||
MODEL = "UV-5118"
|
||||
BAUD_RATE = 9600
|
||||
NEEDS_COMPAT_SERIAL = False
|
||||
|
||||
BLOCK_SIZE = 0x10
|
||||
magic = "93" + "\x05\x10\x81"
|
||||
magic = b"93" + b"\x05\x10\x81"
|
||||
|
||||
VALID_BANDS = [(20000000, 64000000), # RX only
|
||||
(108000000, 136000000), # RX only (Air Band)
|
||||
|
@ -2,7 +2,7 @@
|
||||
| Driver | Tester | Tested | Byte Clean | "Market Share" |
|
||||
| ------ | ------ | ------ | ---------- | -------------- |
|
||||
| <a name="ARRL_Travel_Plus"></a> ARRL_Travel_Plus | | | | 0.00% |
|
||||
| <a name="Abbree_AR-518"></a> Abbree_AR-518 | | | | 0.24% |
|
||||
| <a name="Abbree_AR-518"></a> Abbree_AR-518 | [@KC9HI](https://github.com/KC9HI) | 16-Dec-2022 | Yes | 0.24% |
|
||||
| <a name="Abbree_AR-63"></a> Abbree_AR-63 | [@KC9HI](https://github.com/KC9HI) | 30-Nov-2022 | Yes | 0.03% |
|
||||
| <a name="Alinco_DJ-G7EG"></a> Alinco_DJ-G7EG | [@HB9UF](https://github.com/HB9UF) | 09-Dec-2022 | Yes | 0.44% |
|
||||
| <a name="Alinco_DJ175"></a> Alinco_DJ175 | [Implied by Alinco_DR235T](#user-content-Alinco_DR235T) | 12-Dec-2022 | Yes | 0.03% |
|
||||
@ -360,9 +360,9 @@
|
||||
|
||||
**Drivers:** 355
|
||||
|
||||
**Tested:** 70% (250/105) (88% of usage stats)
|
||||
**Tested:** 70% (251/104) (88% of usage stats)
|
||||
|
||||
**Byte clean:** 80% (285/70)
|
||||
**Byte clean:** 80% (286/69)
|
||||
|
||||
## Meaning of this testing
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
# clone routines are shared in common with other things that are tested, use
|
||||
# *MODULE_NAME to mark it as "probably works because of common code in
|
||||
# $module"
|
||||
Abbree_AR-518,@KC9HI,16-Dec-2022
|
||||
Abbree_AR-63,@KC9HI,30-Nov-2022
|
||||
Alinco_DJ175,+Alinco_DR235T,12-Dec-2022
|
||||
Alinco_DJ596,+Alinco_DR235T,12-Dec-2022
|
||||
|
Loading…
Reference in New Issue
Block a user