> + rs = RadioSetting("test.vhfsquelch0", "VHF Squelch 0",Hmm, this introduces a lot of redundant code. What would you think
> + RadioSettingValueInteger(0,255,
> self._memobj.test.vhfsquelch0))
> + testmode.append(rs)
> +
about trying to make it a little more automatic?
for band in ["vhf", "uhf"]:
for index in range(0, 10):
key = "test.%ssquelch%i" % (band, index)
name = "%s Squelch %i" % (band.upper(), index)
rs = RadioSetting(key, name, RadioSettingInteger(0, 255,
getattr(self._memobj.test, "%ssquelch%i" % (band, index))
(Note that this is untested, just off the top of my head)
You could do this for squelch and power and save a bunch of lines of
copied code in this patch.
What do you think?