# HG changeset patch # User Jens Jensen # Date 1384612227 21600 # Sat Nov 16 08:30:27 2013 -0600 # Node ID 31ec6ca204638055bcf311846d2be33bb6b58522 # Parent 1c8ef954a71b6028c560e3203e8d5dc94809c4c5 [ft-90] fix upload timings, expose id and demomessage fields in memmap #1187 diff -r 1c8ef954a71b -r 31ec6ca20463 chirp/ft90.py --- a/chirp/ft90.py Wed Oct 30 08:22:46 2013 -0500 +++ b/chirp/ft90.py Sat Nov 16 08:30:27 2013 -0600 @@ -52,6 +52,7 @@ _block_lengths = [ 2, 232, 24 ] + ([200] * 18 ) + [205] mem_format = """ + u16 id; #seekto 0x22; struct { u8 dtmf_active; @@ -109,8 +110,6 @@ key_p2:4; u8 unk13:4, key_acc:4; - u8 demomsg1[32]; - u8 demomsg2[32]; } settings; @@ -167,6 +166,13 @@ struct mem_struct pms_1U; struct mem_struct pms_2L; struct mem_struct pms_2U; + + #seekto 0x0F7B; + struct { + char demomsg1[50]; + char demomsg2[50]; + } demomsg; + """ @classmethod def get_prompts(cls): @@ -256,7 +262,8 @@ return memmap.MemoryMap(data) def _clone_out(self): - delay = 0.2 + looppredelay = 0.2 + looppostdelay = 1.5 start = time.time() blocknum = 0 @@ -267,7 +274,6 @@ status.max = len(self._block_lengths) for blocksize in self._block_lengths: - time.sleep(0.1) checksum = yaesu_clone.YaesuChecksum(pos, pos+blocksize-1) blocknumbyte = chr(blocknum) payloadbytes = self.get_mmap()[pos:pos+blocksize] @@ -279,6 +285,7 @@ print util.hexprint(payloadbytes) print util.hexprint(checksumbyte) # send wrapped bytes + time.sleep(looppredelay) self.pipe.write(blocknumbyte) self.pipe.write(payloadbytes) self.pipe.write(checksumbyte) @@ -287,7 +294,7 @@ print "bytes echoed: " print util.hexprint(tmp) # radio is slow to write/ack: - time.sleep(1) + time.sleep(looppostdelay) buf = self.pipe.read(1) if CHIRP_DEBUG: print "ack recd:"