Rev 242 | Rev 255 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 242 | Rev 245 | ||
---|---|---|---|
Line 86... | Line 86... | ||
86 | switch(edit_source.field_types[act_tab][i]) |
86 | switch(edit_source.field_types[act_tab][i]) |
87 | { |
87 | { |
88 | case PARAMTYPE_BITSWITCH: |
88 | case PARAMTYPE_BITSWITCH: |
89 | lcd_lines[1+2*i]=" " + (((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]/8)&(1<<edit_source.field_positions[act_tab][i]%8))==0)?"off":"on" ) ; |
89 | lcd_lines[1+2*i]=" " + (((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]/8)&(1<<edit_source.field_positions[act_tab][i]%8))==0)?"off":"on" ) ; |
90 | break; |
90 | break; |
- | 91 | ||
91 | case PARAMTYPE_BYTE: |
92 | case PARAMTYPE_BYTE: |
92 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
93 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
- | 94 | ||
- | 95 | break; |
|
- | 96 | ||
- | 97 | case PARAMTYPE_BITMASK: |
|
- | 98 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
|
93 | if ((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])>250)&&(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])<256)) |
99 | if ((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])>250)&&(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])<256)) |
94 | lcd_lines[2+2*i]+="[Poti"+(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])-250) +"]"; break; |
100 | lcd_lines[1+2*i]+="[Poti"+(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])-250) +"]"; |
- | 101 | else |
|
- | 102 | { |
|
- | 103 | lcd_lines[1+2*i]+=" ["; |
|
- | 104 | for (int bit=0;bit<8;bit++) |
|
- | 105 | lcd_lines[1+2*i]+=((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]) & ( 1<<bit)) !=0)?"+":"-"; |
|
- | 106 | lcd_lines[1+2*i]+="]"; |
|
- | 107 | } |
|
- | 108 | ||
- | 109 | break; |
|
- | 110 | ||
- | 111 | case PARAMTYPE_MKBYTE: |
|
- | 112 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
|
- | 113 | if ((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])>250)&&(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])<256)) |
|
- | 114 | lcd_lines[1+2*i]+=" [Poti"+(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])-250) +"]"; |
|
- | 115 | break; |
|
Line 95... | Line 116... | ||
95 | 116 | ||
96 | 117 | ||
97 | case PARAMTYPE_KEY: |
118 | case PARAMTYPE_KEY: |
Line 201... | Line 222... | ||
201 | 222 | ||
202 | 223 | ||
203 | if ((act_y!=(act_lcd_lines-1))&&(((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9))|| ( keyCode==KEYCODE_CLEAR))) |
224 | if ((act_y!=(act_lcd_lines-1))&&(((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9))|| ( keyCode==KEYCODE_CLEAR))) |
204 | { |
225 | { |
205 | int act_pos=act_y/2; |
226 | int act_pos=act_y/2; |
206 | if((edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_BYTE)) |
227 | if((edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_BYTE)||(edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_MKBYTE) ||(edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_BITMASK)) |
207 | { |
228 | { |
208 | if ((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9)) |
229 | if ((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9)) |
209 | { |
230 | { |
Line 258... | Line 279... | ||
258 | case PARAMTYPE_BITSWITCH: |
279 | case PARAMTYPE_BITSWITCH: |
Line 259... | Line 280... | ||
259 | 280 | ||
260 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
281 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
Line 261... | Line -... | ||
261 | break; |
- | |
- | 282 | break; |
|
- | 283 | ||
262 | 284 | case PARAMTYPE_BITMASK: |
|
263 | - | ||
- | 285 | case PARAMTYPE_MKBYTE: |
|
Line -... | Line 286... | ||
- | 286 | case PARAMTYPE_BYTE: |
|
- | 287 | ||
- | 288 | ||
264 | case PARAMTYPE_BYTE: |
289 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],1,0,255); |
265 | case PARAMTYPE_STICK: |
290 | break; |
Line 266... | Line 291... | ||
266 | 291 | case PARAMTYPE_STICK: |
|
267 | edit_source.field_from_act_add(edit_source.field_positions[act_tab][act_pos],1); |
292 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],1,0,10); |
268 | break; |
293 | break; |
Line 278... | Line 303... | ||
278 | { |
303 | { |
279 | case PARAMTYPE_BITSWITCH: |
304 | case PARAMTYPE_BITSWITCH: |
280 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
305 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
Line 281... | Line 306... | ||
281 | 306 | ||
- | 307 | break; |
|
- | 308 | case PARAMTYPE_BITMASK: |
|
282 | break; |
309 | case PARAMTYPE_MKBYTE: |
- | 310 | case PARAMTYPE_BYTE: |
|
- | 311 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],-1,0,255); |
|
283 | case PARAMTYPE_BYTE: |
312 | break; |
284 | case PARAMTYPE_STICK: |
313 | case PARAMTYPE_STICK: |
285 | edit_source.field_from_act_add(edit_source.field_positions[act_tab][act_pos],-1); |
314 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],-1,0,10); |
286 | break; |
315 | break; |
287 | default: |
316 | default: |
288 | edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length); |
317 | edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length); |
289 | break; |
318 | break; |