[BRLTTY] [HT] The status cell problem...

Mario Lang mlang at delysid.org
Thu Nov 30 15:10:21 EST 2006


Hi.

On the Modular Evolution cursor routing keys are currently off by a certain
amount (the status cell count).

I propose to "fix" this problem by special-casing
models with continuous cells and putting the status cells on the right side
for now.  This at least fixes cursor routing (and cut-and-paste and all that).
I think we should make it behave like the FreedomScientific driver
in the continuous case, making status cell count and left/right configurable
as driver parameters.  What do you think?

BTW, what is the deal with the displayNumber BrlAPI thing?  Since the
Modular Evolution  is continuous, we could also make several section
sizes configurable via a driver option...

Index: BrailleDrivers/HandyTech/braille.c
===================================================================
--- BrailleDrivers/HandyTech/braille.c	(revision 2733)
+++ BrailleDrivers/HandyTech/braille.c	(working copy)
@@ -76,6 +76,7 @@
   unsigned char sessionEndLength;
 
   unsigned hasATC:1; /* Active Tactile Control */
+  unsigned continuous:1; /* No intervening space between status and text cells */
 } ModelEntry;
 
 #define HT_BYTE_SEQUENCE(name,bytes) .name##Address = bytes, .name##Length = sizeof(bytes)
@@ -114,6 +115,7 @@
     .name = "Modular Evolution 64",
     .textCells = 60,
     .statusCells = 4,
+    .continuous = 1,
     .helpPage = 0,
     .interpretByte = interpretKeyByte,
     .interpretKeys = interpretBrailleStarKeys,
@@ -126,6 +128,7 @@
     .name = "Modular Evolution 88",
     .textCells = 80,
     .statusCells = 8,
+    .continuous = 1,
     .helpPage = 0,
     .interpretByte = interpretKeyByte,
     .interpretKeys = interpretBrailleStarKeys,
@@ -673,12 +676,20 @@
     count += model->brailleBeginLength;
   }
 
-  memcpy(buffer+count, rawStatus, model->statusCells);
-  count += model->statusCells;
+  if (model->continuous) {
+    memcpy(buffer+count, rawData, model->textCells);
+    count += model->textCells;
 
-  memcpy(buffer+count, rawData, model->textCells);
-  count += model->textCells;
+    memcpy(buffer+count, rawStatus, model->statusCells);
+    count += model->statusCells;
+  } else {
+    memcpy(buffer+count, rawStatus, model->statusCells);
+    count += model->statusCells;
 
+    memcpy(buffer+count, rawData, model->textCells);
+    count += model->textCells;
+  }
+
   if (model->brailleEndLength) {
     memcpy(buffer+count, model->brailleEndAddress, model->brailleEndLength);
     count += model->brailleEndLength;

-- 
CYa,
  Mario


More information about the BRLTTY mailing list