From: Laurence D. <ld...@tu...> - 2007-01-25 00:40:44
|
Tom Horsley wrote: > Lots of folks (including me) have no problem getting their remotes > to show nice output from mode2 with unique strings of pulses > of various lengths identifying button presses. For me, that was the most difficult and satisfying part of setting up lirc. Once the data link is there, everything else follows. > Yet the config file wants much more arcane information that > imposes some sort of "protocol" on the data. Do you have any better way of making the computer know that 0x0000000000001029 from my remote is the PAUSE button? Or, for another random remote, it might be PLAY? Or, the PAUSE button for a 3rd remote sends 0x0000000000000027 ? > Getting from the > one to the other seems to involve much cryptic mysticism :-). > No, it doesn't. Nobody is asking you to manually convert a stream of bits into hex codes, then decode what button it corresponds to. That's what irrecord is for. > Is there any reason not to drive button recognition directly > off the sort of data that mode2 prints? > Huh? That's what lirc.conf is for. > The different pulses could easily map to an "alphabet", and the > buttons to strings in that alphabet. What, like button names in the English alphabet? > Recognizing fixed constant > strings in a stream of data is something computers are pretty good > at - there are well known string matching algorithms which are > quite efficient. > Try to guess what lircd does with lirc.conf. If you've got a specific problem you think could be fixed, say it instead of vague philosophing which invites sarcastic answers. Laurence |