Rev 82 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 82 | Rev 135 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | * |
7 | * |
8 | * |
8 | * |
9 | *******************************************/ |
9 | *******************************************/ |
Line 10... | Line 10... | ||
10 | 10 | ||
11 | public class MKLCD |
11 | public class MKLCD |
12 | implements Runnable |
12 | // implements Runnable |
Line 13... | Line 13... | ||
13 | { |
13 | { |
Line 14... | Line 14... | ||
14 | 14 | ||
Line 43... | Line 43... | ||
43 | lcd_buf[p][2]=" "; |
43 | lcd_buf[p][2]=" "; |
44 | lcd_buf[p][3]=" ;-) "; |
44 | lcd_buf[p][3]=" ;-) "; |
45 | } |
45 | } |
Line 46... | Line 46... | ||
46 | 46 | ||
47 | mk=_mk; |
47 | mk=_mk; |
48 | new Thread( this ).start(); // fire up main Thread |
48 | // new Thread( this ).start(); // fire up main Thread |
49 | } |
49 | } |
50 | 50 | /* |
|
51 | public void run() |
51 | public void run() |
52 | { |
52 | { |
53 | while(true) |
53 | while(true) |
54 | { |
54 | { |
55 | try { |
55 | try { |
56 | if (mk.connected) |
- | |
- | 56 | if (mk.connected) |
|
57 | trigger_LCD(); |
57 | |
58 | Thread.sleep(100); |
58 | Thread.sleep(300); |
59 | } |
59 | } |
60 | catch (Exception e) { } |
60 | catch (Exception e) { } |
61 | } |
61 | } |
62 | } |
62 | } |
63 | 63 | */ |
|
64 | public void set_page(int page) |
64 | public void set_page(int page) |
65 | { |
65 | { |
66 | act_user_page=page; |
66 | act_user_page=page; |
Line 90... | Line 90... | ||
90 | 90 | ||
91 | if (init_state==-1) // init over |
91 | if (init_state==-1) // init over |
92 | { |
92 | { |
93 | if (act_mk_page<act_user_page) |
93 | if (act_mk_page<act_user_page) |
94 | act_key=2; |
94 | act_key=2; |
95 | 95 | else |
|
96 | if (act_mk_page>act_user_page) |
96 | if (act_mk_page>act_user_page) |
- | 97 | act_key=1; |
|
- | 98 | if (act_mk_page==act_user_page) |
|
Line 97... | Line 99... | ||
97 | act_key=1; |
99 | act_key=0; |
Line 98... | Line 100... | ||
98 | 100 | ||
99 | } |
101 | } |
Line 130... | Line 132... | ||
130 | catch (Exception e) { } |
132 | catch (Exception e) { } |
131 | } |
133 | } |
Line 132... | Line -... | ||
132 | - | ||
133 | - | ||
134 | - | ||
135 | - | ||
136 | 134 | ||
137 | 135 | ||
138 | 136 | ||
139 | public void LCD_NEXTPAGE() |
137 | public void LCD_NEXTPAGE() |
140 | { |
138 | { |