[chirp_devel] [PATCH] [UV-5R] Add support for editing the 15 PTT ID Codes

Tom Hayward
Sat Feb 9 18:27:51 PST 2013


On Sat, Feb 9, 2013 at 5:34 PM, Jim Unroe <rock.unroe at gmail.com> wrote:
> Get me started in the right direction. Do you know of somewhere I can see an
> example?

Like this:
http://chirp.danplanet.com/projects/chirp/repository/entry/chirp/vx5.py#L26

So it would be something like this (untested):
#seekto 0x0B08;
struct {
  struct {
    u8 code[5];
    u8 unused[11];
  } pttid[15];
} pttid_set;

It's just like what you've done already, but nested to avoid pasting.
Then down below you can add each setting inside a loop, again avoiding
copy/pasting. Usually if you're copy/pasting code you're doing
something wrong and there's an easier way (writing a loop, creating a
function, etc.)

Tom



More information about the chirp_devel mailing list