Re: [BRLTTY] More Stuff with Udev and Systemd

2016-09-17 Thread Dave Mielke
[quoted lines by Rob on 2016/09/17 at 19:54 -0500]

>> Please, if you can, get the actual message. I don't like trying to come up 
>> with 
>> an informed answer when it's based on a guess.
>
>Okay, I'll see if I can grab it. IT's hard to catch because it keeps flashing 
>every couple of seconds.

It should be in your system log (probably something like /var/log/messages).

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.org/
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] More Stuff with Udev and Systemd

2016-09-17 Thread Rob
Dave Mielke  wrote:
> Did you put brltty-wrapper in /lib/udev or in /usr/lib/udev on this second 
> system?
It went in
/lib/udev
It was an imaged disk that I unzipped into another partition.

> Please, if you can, get the actual message. I don't like trying to come up 
> with 
> an informed answer when it's based on a guess.

Okay, I'll see if I can grab it. IT's hard to catch because it keeps flashing 
every couple of seconds.
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] More Stuff with Udev and Systemd

2016-09-17 Thread Dave Mielke
[quoted lines by Rob on 2016/09/17 at 19:18 -0500]

>I transferred the system had built to another computer. This time the 
>90-brltty.rules and brltty-wrapper worked.

Did you put brltty-wrapper in /lib/udev or in /usr/lib/udev on this second 
system?

>But I saw some weird messages from the kernel. Every other second or so, it 
>said something like
>{ long_dmesg_number usb_fs interface claimed by USBHID while 'brltty' sets 
>config 1 }
>That isn't it exactly, but close. It said something about USB being claimed 
>while brltty set config 1.
>Any idea what that is all about?

Please, if you can, get the actual message. I don't like trying to come up with 
an informed answer when it's based on a guess.

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.org/
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


[BRLTTY] More Stuff with Udev and Systemd

2016-09-17 Thread Rob
I transferred the system  had built to another computer. This time the 
90-brltty.rules
and
brltty-wrapper
worked.
But I saw some weird messages from the kernel. Every other second or so, it 
said something like
{ long_dmesg_number usb_fs interface claimed by USBHID while 'brltty' sets 
config 1 }
That isn't it exactly, but close. It said something about USB being claimed 
while brltty set config 1.
Any idea what that is all about?
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] Adding a dot display to tt driver

2016-09-17 Thread Dave Mielke
[quoted lines by Christoph-Simon Senjak on 2016/09/18 at 00:57 +0200]

>It appears to work. 

Thanks for testing it.

>Will you add this patch to the git repo?

Done.

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.org/
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] Adding a dot display to tt driver

2016-09-17 Thread Christoph-Simon Senjak

Hi.

Thank you. It appears to work. Will you add this patch to the git repo?

Best Regards
Christoph-Simon Senjak

On 17.09.2016 23:21, Dave Mielke wrote:

[quoted lines by Christoph-Simon Senjak on 2016/09/17 at 21:54 +0200]


I wrote the following proof-of-concept patch for the driver. It just
adds an additional line with braille characters.


Thank you. I've reworked it some (attached as tty-braille-1.patch). Please
verify that I haven't broken it.

You'll notice that I moved the buffer outside of the loop. That's because it's
not guaranteed that a variable-size local buffer is deallocated at the end of
the block that declares it.


However, it would probably be better to make this configurable, and I am not
quite sure how the configuration system works.


I don't think there's a need to make it configurable. We can always add a
parameter for that should it ever be requested.



___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] Adding a dot display to tt driver

2016-09-17 Thread Dave Mielke
[quoted lines by Christoph-Simon Senjak on 2016/09/17 at 21:54 +0200]

>I wrote the following proof-of-concept patch for the driver. It just
>adds an additional line with braille characters. 

Thank you. I've reworked it some (attached as tty-braille-1.patch). Please 
verify that I haven't broken it.

