[chirp_devel] Introduction
Dan Smith
dsmith at danplanet.com
Thu Feb 29 14:52:45 PST 2024
> (Incidentally, is it CHIRP or Chirp or chirp? I've seen all three
> used. What is the proper way to refer to the product?)
It's CHIRP. That said, I'm probably the least consistent person in my proper use of the "trademark" so I don't think you're likely to run into problems.
> I'm wondering if any of you have any recommendations for a good
> tutorial, available on the net, for someone like me who wants to learn
> enough Python to be effective in writing drivers for CHIRP. I know
> there are many such tutorials out there and wanted to find out if you
> have any recommendations for one over the others.
Some of the people who have learned Python recently can probably help with this. I could send you the stack of dead trees I started with 20 years ago, but it's not likely much help anymore :)
> I'd appreciate any suggestions, and meanwhile I'll be around the
> reflector as I go about figuring out how to do this correctly.
I think you'll just have to bump around it a bit to get a feel. I'm assuming you've got a development environment setup so you can run from code.
I think the first thing I'd do is just copy/paste the IC746 driver class (in chirp/drivers/icomciv.py) to an IC746Pro driver. Change the MODEL and the default address and then make sure that you can fail in the same way when selecting that as you can with the regular 746.
After that, you'll need to define a MemFrame subclass that works for the 746Pro and tell your class to use it. If you look at the other models in there it should be fairly straightforward. Martin might have an opinion here, but I think the 910 is a very similar vintage to the 746/746Pro, so that might help. Ignore all the "special" and "bank" stuff for now.
For your MemFrame class, you'll need to define a "format" that is the right number of bytes for the frame that gets returned and with at least the basic fields required by the base "get_memory()" definition. That would be things like "freq", "mode", etc. I think most everything else is optional, so any chunks of the frame you don't know about, just pad out with "u8 unknown[n]" fields to keep the structure the same.
With that, just keep banging at the radio until the errors stop and you start getting non-error memories that look halfway sane in the UI and iterate from there.
--Dan
More information about the chirp_devel
mailing list