[chirp_devel] [PATCH] [UV-82] patch to recognize and allow new UV-82 firmware version
Jim Unroe
Sat Aug 17 12:32:56 PDT 2013
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1376767504 14400
# Node ID 6216b9e3cf20e8047be95afb517485c44504cdcf
# Parent 694317870830b14ed563de115c36c82c4fb7c6fd
[UV-82] patch to recognize and allow new UV-82 firmware version
BF8210 (original UV-82 firmware version)
B82S21 (new firmware version)
#1073
diff -r 694317870830 -r 6216b9e3cf20 chirp/uv5r.py
--- a/chirp/uv5r.py Tue Jul 30 17:59:18 2013 -0400
+++ b/chirp/uv5r.py Sat Aug 17 15:25:04 2013 -0400
@@ -423,7 +423,7 @@
print "Image is %s" % repr(image_version)
print "Radio is %s" % repr(radio_version)
- if "BFB" not in radio_version and "BF82" not in radio_version and "USA" not in radio_version:
+ if "BFB" not in radio_version and "82" not in radio_version and "USA" not in radio_version:
raise errors.RadioError("Unsupported firmware version: `%s'" %
radio_version)
@@ -728,6 +728,8 @@
return version < 291
if 'BF82' in version_tag:
return False
+ if 'B82' in version_tag:
+ return False
if 'USA' in version_tag:
return False
except:
@@ -740,9 +742,12 @@
if 'BFB' in version_tag:
idx = version_tag.index("BFB") + 3
return int(version_tag[idx:idx+3])
- elif 'BF' in version_tag:
- idx = version_tag.index("BF") + 2
+ elif 'BF82' in version_tag:
+ idx = version_tag.index("BF82") + 2
return int(version_tag[idx:idx+4])
+ elif 'B82S' in version_tag:
+ idx = version_tag.index("B82S") + 4
+ return int(version_tag[idx:idx+2]) + 8200
elif 'USA' in version_tag:
idx = version_tag.index("USA") + 3
return int(version_tag[idx:idx+3])
@@ -1246,5 +1251,5 @@
@directory.register
class BaofengUV82Radio(BaofengUV5R):
MODEL = "UV-82"
- _basetype = "BF82"
+ _basetype = "82"
_idents = [UV82_MODEL]
More information about the chirp_devel
mailing list