On Sat, Feb 23, 2013 at 7:03 PM, Dan Smith
<dsmith@danplanet.com> wrote:
> I want to create a selection for the UV-5R that depending the the
> users' selection (either tick like Boolean, or a two choice list),
> one or the other of the following is written.
>
> "\x0E\x0F\x10\x11\x15"
> "\x00\x00\x00\x00\x00"
You mean a RadioSetting? Maybe something like this untested snipped:
def apply_foobar(setting, obj):
if setting.value == True:
obj.foobar = "\x0E\x0F\x10\x11\x15"
else:
obj.foobar = "\x00\x00\x00\x00\x00"
rs = RadioSetting("foobar", "Enable Foobar", RadioSettingBoolean(False))
rs.set_apply_callback(apply_foobar, self._memobj)
Thanks Dan. That is what I am looking for. I don't have it working yet, though.