Yeah thats where I was going with in regards to the way uv5r is setup.
In order to make it more generalized, and handle lots of slightly different edge cases, we could split the memory map up into a few sections.

I'll have to look at it some more, and also what you are talking about type-wise…



From: Dan Smith <dsmith@danplanet.com>
To: chirp_devel@intrepid.danplanet.com
Sent: Wednesday, February 5, 2014 7:45 PM
Subject: Re: [chirp_devel] Baofeng UV-6 Radio

> Dan,
> this reminds me - is there a way to "incrementally" load the bitwise
> structures into the memory map. The thought here was we could have a
> "common" channel map, and then might have custom settings, or event
> sections of settings depending upon model, and load the ones needed into
> the radio class.
> (This could be thought of as a piecemeal approach to populating the
> memory map?)

They're just strings, so you can format them, concatenate pieces
together, than then pass the result to bitwise to do the magic. There is
at least one other case where I format in the address of a starting
block depending on which model I'm using. I think that is actually no
longer necessary in that case, now that structs can be defined as types
and applied in multiple places (a relatively recent bitwise feature).
However, for your case where you want to piece things together, I think
it should be pretty easy to do, right?


--Dan