tompreston / pifacecad-lcdproc

LCDproc patch for PiFace Control and Display support.
0 stars 0 forks source link

Input pullups are not set so switches will not work #2

Open tompreston opened 10 years ago

tompreston commented 10 years ago

Lines 316 to 318 are currently:

mcp23s17_write_reg(p, IOCON, ioconfig);
mcp23s17_write_reg(p, IODIRB, 0); /* Set GPIOB (LCD port) to output */
mcp23s17_write_reg(p, IODIRA, 0xff); /* Set GPIOA (switches) to input */

It should read:

mcp23s17_write_reg(p, IOCON, ioconfig);
mcp23s17_write_reg(p, IODIRB, 0); /* Set GPIOB (LCD port) to output */
mcp23s17_write_reg(p, IODIRA, 0xff); /* Set GPIOA (switches) to input */
mcp23s17_write_reg(p, GPPUA, 0xff); /* Set GPPUA (input pullups) high */
barcoboy commented 10 years ago

It appears that this has now been merged as well into LCDProc's source code, and I can confirm that with a few slight modifications to the LCDd.conf file, the buttons are recognized when you run LCDd with a report level of 4 (-r 4).

However, it appears that the XBMC LCDProc plugin does not support the reading of the keypresses from LCDProc. I asked the author about it on the XBMC forums, and here was his response:

"While this would be a very nice addition for 'full' LCDproc support, this isn't supported at the moment and would probably require some major refactoring of the client/server communication stuff (and I also don't have appropriate hardware to test/develop with so this would be a blind implementation) - sorry (patches welcome, of course ;-) )."