[chirp_devel] [PATCH] [UV-5R] Add support for editing the 15 PTT ID Codes
Jim Unroe
Sun Feb 10 00:05:50 PST 2013
Tom,
Thanks. The thing that scares me is that I think I understand what you are
suggesting here.
After sleeping on it (and I mean it literally, it's just before 3am),
here's what concerns me about this vs. what I submitted.
My first try was all of the settings were inside a singe try: except
Exception:
During my testing, if any code was not 5 digits, then all codes were all
rejected. Splitting it out like I did, only the less than 5 digit codes
were missing.
So I think some of this discussion needs to be how to eliminate the CHIRP
requirement for each code to be 5 digits since the OEM software and UV-5R
accept any number of digits including no digits.
Jim
On Sat, Feb 9, 2013 at 9:33 PM, Tom Hayward <esarfl at gmail.com> wrote:
> 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
> _______________________________________________
> chirp_devel mailing list
> chirp_devel at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
> Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130210/5c9de7c3/attachment-0001.html
More information about the chirp_devel
mailing list