Hello, this is Tim again. I'm the one working on those FCHAD devices(the low
cost single cell open source braille displays). I have gotten to the point
where I'm almost done with the driver. But I cannot seem to figure out how
brltty deals with key commands. Specifically, I want to be able to send orca
the scroll right/left key commands and "cell pressed" key commands. Right now,
I have this working:
static int
brl_readCommand (BrailleDisplay *brl, KeyTableCommandContext context) {
sem_wait(&key_waiting);
switch(key){
case SCROLL_LEFT: printf("SCROLL_LEFT\n");break;
case SCROLL_RIGHT: printf("SCROLL_RIGHT\n");break;
default:printf("Keypress%d \n",key);
}
return EOF;
}
what should I put in the place of those printf's?
That last default, is when a braille cell's button gets pressed.
Here is the rest of my code:
https://github.com/timthelion/FCHAD/blob/master/braille.c
I must note, that I got distracted by trying to make a protocol "the right
way(tm)" with device parameter initializations and checksums and such. I found
it was impossible because the arduino's serial just was not reliable... I now
simply send bytes single bytes indicating which braille character to display to
the arduino, and handle the rest within the brltty driver. This is a much less
flexible method, but it works and was much much easier to write...
Anyways, thank you for your time in reading this, and thank you for your help,
Timothy Hobbs
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://mielke.cc/mailman/listinfo/brltty