Samuel Thibault, le Tue 23 Sep 2008 00:46:18 +0200, a écrit :
> Hello,
> 
> James Teh, le Mon 15 Sep 2008 09:21:47 +1000, a écrit :
> > * Even with this serial:com4 configuration, powering down the display 
> > causes problems. I see
> > Baum Powerdown: power switch
> > Subsequently, brltty starts chewing massive amounts of CPU.
> 
> I've had some issues with my irda serial port as well: brltty dies
> because it divides by brl.x which is 0 in that case.

I've investigated a bit more. What happens is that brltty gets garbage
from the irda port, which happens to look like a baum cell count packet.
The attached patch fixes the issue.

Now, about the CPU consumption, I've noticed something bad with my irda
port: awaitInput doesn't wait.  It may be that we are just missing and
end of file condition, I'll investigate more later.

Samuel
Index: BrailleDrivers/Baum/braille.c
===================================================================
--- BrailleDrivers/Baum/braille.c       (révision 3923)
+++ BrailleDrivers/Baum/braille.c       (copie de travail)
@@ -866,8 +875,13 @@
             return 1;
 
           case BAUM_RSP_CellCount: /* newer models */
-            cellCount = response.data.values.cellCount;
-            return 1;
+           if (response.data.values.cellCount) {
+             cellCount = response.data.values.cellCount;
+             return 1;
+           } else {
+             LogPrint(LOG_WARNING, "Unexpected null cell count");
+             continue;
+           }
 
           case BAUM_RSP_DeviceIdentity:
             logBaumDeviceIdentity(&response);
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://mielke.cc/mailman/listinfo/brltty

Reply via email to