[chirp_devel] [PATCH] [UV-5R] Remove "Special Block" Check
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1456094351 18000 # Node ID fa7d02b134986ae2368cf428d9c018cc25a1ec3a # Parent 56edd24fb2b2f3e30cfba61cb43cc75c35f9570f [UV-5R] Remove "Special Block" Check
This patch removes the "special block" check. It is no longer needed now that an upload will not be permitted unless the firmware version of the image and the firmware version of the radio exactly match.
Bug #3371
diff -r 56edd24fb2b2 -r fa7d02b13498 chirp/drivers/uv5r.py --- a/chirp/drivers/uv5r.py Sun Feb 21 16:56:54 2016 -0500 +++ b/chirp/drivers/uv5r.py Sun Feb 21 17:39:11 2016 -0500 @@ -395,17 +395,6 @@ return version
-def _special_block_from_data(data, special_block_start, special_block_stop): - special_block_tag = data[special_block_start:special_block_stop] - return special_block_tag - - -def _special_block_from_image(radio): - special_block = _special_block_from_data(radio.get_mmap(), 0x0CFA, 0x0D01) - LOG.debug("_special_block_from_image: " + util.hexprint(special_block)) - return special_block - - def _do_ident(radio, magic): serial = radio.pipe serial.timeout = 1 @@ -479,12 +468,6 @@ return version
-def _get_radio_special_block(radio): - block = _read_block(radio, 0xCF0, 0x40, False) - special_block = block[2:9] - return special_block - - def _ident_radio(radio): for magic in radio._idents: error = None @@ -554,15 +537,6 @@ "of the radio (%s).") raise errors.RadioError(msg % (image_version, radio_version))
- image_special_block = _special_block_from_image(radio) - radio_special_block = _get_radio_special_block(radio) - LOG.debug("Image Special Block is " + util.hexprint(image_special_block)) - LOG.debug("Radio Special Block is " + util.hexprint(radio_special_block)) - - if image_special_block != radio_special_block: - raise errors.RadioError("Image not supported by radio: `%s'" % - radio_special_block) - # Main block for i in range(0x08, 0x1808, 0x10): _send_block(radio, i - 0x08, radio.get_mmap()[i:i + 0x10])
participants (1)
-
Jim Unroe