You'll notice that I moved the buffer outside of the loop. That's because it's 
not guaranteed that a variable-size local buffer is deallocated at the end of 
the block that declares it.

>However, it would probably be better to make this configurable, and I am not 
>quite sure how the configuration system works.

I don't think there's a need to make it configurable. We can always add a 
parameter for that should it ever be requested.

-- 
Dave Mielke   | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: d...@mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.org/
diff --git a/Drivers/Braille/TTY/braille.c b/Drivers/Braille/TTY/braille.c
index f3da547..e496224 100644
--- a/Drivers/Braille/TTY/braille.c
+++ b/Drivers/Braille/TTY/braille.c
@@ -36,6 +36,7 @@ static iconv_t conversionDescriptor = NULL;
 #include "log.h"
 #include "parse.h"
 #include "charset.h"
+#include "unicode.h"
 #include "get_curses.h"
 
 #ifndef GOT_CURSES
@@ -289,11 +290,32 @@ brl_writeWindow (BrailleDisplay *brl, const wchar_t 
*text) {
 #endif /* GOT_CURSES */
 
   {
-int row;
-for (row=0; rowtextRows; row++) {
-  writeText(&text[row*brl->textColumns], brl->textColumns);
-  if (row < brl->textRows-1)
+wchar_t braille[brl->textColumns];
+
+for (unsigned int row=0; rowtextRows; row++) {
+  unsigned int offset = row * brl->textColumns;
+
+  for (unsigned int column=0; columntextColumns; column+=1) {
+unsigned char c = brl->buffer[offset + column];
+braille[column] = UNICODE_BRAILLE_ROW
+| (!!(c & BRL_DOT1) << 0)
+| (!!(c & BRL_DOT2) << 1)
+| (!!(c & BRL_DOT3) << 2)
+| (!!(c & BRL_DOT4) << 3)
+| (!!(c & BRL_DOT5) << 4)
+| (!!(c & BRL_DOT6) << 5)
+| (!!(c & BRL_DOT7) << 6)
+| (!!(c & BRL_DOT8) << 7)
+;
+  }
+
+  writeText(&text[offset], brl->textColumns);
+  addstr("\r\n");
+  writeText(braille, brl->textColumns);
+
+  if (row < (brl->textRows - 1)) {
 addstr("\r\n");
+  }
 }
   }
 
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty

Re: [BRLTTY] Adding a dot display to tt driver

2016-09-17 Thread Samuel Thibault
Hello,

Thanks!

Christoph-Simon Senjak, on Sat 17 Sep 2016 21:54:21 +0200, wrote:
>  int row;
>  for (row=0; rowtextRows; row++) {
>writeText(&text[row*brl->textColumns], brl->textColumns);
> +  addstr("\r\n");
> +
> +  wchar_t converted[brl->textColumns];
> +  int col;
> +  for (col = 0; col < brl->textColumns; ++col) {
> +   /* from the XW driver */
> +   unsigned char c = brl->buffer[col];

Here you need to add row*brl->textColumns to col, to get the proper line
from brl->buffer. Apart from that, the patch looks good.  An option could
be useful, but it shouldn't be too bad to always print it, on most
systems nowadays it will be fine.

> +   c =
> + (!!(c&BRL_DOT1))<<0
> + |(!!(c&BRL_DOT2))<<1
> + |(!!(c&BRL_DOT3))<<2
> + |(!!(c&BRL_DOT4))<<3
> + |(!!(c&BRL_DOT5))<<4
> + |(!!(c&BRL_DOT6))<<5
> + |(!!(c&BRL_DOT7))<<6
> + |(!!(c&BRL_DOT8))<<7;
> +   converted[col] = 0x2800 | c;
> +  }
> +  writeText(converted, brl->textColumns);
> +
> +  //  writeText(&text[row*brl->textColumns], brl->textColumns);
>if (row < brl->textRows-1)
>  addstr("\r\n");
>  }
> ___
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY@mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
> 

-- 
Samuel
 ça gaze ?
 prout
 -+- #ens-mim - ouvrez les fenêtres ! -+-
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


[BRLTTY] Adding a dot display to tt driver

2016-09-17 Thread Christoph-Simon Senjak

Hi.

I was wondering whether it was possible to add a dot display to the tt 
driver. I am aware of the XW driver, but it has more library 
dependencies, and in many distributions, you have to configure it to use 
an utf8-aware font. However, most terminal emulators have support for utf-8.


I wrote the following proof-of-concept patch for the driver. It just 
adds an additional line with braille characters. However, it would 
probably be better to make this configurable, and I am not quite sure 
how the configuration system works.


Regards, Christoph

diff --git a/Drivers/Braille/TTY/braille.c b/Drivers/Braille/TTY/braille.c
index cdb2242..dc8537e 100644
--- a/Drivers/Braille/TTY/braille.c
+++ b/Drivers/Braille/TTY/braille.c
@@ -282,6 +282,27 @@ brl_writeWindow (BrailleDisplay *brl, const wchar_t 
*text) {

 int row;
 for (row=0; rowtextRows; row++) {
   writeText(&text[row*brl->textColumns], brl->textColumns);
+  addstr("\r\n");
+
+  wchar_t converted[brl->textColumns];
+  int col;
+  for (col = 0; col < brl->textColumns; ++col) {
+   /* from the XW driver */
+   unsigned char c = brl->buffer[col];
+   c =
+ (!!(c&BRL_DOT1))<<0
+ |(!!(c&BRL_DOT2))<<1
+ |(!!(c&BRL_DOT3))<<2
+ |(!!(c&BRL_DOT4))<<3
+ |(!!(c&BRL_DOT5))<<4
+ |(!!(c&BRL_DOT6))<<5
+ |(!!(c&BRL_DOT7))<<6
+ |(!!(c&BRL_DOT8))<<7;
+   converted[col] = 0x2800 | c;
+  }
+  writeText(converted, brl->textColumns);
+
+  //  writeText(&text[row*brl->textColumns], brl->textColumns);
   if (row < brl->textRows-1)
 addstr("\r\n");
 }
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] Cannot build brltty with xw

2016-09-17 Thread Christoph-Simon Senjak

Hello.

I forgot to add pkgconfig to the shell. Thank you. Works now.

CSS

On 17.09.2016 17:00, Samuel Thibault wrote:

Hello,

Christoph-Simon Senjak, on Sat 17 Sep 2016 16:55:14 +0200, wrote:

I found 
http://brltty.mielke.narkive.com/QQX4ZLT3/testing-brltty-with-out-a-refreshable-display,
but libXaw is installed.


Do you have x11.pc? It seems it doesn't even try to look at libxaw
because it didn't find x11.pc

Samuel
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] Cannot build brltty with xw

2016-09-17 Thread Samuel Thibault
Samuel Thibault, on Sat 17 Sep 2016 17:00:31 +0200, wrote:
> Christoph-Simon Senjak, on Sat 17 Sep 2016 16:55:14 +0200, wrote:
> > I found 
> > http://brltty.mielke.narkive.com/QQX4ZLT3/testing-brltty-with-out-a-refreshable-display,
> > but libXaw is installed.
> 
> Do you have x11.pc? It seems it doesn't even try to look at libxaw
> because it didn't find x11.pc

You'll also need xt.pc

Samuel
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty


Re: [BRLTTY] Cannot build brltty with xw

2016-09-17 Thread Samuel Thibault
Hello,

Christoph-Simon Senjak, on Sat 17 Sep 2016 16:55:14 +0200, wrote:
> I found 
> http://brltty.mielke.narkive.com/QQX4ZLT3/testing-brltty-with-out-a-refreshable-display,
> but libXaw is installed.

Do you have x11.pc? It seems it doesn't even try to look at libxaw
because it didn't find x11.pc

Samuel
___
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty