Rev 314 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 314 | Rev 325 | ||
---|---|---|---|
Line 139... | Line 139... | ||
139 | 139 | ||
Line 140... | Line 140... | ||
140 | return out_arr; |
140 | return out_arr; |
Line -... | Line 141... | ||
- | 141 | ||
Line 141... | Line 142... | ||
141 | 142 | } |
|
142 | } |
143 | |
143 | 144 | // FC - Function Mappers |
|
144 | 145 | ||
Line 158... | Line 159... | ||
158 | public void get_params(int id) |
159 | public void get_params(int id) |
159 | { |
160 | { |
160 | int[] params=new int[1]; |
161 | int[] params=new int[1]; |
161 | params[0]=id; |
162 | params[0]=id; |
Line -... | Line 163... | ||
- | 163 | ||
- | 164 | while(sending) |
|
- | 165 | {try { Thread.sleep(50); } |
|
- | 166 | catch (Exception e) { } |
|
- | 167 | } |
|
162 | 168 | ||
163 | send_command(0,'q',params); |
169 | send_command(0,'q',params); |
Line -... | Line 170... | ||
- | 170 | } |
|
- | 171 | ||
- | 172 | public void trigger_LCD(int key) |
|
- | 173 | { |
|
- | 174 | if (sending) return; |
|
- | 175 | ||
- | 176 | ||
- | 177 | int[] params=new int[3]; |
|
- | 178 | params[0]=key; |
|
- | 179 | params[1]=0; |
|
- | 180 | params[2]=0; |
|
- | 181 | ||
- | 182 | send_command(0,'h',params); |
|
- | 183 | ||
- | 184 | } |
|
- | 185 | ||
- | 186 | ||
- | 187 | public void write_params() |
|
- | 188 | { |
|
- | 189 | while(sending) |
|
- | 190 | {try { Thread.sleep(50); } |
|
- | 191 | catch (Exception e) { } |
|
- | 192 | } |
|
- | 193 | ||
Line -... | Line 194... | ||
- | 194 | send_command(0,(char)('l'+params.act_paramset),params.field[params.act_paramset]); |
|
Line 164... | Line 195... | ||
164 | } |
195 | } |
165 | 196 | ||
166 | 197 | ||
- | 198 | boolean sending=false; |
|
167 | 199 | ||
168 | 200 | // send command to FC ( add crc and pack into pseudo Base64 |
|
169 | // send command to FC ( add crc and pack into pseudo Base64 |
201 | public void send_command(int modul,char cmd,int[] params) |
170 | public void send_command(int modul,char cmd,int[] params) |
202 | { |
Line 211... | Line 243... | ||
211 | writer.flush(); |
243 | writer.flush(); |
212 | } |
244 | } |
213 | catch (Exception e) |
245 | catch (Exception e) |
214 | { // problem sending data to FC |
246 | { // problem sending data to FC |
215 | } |
247 | } |
216 | 248 | ||
- | 249 | sending=false; |
|
217 | } |
250 | } |
Line 218... | Line 251... | ||
218 | 251 | ||
219 | 252 |