[chirp_devel] [PATCH 1 of 2] [thd72] Fix initialization of skip byte in clone mode driver. #697
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1363305286 25200 # Node ID b977e6df643c89d953aad86223eeaf05dc81288f # Parent e98eab02522373bbb35cae6f7f56c73792c323af [thd72] Fix initialization of skip byte in clone mode driver. #697
Paul Cummings programmed his TH-D72 with Chirp's clone mode driver and now his radio will not scan past channel 136. When recalled on the radio, the lockout value for memory 137+ is corrupt.
The memory Chanel 137 is corrupt somehow. The lockout option shows random characters instead of a "on &off" option.
Upon examination of his img file, unknown1 was 0xFE for channels greater than 136. On my non-corrupt radio, unknown1 is always 0x00. Based on the "random characters", it appears the D72 reads the full byte (unknown1 + skip) to evaluate lockout. This patch modified Chirp to read the full byte.
diff -r e98eab025223 -r b977e6df643c chirp/thd72.py --- a/chirp/thd72.py Wed Mar 13 09:02:10 2013 -0700 +++ b/chirp/thd72.py Thu Mar 14 16:54:46 2013 -0700 @@ -66,8 +66,7 @@ struct { u8 disabled:7, unknown0:1; - u8 unknown1:7, - skip:1; + u8 skip; } flag[1032];
#seekto 0x1500;
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1363305357 25200 # Node ID 90e7d476244bb3bee563effe11d77a814d1f8902 # Parent b977e6df643c89d953aad86223eeaf05dc81288f [thd72] Add get_raw_memory() method for TH-D72 clone mode driver. #697
diff -r b977e6df643c -r 90e7d476244b chirp/thd72.py --- a/chirp/thd72.py Thu Mar 14 16:54:46 2013 -0700 +++ b/chirp/thd72.py Thu Mar 14 16:55:57 2013 -0700 @@ -243,6 +243,10 @@ self._memobj.wx_name[number].name = name[:8] self.add_dirty_block(self._memobj.wx_name[number])
+ def get_raw_memory(self, number): + return repr(self._memobj.memory[number]) + \ + repr(self._memobj.flag[(number)]) + def get_memory(self, number): if isinstance(number, str): try:
participants (1)
-
Tom Hayward