[chirp_devel] Could use a few hints on tyt - th_9800
jml
Sun Dec 14 11:30:41 PST 2014
Hi,
Sorry in advance this will be a long email.
With a little advice from Tom Haward I have gotten started on adding the closing support to the tyt-th9800. First some status and background, then a bunch of questions.
Status:
First I do have a tyt9800 and the oem pc (windows xp) software and cable working. I did use portmon and figure out what the radio protocol was.
I do have the hex dump of my files from the oem software and compared them to what I see in the transfer.
I have managed to mangle th9800.py to get it to download (on my mac) my radio and hex dump to stdout.
I have identified some of the memory blocks and bits that Tom did not yet tag in his cut at reading the .dat file.
Background:
Its been around 5 years since I did python so I’m a bit rusty, and generally more familiar with C, Perl and TCL (and of course Verilog)
Being that I hate windows 7 and 8 I decided to go Mac. I find the mac easy since I treat it like linux. I have the mac setup for python with he proper packages to run the script form of chip. (I also have a linux server at my disposal but I am using it for file storage and utilities not Chirp development).
I am familiar with hg for versioning and have cloned the repository to my mac and even done a pull and update.
Now for the first of what may be myriad of questions:
1) The channel memory format in the download vs the file are identical, however, the offset is different. So I wanted to re-use the struct that Tom defined and just define a new TH9800_MEM_FORMAT and rename his to TH9800_FILE_FORMAT. I wanted to share the struct but could not figure out how to do that.
2) Tom Registered as chirp_common.FileBackedRadio, so when I tried to register as chirp_common.CloneModeRaio I got an error so I just added a x to the name of the radio to debug. Obviously I want to share much of his code so I need to better understand how to merge the file IO stuff with with clone stuff.
3) Other than the template.py is there a cook book or tutorial on how it add things to chirp and how the framework of chirp is preferred to use. eventually I am going to know how to handle the busy lock out on some channels and I want to figure out how to program the 6 shortcut buttons on the face that are in the stat but not supported by the oem software.
4) When I have used HG in the past I would locally “hg commit” then “hg push”. I am a bit new to how open source software is managed so if I have something worth sharing what is the proper avenue.
5) I have not yet gotten Toms functions to display the radio data after I have downloaded, but the hex dump to stout is good so I will continue to work on that while I wait for a response, but I think that his functions are in the class TYTTH9800File while the rest of my code is in class TYTTH9800Radio so I will the importing the functions but I think there needs to be some better solution here. Sugegstions?
Please feel free to point me to additional reading and if someone who is more fluent at python can can take a swag and merging my upload/download with toms code better than I did, I would welcome the help.
James N1DDK.
More information about the chirp_devel
mailing list