[BRLTTY] Using some of the text cells as status cells.

Mario Lang mlang at delysid.org
Tue Nov 11 05:34:17 EST 2008


Dave Mielke <dave at mielke.cc> writes:

> For displays which don't have their own status cells, it's now possible to
> use some of their text cells as status cells. See the new "Status
> Position" and "Status Count" items in the menu. This was a bit of a
> tricky update so I'll be awaiting reports of problems.

This is great, thanks a lot!
I am testing it right now and am noticing a few things:
 * It was unexpected that brltty implicitly adds a space between
   status cells on the left side and the text cells.  So when I configured
   8 status cells, I only got 79 text cells.
 * The "Status Count" option uses two adjacent routing keys for the same
   value, so pressing routing 0 or 1 gives "0", 2 or 3 gives "1" and
   so on.  It would be more logical if the routing key number
   would directly map to status cell count.
 * Switching status cell types seems to leave some of the old configured
   type active if the new type is shorter.  For instance, I just
   configured PB80 style status cells, which gives me just 1 cell
   and should give me 7 empty cells.  However what I see is
   the first cell used by the pb80 style, then 3 spaces and then 3 more
   cells occupied by dots which look like they came from my
   previous use of status cell type Generic followed by yet another space
   which seems to be the forced delimiter.

Attached is a patch to change the HandyTech Modular Evolution displays
to no longer announce artifical status cells, so that this new
configurable status cell feature works with those displays.

diff --git a/BrailleDrivers/HandyTech/braille.c b/BrailleDrivers/HandyTech/braille.c
index 6ed3dc2..1a5c29d 100644
--- a/BrailleDrivers/HandyTech/braille.c
+++ b/BrailleDrivers/HandyTech/braille.c
@@ -116,8 +116,8 @@ static const ModelEntry modelTable[] = {
   ,
   { .identifier = HT_Model_ModularEvolution64,
     .name = "Modular Evolution 64",
-    .textCells = 60,
-    .statusCells = 4,
+    .textCells = 64,
+    .statusCells = 0,
     .helpPage = 0,
     .interpretByte = interpretKeyByte,
     .interpretKeys = interpretBrailleStarKeys,
@@ -127,8 +127,8 @@ static const ModelEntry modelTable[] = {
   ,
   { .identifier = HT_Model_ModularEvolution88,
     .name = "Modular Evolution 88",
-    .textCells = 80,
-    .statusCells = 8,
+    .textCells = 88,
+    .statusCells = 0,
     .helpPage = 0,
     .interpretByte = interpretKeyByte,
     .interpretKeys = interpretBrailleStarKeys,
@@ -710,10 +710,9 @@ writeBookwormCells (BrailleDisplay *brl) {
 
 static int
 writeEvolutionCells (BrailleDisplay *brl) {
-  unsigned char buffer[model->textCells + model->statusCells];
+  unsigned char buffer[model->textCells];
 
   memcpy(buffer, rawData, model->textCells);
-  memcpy(buffer+model->textCells, rawStatus, model->statusCells);
 
   return writeExtendedPacket(brl, HT_EXTPKT_Braille, buffer, sizeof(buffer));
 }

-- 
CYa,
  ⡍⠁⠗⠊⠕ | Debian Developer <URL:http://debian.org/>
  .''`. | Get my public key via finger mlang/key at db.debian.org
 : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44
 `. `'
   `-      <URL:http://delysid.org/>  <URL:http://www.staff.tugraz.at/mlang/>


More information about the BRLTTY mailing list