[chirp_devel] [PATCH 1 of 2] bitwise: add get_raw() method to arrayDataElement. For #363
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1356758619 28800 # Node ID 56749d29e5506922a6a9e930f76438c74be6ed66 # Parent 37b042d567412f3abdceea513a39e13aef344caa bitwise: add get_raw() method to arrayDataElement. For #363
diff -r 37b042d56741 -r 56749d29e550 chirp/bitwise.py --- a/chirp/bitwise.py Fri Dec 28 07:58:20 2012 -0800 +++ b/chirp/bitwise.py Fri Dec 28 21:23:39 2012 -0800 @@ -174,6 +174,9 @@ def get_value(self): return list(self.__items)
+ def get_raw(self): + return "".join([item.get_raw() for item in self.__items]) + def __setitem__(self, index, val): self.__items[index].set_value(val)
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1356758964 28800 # Node ID 957f49b619ea3cbfbb64b0c62c53d33e3778d6fb # Parent 56749d29e5506922a6a9e930f76438c74be6ed66 [px777] fix no-tone identifier. Fixes #363
diff -r 56749d29e550 -r 957f49b619ea chirp/puxing.py --- a/chirp/puxing.py Fri Dec 28 21:23:39 2012 -0800 +++ b/chirp/puxing.py Fri Dec 28 21:29:24 2012 -0800 @@ -204,7 +204,7 @@ return True
def _is_no_tone(field): - return field[0].get_raw() == "\xFF" + return field.get_raw() in ["\x00\x00", "\xFF\xFF"]
def _get_dtcs(value): # Upper nibble 0x80 -> DCS, 0xC0 -> Inv. DCS
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1356758964 28800 # Node ID 957f49b619ea3cbfbb64b0c62c53d33e3778d6fb # Parent 56749d29e5506922a6a9e930f76438c74be6ed66 [px777] fix no-tone identifier. Fixes #363
Applied, thanks!
participants (2)
-
Dan Smith
-
Tom Hayward