[BRLTTY] brl_identify()

timothyhobbs at seznam.cz timothyhobbs at seznam.cz
Sat Feb 25 06:21:35 EST 2012


itoa is a function that is supposed to put an int into a char array.  It turns out I can use snprintf instead...  I was more concerned with the fact that it wasn't giving me the kind of errors that I expected during compile time.  I've never written a dynamically loaded library before and indeed the last time I wrote in C was 8 years ago when I was 12 years old...

Pedagogy = education.  Don't worry, I didn't know that word either before I started studying it.  I don't think it's used on the Americas side of the pond at all...

To answer your question in your previous e-mail about the cursor.  The cursor driver writes directly to serial, the brltty driver does not need to interact with it in any way.  I did this, because I want it to be seamless whether the cursor device is connected directly to the FCHAD or to the computer...  Yes, I could make it so you could move the cursor with one finger while resting the same hand on the braille character.  Or, I could even make it so that you would move the whole FCHAD around like a normal mouse(that was the original idea).  There is the issue of ergonomics however.  My research will study the different methods and see what is really most natural :)  My first step is to get this working with my tablet, that allows physical location to relate to characters.  I believe that the most natural way to do this is to use a capacitive strip which is topologically marked with bumps that relate to characters.  Technique of the hand that would move along the strip would be exactly the same as with a normal peizo display.  But MUCH MUCH cheaper(my prototype cost me about 1500CZK which comes to $80 USD to build)(If I just use LED's glued into sun glasses[for people who can still see the direction that light is coming from] then the prototype price is only 1100CZK or $60[the arduino costs 650CZK or $35 and the other electronics less than 250CZK, the rest being the sunglasses and the LEDs :)])  I think a finished product with 8 high quallity solenoids for 8 dot braille and a capacitative strip will cost about $150 and will be both open source and easily built in a garage.  That's kind of the point of the project.  If it can be built in a garage, and is open source, than you can get it set up, how you want it, and not based off of the random design decisions that I make...

The cursor will send keystrokes to BRLTTY.  Specifically, it sends 3 types:
Braille cell pressed(plus the cursor position)
Next line,
previous line.

Now for my questions...

Do I understand correctly that brl->buffer is in the format of the braille byte?  AKA  Dot's 1-8 correspond to bits 0-7 in the format:
03
14
25
67

Is it possible to tell brltty to give me 6 dot braille? Or if I want to do 6 dots do I have to do the conversion my self?  I don't know if I mentioned earlier, but my current device is 6 dots, and 8 dots is too many(I only have 5 fingers on each hand.)  So supporting 6 dots isn't even just a intermediate step, it's a long term goal...

In terms of serial IO.  I'm not sure why I should use io_generic.h I'm sending streams of bytes through USB serial to the device.  For now, I'm testing my driver using printf and gets...  I then need to convert these functions to io_generic.h functions.  For that I may need your help.  I do not know at all how io_generic is supposed to work...  

static void Serial_print(char * line)
{
    printf(line);
}

static void Serial_println(char * line)
{
    Serial_print(line);
    Serial_print("\n");
}

static void Serial_read()
{
    //Read one byte from serial.
}

static void Serial_write()
{
    //Write one byte to serial.
}

static void Serial_nextLine(char * buffer)
{
    gets(buffer);
}

//Plus an initializer which in python looks like
//serial = Serial(sys.argv[1], 9600, timeout=1)
//with sys.argv[1] being /dev/ttyUSB0 or some path like that.

Thank you very much,
Timothy

> ------------ Původní zpráva ------------
> Od: Dave Mielke <dave at mielke.cc>
> Předmět: Re: [BRLTTY] brl_identify()
> Datum: 25.2.2012 03:22:24
> ----------------------------------------
> [quoted lines by timothyhobbs at seznam.cz on 2012/02/24 at 23:27 +0100]
> 
> >Currently the file which I linked to builds fine but brltty spits out: brltty:
> 
> >/home/timothy/works/current/braille/braille-mouse/brltty-driver/brltty-4.3-dev/src/brltty-4.3/Programs/../lib/libbrlttybfc.so:
> 
> >undefined symbol: itoa
> 
> What's itoa? I don't have a man page for it.
> 
> >Is it possible to make it NOT build fine, and make it give me these kinds of 
> >errors when I do $ make ? Like by passing an argument to ./configure ... 
> 
> I just tested this. The error isn't reported by the linker when building a 
> shared object. It's only reported at run-time when the shared object can't 
> resolve the external reference.
> 
> >Sorry if I'm asking silly questions. 
> 
> On this list it's illegal to believe that a silly question is being asked 
> (either by oneself or by another). All questions are good ones which deserve 
> good answers.
> 
> >I'm not a C programmer, I'm a pedagogy student! :D
> 
> Now there's a term I need to look up. I've heard it before but don't know what 
> it means.
> 
> -- 
> Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
> Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of
> Salvation.
> EMail: dave at mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
> http://FamilyRadio.com/                   | http://Mielke.cc/bible/
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
> 
> 
> 


More information about the BRLTTY mailing list