|
From: Levon A. <lev...@gm...> - 2012-03-14 11:05:15
|
Yago Fernandez Hansen <sti@...> writes:
> Dear developers:
> I've tried with picoLCD 2x20 with not very good results in the project I am
working in, so I have bought a new
> LCD module picoLCD Graphic USB 256x64 with better results. This display has 5
buttons that lcd4linux reads right.
> The problem is that I need to give functionalities to these buttons and have
tried to read the whole wiki and using the
> help and the plugins. I have tried to give a button the function of poweroff
using the exec plugin, and to other the
> function to switch on and off the backlight with the command.
> LCD::backlight(0)
> LCD::backlight(1)
> I have tried to use the command with evaluator as
> expression button_action=nkey==2?LCD::backlight(0):button_action;nkey==2?1:0
> But after killing and restarting lcd4linux begins to run and to send
everything to the display until it comes to this line
> and then exits.
> My version is: Version 0.10.2-SVN-796 (the one that comes bundled with
picolcd)
> Can you please help me to make it work!
> Thank you
> Yago Fernandez Hansen
Dear Yago,
Maybe it is too late but here how i managed to enable backlight toggling with my
picolcd.
Widget keyhome {
class 'Keypad'
position 'left'
state 'pressed'
expression LCD::backlight(test::onoff(1))
}
Layout picoLCD {
Row1 {
}
...
Row8 {
}
Keypad1 'keyhome'
}
Best regards,
Levon.
|