Blame |
Last modification |
View Log
| RSS feed
/*********************************************************************************************************************************
* *
* Handling of MK LCD *
* *
* Author: Marcus -LiGi- Bueschleb *
*
* see README for further Infos
*
*********************************************************************************************************************************/
public class MKLCD
implements Runnable
{
MKCommunicator mk=
null;
public String[] LCD_str
;
public MKLCD
(MKCommunicator _mk
)
{
LCD_str=
new String[4];
mk=_mk
;
new Thread( this ).
start(); // fire up main Thread
}
public void run
()
{
while(true)
{
try {
if (mk.
connected)
{
trigger_LCD
();
}
else
{
}
Thread.
sleep(100); }
catch (Exception e
) { }
}
}
public void handle_lcd_data
(int[] data,
int row
)
{
LCD_str
[row
]=
"";
for(int foo=
0;foo
<20;foo++
)
LCD_str
[row
]+=
(char)data
[foo
];
}
public void trigger_LCD
()
{
try {
mk.
trigger_LCD(act_key
);
act_key=
0;
}
catch (Exception e
) { }
}
int act_key=
0;
public void LCD_NEXTPAGE
()
{
act_key=
2;
}
public void LCD_PREVPAGE
()
{
act_key=
1;
}
}