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

Tom Hayward
Sat Feb 9 18:33:36 PST 2013


On Sat, Feb 9, 2013 at 6:27 PM, Tom Hayward <esarfl at gmail.com> wrote:
> So it would be something like this (untested):
> #seekto 0x0B08;
> struct {
>   struct {
>     u8 code[5];
>     u8 unused[11];
>   } pttid[15];
> } pttid_set;

Oops, I over-complicated that. Try this:
struct {
  u8 code[5];
  u8 unused[11];
} pttid[15];

Now instead of calling pttid.code0, call pttid[0].code. Or:

for pttid in self._memobj.pttid:
    _code = pttid.code
    ... # create setting, etc

Tom



More information about the chirp_devel mailing list