[tuxdroid-svn] r737 - firmware/tuxcore/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-11-27 15:26:13
|
Author: jaguarondi Date: 2007-11-27 16:26:14 +0100 (Tue, 27 Nov 2007) New Revision: 737 Modified: firmware/tuxcore/trunk/ir.c Log: * Now sending the ir status 2 times. Without that, you sometimes have a status series without the IR code sent though the remote button is pushed. This produced some discontinuity when receiving the IR codes at the daemon side. This also helps detecting more reliably when the remote button is released (timeout without any IR signal). Modified: firmware/tuxcore/trunk/ir.c =================================================================== --- firmware/tuxcore/trunk/ir.c 2007-11-27 15:19:02 UTC (rev 736) +++ firmware/tuxcore/trunk/ir.c 2007-11-27 15:26:14 UTC (rev 737) @@ -139,7 +139,8 @@ irReceivedCode |= (0x0001 << irRC5SendData.bit); if (irRC5SendData.bit == 0) /* End of reception */ { - ir_f = 1; /* set to send ir status next time TODO add a check so that this flag is set only when the data received is different from the previous one */ + /* We'll send the IR code 2 times to the computer. */ + ir_f = 2; irStatus |= IRSTATUS_END; irStatus &= ~IRSTATUS_RECEIVING; irPulses = SILENCE_PULSES; /* If in end mode, reset timer to wait for silence before receiving next data */ |