[chirp_devel] [UV-5R] Looking for Advice
Dan Smith
Sat Feb 23 20:10:51 PST 2013
> #seekto 0x0F08;
> struct {
> u8 foobar[5];
This is an array of integers
> if setting.value == True:
> obj.foobar = "\x00\x00\x00\x00\x00"
> else:
> obj.foobar = "\x0E\x0F\x10\x11\x15"
This is a string (array) of characters.
> ValueError: invalid literal for int() with base 10: '\x0e'
This is complaining that the characters in the string aren't valid
"int() with base 10" items. Either pass it the values as integers:
[0x0E, 0x0F, ...]
or change the type of foobar to:
char foobar[5]
and that should do it.
--
Dan Smith
www.danplanet.com
KK7DS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130223/c821c6ca/attachment-0001.bin
More information about the chirp_devel
mailing list