|
From: <li...@mu...> - 2007-02-18 15:06:45
|
Christoph:
Thanks, this works for me! For readabilty's sake I would factor out the
code for the translation, e.g.
if ( pre != 0x8435 || ! TranslateCodeForPCDvdRemote( ... ) ) {
code = reverse( ... )
}
But this is up to you
BTW: Is there a standard document describing what I called the
"six byte protocol"? I would be create to mention this somewhere
because it explains why certain remotes do not work with this receiver.
For example I also own a "pinsys" compatible receiver/remote
which seems to be using a "three byte protocol".
Robert
Christoph Bartelmus wrote:
> Diese Nachricht enthaelt eine MIME-codierte Binaerdatei. Falls Ihr
> Mailer die Datei nicht decodieren kann, verwenden Sie dafuer bitte
> ein Tool wie 'munpack' oder 'udec'.
>
> This message contains a MIME encoded binary file. If your mailer
> cannot decode the file, please use a decoding tool like 'munpack'.
>
>
> ------------------------------------------------------------------------
>
> Hi!
>
> Christoph Bartelmus "li...@ba..." wrote:
>> "li...@mu..." wrote:
>>> daemons/hw_creative.c was coded to only work with the remote
>>> the hardware shipped with (PC-DVD Remote)
>>> The attached code fixes this and supports most modern remotes
>>> with a "six byte protocol".
>>> Unfortunately, the lirc.conf for "PC-DVD Remote" also had to
>>> be changed because of these fixes. A new working lirc.conf is
>>> attached.
>
>> How about the attached patch? The existing config file does no have to
>> be changed with this patch.
>
> Now attached.
>
> Christoph
>
>
> ------------------------------------------------------------------------
>
> Index: hw_creative.c
> ===================================================================
> RCS file: /cvsroot/lirc/lirc/daemons/hw_creative.c,v
> retrieving revision 5.7
> diff -u -u -r5.7 hw_creative.c
> --- hw_creative.c 10 Jul 2005 08:34:11 -0000 5.7
> +++ hw_creative.c 18 Feb 2007 03:46:49 -0000
> @@ -213,18 +213,21 @@
>
> /* pre=0x8435; */
> pre=reverse((((ir_code) b[4])<<8) | ((ir_code) b[5]),16);
> - for(i=0;mapping[i]!=0x00;i++)
> + if(pre == 0x8435)
> {
> - if(mapping[i]==b[3])
> + for(i=0;mapping[i]!=0x00;i++)
> {
> - code=(ir_code) (i<<8)|((~i)&0xff);
> - break;
> + if(mapping[i]==b[3])
> + {
> + code=(ir_code) (i<<8)|((~i)&0xff);
> + break;
> + }
> }
> }
> - if(mapping[i]==0x00)
> + if(pre != 0x8435 || mapping[i] == 0x00)
> {
> - logprintf(LOG_ERR,"unknown code");
> - return(NULL);
> + LOGPRINTF(1,"unmatched code");
> + code = reverse((((ir_code) b[2]) << 8)|((ir_code) b[3]), 16);
> }
>
> m=decode_all(remotes);
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
|