Skip to content

Commit

Permalink
Remove compat serial override from maintained drivers
Browse files Browse the repository at this point in the history
Almost all the drivers in the tree now opt out of the byte-compat
behavior. The default has been flipped, so we can remove that from
all those drivers and remove it from the PR template so people don't
have to think about it anymore.
  • Loading branch information
kk7ds committed Jun 16, 2024
1 parent 542c8dd commit 729d33b
Show file tree
Hide file tree
Showing 98 changed files with 1 addition and 105 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ The following must be true before PRs can be merged:
1. Commits in a single PR should be related. Squash intermediate commits into logical units (i.e. "fix tests" commits need not survive on their own). Keep cleanup commits separate from functional changes.
1. Major new features or bug fixes should reference a [CHIRP issue](https://chirpmyradio.com/projects/chirp/issues) _in the commit message_. Do this with the pattern `Fixes #1234` or `Related to #1234` so that the ticket system links the commit to the issue.
1. Please write a reasonable commit message, especially if making some change that isn't totally obvious (such as adding a new model, adding a feature, etc). The first line of every commit is emailed to the users' list after each build. It should be short, but meaningful for regular users (examples: "thd74: Fixed tone decoding" or "uv5r: Added settings support").
1. New drivers should be accompanied by a test image in `tests/images` (except for thin aliases where the driver is sufficiently tested already). All new drivers should set `NEEDS_COMPAT_SERIAL=False` and use `MemoryMapBytes`. New drivers and radio models will affect the Python3 test matrix. You should regenerate this file with `tox -emakesupported` and include it in your commit.
1. New drivers should be accompanied by a test image in `tests/images` (except for thin aliases where the driver is sufficiently tested already). All new drivers must use `MemoryMapBytes`. New drivers and radio models will affect the Python3 test matrix. You should regenerate this file with `tox -emakesupported` and include it in your commit.
1. All files must be GPLv3 licensed or contain no license verbiage. No additional restrictions can be placed on the usage (i.e. such as noncommercial).
1. Do not add new py2-compatibility code (No new uses of `six`, `future`, etc).
1 change: 0 additions & 1 deletion chirp/drivers/alinco.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class AlincoStyleRadio(chirp_common.CloneModeRadio):
"""Base class for all known Alinco radios"""
_memsize = 0
_model = b"NONE"
NEEDS_COMPAT_SERIAL = False

def _send(self, data):
LOG.debug("PC->R: (%2i)\n%s" % (len(data), util.hexprint(data)))
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/alinco_dr735t.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class AlincoDR735T(chirp_common.CloneModeRadio):
VENDOR = "Alinco"
MODEL = "DR735T"
BAUD_RATE = 38400
NEEDS_COMPAT_SERIAL = False

TONE_MODE_MAP = {
0x00: "",
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/anytone.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ class AnyTone5888UVRadio(chirp_common.CloneModeRadio,
MODEL = "5888UV"
BAUD_RATE = 9600
_file_ident = [b"QX588UV", b"588UVN"]
NEEDS_COMPAT_SERIAL = False

# May try to mirror the OEM behavior later
_ranges = [
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/anytone778uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ class AnyTone778UVBase(chirp_common.CloneModeRadio,
chirp_common.ExperimentalRadio):
'''AnyTone 778UV and probably Retevis RT95 and others'''
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False
NAME_LENGTH = 5
HAS_VOX = False

Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/anytone_ht.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ class AnyToneTERMN8RRadio(chirp_common.CloneModeRadio,
VENDOR = "AnyTone"
MODEL = "TERMN-8R"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False
_file_ident = b"TERMN8R"

# May try to mirror the OEM behavior later
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/anytone_iii.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ class AnyTone5888UVIIIRadio(chirp_common.CloneModeRadio,
VENDOR = "AnyTone"
MODEL = "5888UVIII"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False
_file_ident = b"588UVP"

_ranges = [
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/baofeng_uv17.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ class UV17(baofeng_uv17Pro.UV17Pro):
"""Baofeng UV-17"""
VENDOR = "Baofeng"
MODEL = "UV-17"
NEEDS_COMPAT_SERIAL = False

download_function = _download
upload_function = _upload
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/baofeng_uv17Pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ class UV17Pro(bfc.BaofengCommonHT):
"""Baofeng UV-17Pro"""
VENDOR = "Baofeng"
MODEL = "UV-17Pro"
NEEDS_COMPAT_SERIAL = False

MEM_STARTS = [0x0000, 0x9000, 0xA000, 0xD000]
MEM_SIZES = [0x8040, 0x0040, 0x02C0, 0x0040]
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/baofeng_uv3r.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ class UV3RRadio(chirp_common.CloneModeRadio):
"""Baofeng UV-3R"""
VENDOR = "Baofeng"
MODEL = "UV-3R"
NEEDS_COMPAT_SERIAL = False

def get_features(self):
rf = chirp_common.RadioFeatures()
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/baofeng_wp970i.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class WP970I(bfc.BaofengCommonHT):
"""Baofeng WP970I"""
VENDOR = "Baofeng"
MODEL = "WP970I"
NEEDS_COMPAT_SERIAL = False

_tri_band = False
_fileid = []
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/bf_t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ class BFT1(chirp_common.CloneModeRadio, chirp_common.ExperimentalRadio):
"""Baofeng BT-F1 radio & possibly alike radios"""
VENDOR = "Baofeng"
MODEL = "BF-T1"
NEEDS_COMPAT_SERIAL = False
_vhf_range = (130000000, 174000000)
_uhf_range = (400000000, 520000000)
_upper = 20
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/bf_t8.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ class BFT8Radio(chirp_common.CloneModeRadio):
VENDOR = "Baofeng"
MODEL = "BF-T8"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False
BLOCK_SIZE = BLOCK_SIZE_UP = 0x10
ODD_SPLIT = True
HAS_NAMES = False
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/bj9900.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class BJ9900Radio(chirp_common.CloneModeRadio,
MODEL = "BJ-9900"
VARIANT = ""
BAUD_RATE = 115200
NEEDS_COMPAT_SERIAL = False

DUPLEX = ["", "-", "+", "split"]
MODES = ["NFM", "FM"]
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/bjuv55.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@
class BaojieBJUV55Radio(uv5r.BaofengUV5R):
VENDOR = "Baojie"
MODEL = "BJ-UV55"
NEEDS_COMPAT_SERIAL = False
_basetype = [b"BJ55"]
_idents = [BJUV55_MODEL]
_mem_params = (0x1928 # poweron_msg offset
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/btech.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ class BTechMobileCommon(chirp_common.CloneModeRadio,
COLOR_LCD3 = False # Color HT Radios
COLOR_LCD4 = False # Waterproof Mobile Radios
NAME_LENGTH = 6
NEEDS_COMPAT_SERIAL = False
UPLOAD_MEM_SIZE = 0X3100
_power_levels = [chirp_common.PowerLevel("High", watts=25),
chirp_common.PowerLevel("Low", watts=10)]
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ft4.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ class YaesuSC35GenericRadio(chirp_common.CloneModeRadio,
MODEL = "SCU-35Generic" # No radio directly uses the base class
BAUD_RATE = 9600
MAX_MEM_SLOT = 200
NEEDS_COMPAT_SERIAL = False
DUPLEX_OFF_VIA_OFFSET = False

# These settings are common to all radios in this family.
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ft450d.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class FT450DRadio(yaesu_clone.YaesuCloneModeRadio):
COM_PRTY = 'N' # parity checking
COM_STOP = 1 # stop bits
MODEL = "FT-450D"
NEEDS_COMPAT_SERIAL = False

DUPLEX = ["", "-", "+"]
MODES = ["LSB", "USB", "CW", "AM", "FM", "DIG",
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ft7100.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ class FT7100Radio(YaesuCloneModeRadio):
VARIANT = ""
IDBLOCK = b"Vartex Standard AH003M M-Map V04"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False

# Return information about this radio's features, including
# how many memories it has, what bands it supports, etc
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ft7800.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ class FTx800Radio(yaesu_clone.YaesuCloneModeRadio):
BAUD_RATE = 9600
VENDOR = "Yaesu"
MODES = list(MODES)
NEEDS_COMPAT_SERIAL = False
_block_size = 64

POWER_LEVELS_VHF = [chirp_common.PowerLevel("Hi", watts=50),
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ft817.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class FT817Radio(yaesu_clone.YaesuCloneModeRadio):
"""Yaesu FT-817"""
BAUD_RATE = 9600
MODEL = "FT-817"
NEEDS_COMPAT_SERIAL = False
_model = ""
_US_model = False

Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ft90.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class FT90Radio(yaesu_clone.YaesuCloneModeRadio):
VENDOR = "Yaesu"
MODEL = "FT-90"
ID = b"\x8E\xF6"
NEEDS_COMPAT_SERIAL = False

_memsize = 4063
# block 03 (200 Bytes long) repeats 18 times; channel memories
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ftm350.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ class FTM350Radio(yaesu_clone.YaesuCloneModeRadio):
BAUD_RATE = 48000
VENDOR = "Yaesu"
MODEL = "FTM-350"
NEEDS_COMPAT_SERIAL = False

_model = ""
_memsize = 65536
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ga510.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ class RadioddityGA510Radio(chirp_common.CloneModeRadio):
VENDOR = 'Radioddity'
MODEL = 'GA-510'
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False
POWER_LEVELS = [
chirp_common.PowerLevel('H', watts=10),
chirp_common.PowerLevel('L', watts=1),
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/gmrsuv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class GMRSV1(bfc.BaofengCommonHT):
"""BTech GMRS-V1"""
VENDOR = "BTECH"
MODEL = "GMRS-V1"
NEEDS_COMPAT_SERIAL = False

_fileid = [GMRSV1_fp4, GMRSV1_fp3, GMRSV1_fp2, GMRSV1_fp1, ]
_is_orig = [GMRSV1_fp2, GMRSV1_fp1, GMRSV1_fp4, ]
Expand Down
2 changes: 0 additions & 2 deletions chirp/drivers/gmrsv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class GMRSV2base(bfc.BaofengCommonHT):
"""BTech GMRS-V2base"""
VENDOR = ""
MODEL = ""
NEEDS_COMPAT_SERIAL = False

_fw_ver_start = 0x1EF0
_recv_block_size = 0x40
Expand Down Expand Up @@ -1055,7 +1054,6 @@ class GMRSV2(GMRSV2base):
"""BTech GMRS-V2"""
VENDOR = "BTECH"
MODEL = "GMRS-V2"
NEEDS_COMPAT_SERIAL = False

_fileid = [GMRSV2_fp1, ]

Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/h777.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ class H777Radio(chirp_common.CloneModeRadio):
PROGRAM_CMD = b'PROGRAM'
IDENT = [b"P3107", ]
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False

# TODO: Is it 1 watt?
POWER_LEVELS = [chirp_common.PowerLevel("Low", watts=1.00),
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/hf90.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class HF90StyleRadio(chirp_common.CloneModeRadio,
MODES = ["LSB", "USB"]
DUPLEX = ["", "+", "-", "split", "off"]
BAUD_RATE = 4800
NEEDS_COMPAT_SERIAL = False

HF90_POWER_LEVELS = ["Low", "High"]

Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/hg_uv98.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ class LanchonlhHG_UV98(chirp_common.CloneModeRadio, chirp_common.ExperimentalRad
MODEL = "HG-UV98"
IDENT = b"P3107\0\0\0"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False

_upper = MAX_CHANNELS

Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/hobbypcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class HobbyPCBRSUV3Radio(chirp_common.LiveRadio):
VENDOR = "HobbyPCB"
MODEL = "RS-UV3"
BAUD_RATE = 19200
NEEDS_COMPAT_SERIAL = False

def __init__(self, *args, **kwargs):
super(HobbyPCBRSUV3Radio, self).__init__(*args, **kwargs)
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/ic9x.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def set_name(self, name):
class IC9xRadio(icf.IcomLiveRadio):
"""Base class for Icom IC-9x radios"""
MODEL = "IC-91/92AD"
NEEDS_COMPAT_SERIAL = False

_model = "ic9x" # Fake model info for detect.py
vfo = 0
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/icf.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ class IcomCloneModeRadio(chirp_common.CloneModeRadio):
"""Base class for Icom clone-mode radios"""
VENDOR = "Icom"
BAUDRATE = 9600
NEEDS_COMPAT_SERIAL = False
FORMATS = [directory.register_format('Icom ICF', '*.icf')]

_model = "\x00\x00\x00\x00" # 4-byte model string
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/icomciv.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ def __repr__(self):
class IcomCIVRadio(icf.IcomLiveRadio):
"""Base class for ICOM CIV-based radios"""
BAUD_RATE = 19200
NEEDS_COMPAT_SERIAL = False
MODEL = "CIV Radio"
# RTS is interpreted as "transmit now" on some interface boxes for these
WANTS_RTS = False
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/id5100.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
class ID4100Radio(icf.IcomCloneModeRadio, chirp_common.IcomDstarSupport):
VENDOR = 'Icom'
MODEL = 'ID-4100'
NEEDS_COMPAT_SERIAL = False

_model = b'\x38\x66\x00\x01'
_endframe = 'Icom Inc.8F'
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/iradio_uv_5118.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ class IradioUV5118(chirp_common.CloneModeRadio):
VENDOR = "Iradio"
MODEL = "UV-5118"
BAUD_RATE = 9600
NEEDS_COMPAT_SERIAL = False

BLOCK_SIZE = 0x10
magic = b"93" + b"\x05\x10\x81"
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/iradio_uv_5118plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ class IradioUV5118plus(chirp_common.CloneModeRadio):
MODEL = "UV-5118plus"
NAME_LENGTH = 10
BAUD_RATE = 115200
NEEDS_COMPAT_SERIAL = False

BLOCK_SIZE = 0x80
magic = b"58" + b"\x05\x10\x82"
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/kenwood_d7.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ def kenwood_d7_set_value(self):
class KenwoodD7Family(chirp_common.LiveRadio):
VENDOR = "Kenwood"
MODEL = ""
NEEDS_COMPAT_SERIAL = False
HARDWARE_FLOW = False

_ARG_DELIMITER = " "
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/kenwood_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ class KenwoodLiveRadio(chirp_common.LiveRadio):
BAUD_RATE = 9600
VENDOR = "Kenwood"
MODEL = ""
NEEDS_COMPAT_SERIAL = False
# Lots of Kenwood radios actually require RTS, even some of the ones with
# USB integrated
HARDWARE_FLOW = True
Expand Down
3 changes: 0 additions & 3 deletions chirp/drivers/kg935g.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ class KG935GRadio(chirp_common.CloneModeRadio,
POWER_LEVELS = [chirp_common.PowerLevel("L", watts=0.5),
chirp_common.PowerLevel("M", watts=4.5),
chirp_common.PowerLevel("H", watts=5.5)]
NEEDS_COMPAT_SERIAL = False
_record_start = 0x7C

def _checksum(self, data):
Expand Down Expand Up @@ -2193,7 +2192,6 @@ class KG935GPlusRadio(KG935GRadio):
"""Wouxun KG-935G Plus"""
VENDOR = "Wouxun"
MODEL = "KG-935G Plus"
NEEDS_COMPAT_SERIAL = False

def process_mmap(self):
self._memobj = bitwise.parse(_MEM_FORMAT_935GPLUS, self._mmap)
Expand All @@ -2205,7 +2203,6 @@ class KGUV8HRadio(KG935GRadio):
"""Wouxun KG-UV8H"""
VENDOR = "Wouxun"
MODEL = "KG-UV8H"
NEEDS_COMPAT_SERIAL = False

def process_mmap(self):
self._memobj = bitwise.parse(_MEM_FORMAT_UV8H, self._mmap)
1 change: 0 additions & 1 deletion chirp/drivers/kguv8d.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ class KGUV8DRadio(chirp_common.CloneModeRadio,
BAUD_RATE = 19200
POWER_LEVELS = [chirp_common.PowerLevel("L", watts=1),
chirp_common.PowerLevel("H", watts=5)]
NEEDS_COMPAT_SERIAL = False
_record_start = 0x7D

def _checksum(self, data):
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/kguv8dplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ class KGUV8DPlusRadio(chirp_common.CloneModeRadio,
BAUD_RATE = 19200
POWER_LEVELS = [chirp_common.PowerLevel("L", watts=1),
chirp_common.PowerLevel("H", watts=5)]
NEEDS_COMPAT_SERIAL = False
_mmap = ""
_record_start = 0x7A

Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/kguv8e.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ class KGUV8ERadio(chirp_common.CloneModeRadio,
POWER_LEVELS = [chirp_common.PowerLevel("L", watts=1),
chirp_common.PowerLevel("H", watts=5)]
_record_start = 0x7B
NEEDS_COMPAT_SERIAL = False

def _checksum(self, data):
cs = 0
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/kguv920pa.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@ class KGUV920PARadio(chirp_common.CloneModeRadio,
POWER_LEVELS = [chirp_common.PowerLevel("L", watts=5),
chirp_common.PowerLevel("M", watts=20),
chirp_common.PowerLevel("H", watts=50)]
NEEDS_COMPAT_SERIAL = False

def _write_record(self, cmd, payload=None):
_length = 0
Expand Down
1 change: 0 additions & 1 deletion chirp/drivers/kguv980p.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ class KG980PRadio(chirp_common.CloneModeRadio,
_model = b"KG-UV950R2"
_file_ident = b"980P"
BAUD_RATE = 19200
NEEDS_COMPAT_SERIAL = False
# Start Byte for Communication messages
_record_start = 0xDA
# _cs_size = 0x0F for 4-bit checksum, 0xFF for 8-Bit checksum
Expand Down
Loading

0 comments on commit 729d33b

Please sign in to comment.