sbellon;554958 Wrote: > I don't understand. Where does this result in a problem? The only > problem may be that your original 32-bit value isn't correct to start > with. But if that's ok you can get at your bit values by > right-shifting > and ANDing with 1. I do not see a problem wrt. 32-bit there. What am I > missing? Sorry, I wasn't being clear. Yes, your bit-shift trick works for 32bit numbers whereas my current code only works up to 31 bits. However, I wanted to expand the code to cope with 48 or even 64 bit numbers as these could also potentially be found in lirc files. lua seems to be unable to convert string representations of, say, a 64bit number into a number so the algorithm is flawed from the start. However, sinse lirc files store the commands in hex, it should be relatively trivial to chop the hex string up into 4 character (16 bit) chunks, manipulate them (by bit-shifting) and join the results together again afterwards.
-- indifference_engine ------------------------------------------------------------------------ indifference_engine's Profile: http://forums.slimdevices.com/member.php?userid=20698 View this thread: http://forums.slimdevices.com/showthread.php?t=79524 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
