[BRLTTY] USB support on Active Braille

Mario Lang mlang at delysid.org
Sun Jan 20 11:39:43 EST 2013


Mario Lang <mlang at delysid.org> writes:

> lars at lamasti.net (Lars Bjørndal) writes:
>
>> With recent svn versions of BRLTTY, there is something horrible wrong
>> with the USB support on Handy Tech Active Braille. The braille display
>> isn't updated unless you press a key on the display itself. So if brltty
>> is started and you type something at the command line prompt, the typed
>> text isn't on the display untill you press a key on the display.
>>
>> I have firmware version 2.1, which is an unofficial version.
>
> I can now confirm your problem description on a device with Firmware
> 2.5.

And here is the real fix, relative to subversion HEAD (r6834).

Lars: Thanks for reporting this issue.

--- a/Drivers/Braille/HandyTech/braille.c
+++ b/Drivers/Braille/HandyTech/braille.c
@@ -731,8 +731,10 @@ awaitUsbInput3 (int milliseconds) {
                                 0, 100);
 
       if (result == -1) return 0;
-      hidInputOffset = 0;
-      if (hidInputLength > 0) return 1;
+      if (result > 0 && hidInputLength > 0) {
+        hidInputOffset = 0;
+        return 1;
+      }
 
       if (afterTimePeriod(&period, NULL)) break;
       approximateDelay(10);
@@ -1527,18 +1529,6 @@ brl_readCommand (BrailleDisplay *brl, KeyTableCommandContext context) {
                 const unsigned char *bytes = &packet.fields.data.extended.data.bytes[0];
 
                 switch (packet.fields.data.extended.type) {
-                  case HT_EXTPKT_Confirmation:
-                    switch (bytes[0]) {
-                      case HT_PKT_NAK:
-                        updateRequired = 1;
-                      case HT_PKT_ACK:
-                        return EOF;
-
-                      default:
-                        break;
-                    }
-                    break;
-
                   case HT_EXTPKT_Key:
                     if (model->interpretByte(bytes[0])) {
                       updateCells(brl);

-- 
CYa,
  ⡍⠁⠗⠊⠕


More information about the BRLTTY mailing list