0
|
1 ;=============================================================================
|
|
2 ;
|
|
3 ; File menu_processor.asm
|
|
4 ;
|
|
5 ; Routines to handle all OSTC3 graphic/text menus.
|
|
6 ;
|
|
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
|
|
8 ;=============================================================================
|
|
9 ; HISTORY
|
|
10 ; 2012-11-02 : [jDG] Cleanup for OSTC3: removed icons. Added scrolling.
|
|
11 ; But need a font with lower/upper alpha chars...
|
|
12
|
|
13 #include "convert.inc"
|
|
14 #include "ostc3.inc"
|
|
15 #include "strings.inc"
|
|
16 #include "tft.inc"
|
|
17 #include "varargs.inc"
|
|
18 #include "wait.inc"
|
|
19 #include "start.inc"
|
|
20 #include "surfmode.inc"
|
|
21 #include "divemode.inc"
|
|
22 #include "tft_outputs.inc"
|
|
23 #include "eeprom_rs232.inc"
|
|
24
|
|
25 ;NOTE: should be idenric in .inc and .asm !
|
|
26 #define MENU_LINES_MAX .7 ; Number of lines per screen?
|
|
27 #define MENU_TITLE_FONT WIN_STD ; Font should contains lower/UPPER alpha
|
|
28 #define MENU_LINE_FONT WIN_SMALL ; Font should contains lower/UPPER alpha
|
|
29 #define MENU_LEFT .20 ; Position of first menu item
|
|
30 #define MENU_HEIGHT .27 ; Spacing between menu lines.
|
|
31 #define MENU_VCENTER .125 ; Position on screen.
|
|
32 #define MENU_LINE_MAX_LENGTH .20 ; Length in characters
|
|
33
|
|
34 ; Other needed references
|
|
35 extern aa_wordprocessor,option_inc,option_draw,comm_mode
|
|
36
|
|
37
|
|
38 ;=============================================================================
|
|
39 ; Temporary data.
|
|
40
|
|
41 CBLOCK tmp+0x20 ; Reserved space for options.asm
|
|
42 menu_flags ; Various flags for menu:
|
|
43 ; bit 0 :dynamic menu
|
|
44 menu_item ; Index of the current item.
|
|
45 start_item ; Index of the first item (scrolling)
|
|
46 item_max ; Number of items in menu.
|
|
47 selected_item ; Index of the current item.
|
|
48 value_type ; Type for vertical menu.
|
|
49 dynamic_item:3 ; Callback addr
|
|
50 menu_block:3 ; Address of the menu block (ie. item 0)
|
|
51 menu_title:3 ; text or proc for dynamic menu.
|
|
52 menu_center ; centering for line menu.
|
|
53 proc_item:3 ; Address of the current proc.
|
|
54 text_item:2 ; Address of the current text.
|
|
55 ; Reserved to tmp+0x35
|
|
56 ENDC
|
|
57
|
|
58 #define option_item proc_item
|
|
59
|
|
60 basic CODE
|
|
61 ;=============================================================================
|
|
62 ; menu handler.
|
|
63 ;
|
|
64 ; Input: TBLPTR = addr of menu block.
|
|
65 global menu_processor
|
|
66 menu_processor:
|
|
67 banksel common ; Bank1
|
|
68 btfss divemode ; Not in divemode
|
|
69 call speed_fastest ; Make it quick !
|
|
70
|
|
71 ;---- Read menu block ------------------------------------------------
|
|
72 VARARGS_BEGIN ; Read inline PROM data
|
|
73 clrf STKPTR ; Never return, anyway...
|
|
74 VARARGS_GET8 item_max ; Get number of items
|
|
75 VARARGS_GET8 menu_flags ; Get flags
|
|
76 VARARGS_GET24 menu_title ; Get pointer to menu title
|
|
77 VARARGS_GET8 menu_center ; Vertical position
|
|
78 movff TBLPTRL, menu_block+0 ; Save base address for menu_read_item
|
|
79 movff TBLPTRH, menu_block+1
|
|
80 movff TBLPTRU, menu_block+2
|
|
81
|
|
82 extern TFT_clear_divemode_menu
|
|
83 btfss divemode ; In divemode?
|
|
84 bra menu_processor0 ; No
|
|
85
|
|
86 movlw .1
|
|
87 cpfsgt menupos ; only if menupos=1...
|
|
88 call TFT_clear_divemode_menu ; ... Clear the menu!
|
|
89 bra menu_processor1 ; Yes, skip some lines here
|
|
90
|
|
91 menu_processor0:
|
|
92 ;---- draw menu title ------------------------------------------------
|
|
93 clrf CCP1CON ; stop PWM
|
|
94 bcf PORTC,2 ; Pull PWM out to GND
|
|
95 call TFT_ClearScreen
|
|
96 rcall menu_processor_title
|
|
97
|
|
98 ;---- Draw bottomline ------------------------------------------------
|
|
99 TEXT_TINY .5, .240-.16, tNext
|
|
100 TEXT_TINY .160-6*5, .240-.16, tEnter
|
|
101
|
|
102 menu_processor1:
|
|
103 movlw FT_SMALL
|
|
104 movff WREG, win_font
|
|
105
|
|
106 ;---- Select menu type -----------------------------------------------
|
|
107 bra menu_vertical
|
|
108
|
|
109 ;=============================================================================
|
|
110 ; (re-)draw menu title.
|
|
111 ;
|
|
112 menu_processor_title:
|
|
113 btfss menu_flags,0 ; Static or dynmic title ?
|
|
114 bra menu_processor_static_title
|
|
115
|
|
116 lfsr FSR2,buffer
|
|
117 rcall menu_processor_call_title ; add gas, detail and color.
|
|
118 bra menu_processor_title_1
|
|
119
|
|
120 menu_processor_static_title:
|
|
121 movff menu_title+0,FSR1L ; Just copy string.
|
|
122 movff menu_title+1,FSR1H
|
|
123 call strcpy_text
|
|
124
|
|
125 menu_processor_title_1:
|
|
126 WIN_BOX_BLACK .2,.23,.0,.160 ; Clear Menu title
|
|
127 MENU_TITLE_FONT .0, .2 ; Menu title positionning
|
|
128 WIN_COLOR color_greenish
|
|
129 movf FSR2L,W ; Get title length
|
|
130 mullw .9 ; Convert to half pixels
|
|
131 bcf STATUS,C ; Clear carry
|
|
132 rrcf PRODL ; /2
|
|
133 movf PRODL,W ; Back to WREG
|
|
134 sublw .80 ; 80 - width
|
|
135 movwf win_leftx2 ; Aligned to center.
|
|
136
|
|
137 call aa_wordprocessor
|
50
|
138 call TFT_standard_color
|
0
|
139 return
|
|
140
|
|
141 ;=============================================================================
|
|
142 ; Call dynamic proc for menu title:
|
|
143
|
|
144 menu_processor_call_title:
|
|
145 movff menu_title+2,PCLATU ; Just execute computed goto.
|
|
146 movff menu_title+1,PCLATH
|
|
147 movf menu_title+0,W
|
|
148 movwf PCL
|
|
149
|
|
150 ;=============================================================================
|
|
151 ; Restart with first icon/line selected.
|
|
152 global menu_processor_reset
|
|
153 menu_processor_reset:
|
|
154 banksel common
|
|
155 lfsr FSR2,menustack
|
|
156 clrf POSTINC2
|
|
157 clrf POSTINC2
|
|
158 clrf POSTINC2
|
|
159 clrf POSTINC2
|
|
160 clrf POSTINC2
|
|
161 clrf selected_item
|
|
162 return
|
|
163
|
|
164 global menu_processor_pop
|
|
165 menu_processor_pop:
|
|
166 movff menustack+0,selected_item
|
|
167 movff menustack+1,menustack+0
|
|
168 movff menustack+2,menustack+1
|
|
169 movff menustack+3,menustack+2
|
|
170 movff menustack+4,menustack+3
|
|
171 return
|
|
172
|
|
173 menu_processor_push:
|
|
174 movff menustack+3,menustack+4
|
|
175 movff menustack+2,menustack+3
|
|
176 movff menustack+1,menustack+2
|
|
177 movff menustack+0,menustack+1
|
|
178 movff selected_item,menustack+0
|
|
179 clrf selected_item
|
|
180 return
|
|
181
|
|
182 ;---- Execute menu selection -------------------------------------------------
|
|
183 do_menu_item:
|
|
184 bcf switch_right ; Avoid loops.
|
|
185 call speed_normal ; Back to normal speed.
|
|
186
|
|
187 movf selected_item,W ; Reread proc address from table.
|
|
188 rcall menu_read_item ; (destroy PROD)
|
|
189
|
|
190 movff selected_item,PRODL ; Pass along selected line
|
|
191
|
|
192 rcall menu_processor_push ; Remember where we get from. (clears selected_item)
|
|
193
|
|
194 movff proc_item+2,PCLATU ; Then execute computed goto.
|
|
195 movff proc_item+1,PCLATH
|
|
196 movf proc_item+0,W
|
|
197 movwf PCL
|
|
198
|
|
199 ;=============================================================================
|
|
200 ; Get current item from table.
|
|
201 ;
|
|
202 ; Input : Item number in WREG, menu_block.
|
|
203 ;
|
|
204 ; Output: icon_large, text_item, proc_item 16bits pointers.
|
|
205 ;
|
|
206 ; Trashed: PROD, WREG
|
|
207 menu_read_item:
|
|
208 mullw .10 ; 10 bytes per item.
|
|
209 movf PRODL,W ; Then do a 24bits add
|
|
210 addwf menu_block+0,W ; with menu_block, and
|
|
211 movwf TBLPTRL ; setup TBLPTR
|
|
212 movf PRODH,W
|
|
213 addwfc menu_block+1,W
|
|
214 movwf TBLPTRH
|
|
215 movlw 0
|
|
216 addwfc menu_block+2,W
|
|
217 movwf TBLPTRU
|
|
218
|
|
219 VARARGS_GET8 value_type ; Read 10 bytes of item data
|
|
220 VARARGS_GET24 dynamic_item
|
|
221 VARARGS_GET24 proc_item
|
|
222 VARARGS_GET8 WREG ; Skip dummy byte
|
|
223 VARARGS_GET16 text_item
|
|
224
|
|
225 return
|
|
226
|
|
227 ;=============================================================================
|
|
228 ; Vertical menu : set of line/value to choose from.
|
|
229 ; Entry point to update lines already shown.
|
|
230 ;
|
|
231 global menu_vertical
|
|
232 menu_vertical:
|
|
233 btfss divemode ; Not in divemode
|
|
234 clrf timeout_counter2 ; Reset timeout
|
|
235
|
|
236 menu_vertical_2:
|
|
237 rcall menu_draw_lines ; Always re-draw whole menu
|
|
238
|
|
239 movlw CCP1CON_VALUE ; See ostc3.inc
|
|
240 btfss divemode ; Not in divemode
|
|
241 movwf CCP1CON ; Power-on backlight
|
|
242
|
|
243 menu_vertical_1:
|
|
244 movf selected_item,W ; Get current item data
|
|
245 rcall menu_read_item
|
|
246 movf proc_item+0,W ; Check if pro address is NULL ?
|
|
247 iorwf proc_item+1,W
|
|
248 bz next_line_menu ; YES: not selectable !
|
|
249
|
|
250 btfss divemode ; Not in divemode
|
|
251 rcall menu_draw_selected_line
|
|
252
|
50
|
253 btfsc in_color_menu ; =1: In the color scheme menu
|
|
254 call TFT_show_color_schemes ; Yes, update the color schemes
|
|
255
|
0
|
256 extern rtc_set_rtc
|
|
257 btfss settime_setdate ; In the Set Time or Set Date menu?
|
|
258 bra menu_line_loop_pre2 ; no, skip all following
|
|
259
|
|
260 movff month,lo ; new month
|
|
261 dcfsnz lo,F
|
|
262 movlw .31
|
|
263 dcfsnz lo,F
|
|
264 movlw .28
|
|
265 dcfsnz lo,F
|
|
266 movlw .31
|
|
267 dcfsnz lo,F
|
|
268 movlw .30
|
|
269 dcfsnz lo,F
|
|
270 movlw .31
|
|
271 dcfsnz lo,F
|
|
272 movlw .30
|
|
273 dcfsnz lo,F
|
|
274 movlw .31
|
|
275 dcfsnz lo,F
|
|
276 movlw .31
|
|
277 dcfsnz lo,F
|
|
278 movlw .30
|
|
279 dcfsnz lo,F
|
|
280 movlw .31
|
|
281 dcfsnz lo,F
|
|
282 movlw .30
|
|
283 dcfsnz lo,F
|
|
284 movlw .31
|
|
285 cpfsgt day ; day ok?
|
|
286 bra menu_line_loop_pre1 ; OK!
|
|
287 movlw .1 ; not OK, set to 1st
|
|
288 movwf day
|
|
289
|
|
290 menu_line_loop_pre1:
|
|
291 btfsc switch_right ; Enter pressed?
|
|
292 call rtc_set_rtc ; Yes, update mins,sec,hours,day,month and year to rtc module
|
|
293 call TFT_show_time_date_menu ; Update clock
|
|
294
|
|
295 menu_line_loop_pre2:
|
|
296 bcf switch_right
|
|
297 bcf switch_left
|
|
298 btfss divemode ; Not in Divemode
|
|
299 call speed_normal
|
|
300
|
|
301 menu_line_loop_pre3:
|
|
302 extern divemode_option0_return
|
|
303 btfsc divemode ; In divemode?
|
|
304 goto divemode_option0_return ; Yes, return to it
|
|
305
|
|
306 menu_line_loop:
|
|
307 btfsc switch_right
|
|
308 bra do_line_menu ; Type dependent
|
|
309 btfsc switch_left
|
|
310 bra next_line_menu
|
|
311
|
|
312 btfss onesecupdate ; New second
|
|
313 bra menu_line_loop2 ; not yet...
|
|
314
|
|
315 call timeout_surfmode ; timeout
|
|
316 call set_dive_modes ; check, if divemode must be entered
|
|
317
|
|
318 btfsc settime_setdate ; In the Set Time or Set Date menu?
|
|
319 call TFT_show_time_date_menu ; Yes, update clock
|
|
320 btfsc menu_show_sensors ; In the "Sensors" menu?
|
|
321 call TFT_menu_hud ; Yes, update HUD data
|
|
322
|
|
323 bcf onesecupdate ; one second updates done
|
|
324
|
|
325 menu_line_loop2:
|
|
326 btfsc sleepmode ; Timeout?
|
|
327 goto restart ; Yes, back to surfacemode
|
|
328 btfsc divemode
|
|
329 goto restart ; Enter Divemode if required
|
|
330
|
|
331 btfsc enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump)
|
|
332 bra menu_line_loop3
|
|
333 btfsc vusb_in ; USB plugged in?
|
|
334 goto comm_mode ; Start COMM mode
|
|
335 bra menu_line_loop4
|
|
336 menu_line_loop3:
|
|
337 btfss vusb_in ; USB (still) plugged in?
|
|
338 bcf enable_screen_dumps ; No, clear flag
|
|
339 call rs232_get_byte
|
|
340 btfsc rs232_recieve_overflow
|
|
341 bra menu_line_loop4
|
|
342 movlw "l"
|
|
343 cpfseq RCREG1
|
|
344 bra menu_line_loop4
|
|
345 call TFT_dump_screen ; Dump the screen contents
|
|
346 menu_line_loop4:
|
|
347
|
|
348 bra menu_line_loop
|
|
349
|
|
350 ;---- Move to menu's next line
|
|
351 next_line_menu:
|
|
352 btfss divemode ; not in divemode
|
|
353 call speed_fastest
|
|
354 bcf switch_left ; Avoid looping.
|
|
355
|
|
356 incf selected_item,F ; Select next item.
|
|
357 movf selected_item,W ; Index == max ?
|
|
358 cpfseq item_max
|
|
359 bra menu_vertical_1 ; NO: redraw cursor.
|
|
360
|
|
361 clrf selected_item ; YES: restart for item 0.
|
|
362 bra menu_vertical_1 ; Then redraw cursor.
|
|
363
|
|
364 global do_line_menu
|
|
365 do_line_menu:
|
|
366 btfss divemode ; not in divemode
|
|
367 call speed_fastest
|
|
368 ; bcf switch_right ; Avoid looping.
|
|
369
|
|
370 decf menupos,W ; menu_processor needs 0-5...
|
|
371 btfsc divemode ; only in divemode
|
|
372 movwf selected_item
|
|
373
|
|
374 movf selected_item,W ; Read selected descriptor
|
|
375 rcall menu_read_item
|
|
376
|
|
377 movf value_type,W ; Switch on data type
|
|
378 bz menu_do_line_call ; CALL
|
|
379 dcfsnz WREG
|
|
380 bra menu_do_line_call ; STRING: do as call
|
|
381 dcfsnz WREG
|
|
382 bra menu_do_line_option ; OPTION
|
|
383 dcfsnz WREG
|
|
384 bra menu_do_line_call ; DYNAMIC: do as call
|
|
385 bra menu_line_loop_pre3 ; else do nothing...
|
|
386
|
|
387 ;---- CALL
|
|
388 menu_do_line_call:
|
|
389 rcall do_menu_item ; Same as icon menu: calculated goto.
|
|
390 rcall menu_processor_pop ; Back to same line,
|
|
391 bra menu_vertical ; Then continue into menu...
|
|
392
|
|
393 ;---- Call option specific increment subroutine
|
|
394 menu_do_line_option:
|
|
395 movff option_item+0,FSR0L ; Get option handle
|
|
396 movff option_item+1,FSR0H
|
|
397 call option_inc ; increment
|
|
398
|
|
399 movff selected_item,PRODL ; Pass selection to callback.
|
|
400 rcall menu_text_call
|
|
401 bra menu_vertical_2 ; redraw all lines...
|
|
402
|
|
403 ;-----------------------------------------------------------------------------
|
|
404
|
|
405 menu_draw_lines_divemode:
|
|
406 movlw divemode_menu_item1_row
|
|
407 movff WREG,win_top
|
|
408 movlw divemode_menu_item1_column
|
|
409 movff WREG,win_leftx2
|
|
410 clrf start_item
|
|
411 movff item_max,menupos4 ; Copy item_max for divemode cursor routine
|
|
412 bra menu_draw_lines_2
|
|
413
|
|
414 menu_draw_lines:
|
|
415 btfsc divemode ; in divemode?
|
|
416 bra menu_draw_lines_divemode ; Yes
|
|
417
|
|
418 btfsc menu_flags,0 ; Dynamic title ?
|
|
419 rcall menu_processor_title ; YES: redraw it then.
|
|
420
|
|
421 MENU_LINE_FONT MENU_LEFT, 0 ; Init start position/font
|
|
422 movff menu_center,win_top ; computed in menu block.
|
|
423
|
|
424 ; Does the menu have more than 6 lines ?
|
|
425 movf item_max,W
|
|
426 addlw -(MENU_LINES_MAX+1) ; (max - 7)
|
|
427 bnn menu_draw_long_menu ; bra if (max >= 7)
|
|
428
|
|
429 clrf start_item
|
|
430 bra menu_draw_lines_2
|
|
431
|
|
432 menu_draw_long_menu:
|
|
433 movf selected_item,W ; Start at selected-6
|
|
434 addlw -(MENU_LINES_MAX-1)
|
|
435 btfsc STATUS,N ; This is <0 ?
|
|
436 clrf WREG ; YES: start from top instead.
|
|
437 movwf start_item
|
|
438
|
|
439 menu_draw_lines_2:
|
|
440 movff start_item, menu_item
|
|
441
|
|
442 menu_draw_lines_1:
|
50
|
443 call TFT_standard_color ; Restore color after disabled lines.
|
0
|
444
|
|
445 movf menu_item,W
|
|
446 rcall menu_read_item
|
|
447
|
|
448 movf value_type,W ; Switch on data type
|
|
449 bz menu_draw_line_call
|
|
450 dcfsnz WREG
|
|
451 bra menu_draw_line_string
|
|
452 dcfsnz WREG
|
|
453 bra menu_draw_line_option
|
|
454 dcfsnz WREG
|
|
455 bra menu_draw_line_dynamic
|
|
456 bra menu_draw_line_none
|
|
457
|
|
458 menu_draw_line_string:
|
|
459 movff text_item+0,TBLPTRL ; Read not-translated string from PROM.
|
|
460 movff text_item+1,TBLPTRH
|
|
461 call strcpy_prom ; Copy in buffer
|
|
462 bra menu_draw_line_none
|
|
463
|
|
464 menu_draw_line_call:
|
|
465 movff text_item+0,FSR1L ; Read string from PROM.
|
|
466 movff text_item+1,FSR1H
|
|
467 call strcpy_text ; Copy in buffer
|
|
468
|
|
469 bra menu_draw_line_none
|
|
470
|
|
471 menu_draw_line_option:
|
|
472 movff text_item+0,FSR1L ; Read string from PROM.
|
|
473 movff text_item+1,FSR1H
|
|
474 call strcpy_text ; Copy in buffer
|
|
475
|
|
476 movff option_item+0,FSR0L ; Retrieve option handle.
|
|
477 movff option_item+1,FSR0H
|
|
478 call option_draw
|
|
479 bra menu_draw_line_none
|
|
480
|
|
481 menu_draw_line_dynamic:
|
|
482 lfsr FSR2,buffer
|
|
483 movff menu_item,PRODL ; Pass item to callback.
|
|
484 rcall menu_text_call ; Push return address.
|
|
485 bra menu_draw_line_none
|
|
486
|
|
487 ; Computed goto to pointer inside dynamic_item:
|
|
488 menu_text_call:
|
|
489 movf dynamic_item+0,W ; Check if callback is NULL
|
|
490 iorwf dynamic_item+1,W
|
|
491 iorwf dynamic_item+2,W
|
|
492 btfsc STATUS,Z
|
|
493 return ; YES: don't call it.
|
|
494
|
|
495 movff dynamic_item+2,PCLATU ; Prepare...
|
|
496 movff dynamic_item+1,PCLATH
|
|
497 movf dynamic_item+0,W
|
|
498 movwf PCL ; And jump !
|
|
499
|
|
500 menu_draw_line_none:
|
|
501 extern TFT_fillup_with_spaces
|
|
502
|
|
503 btfsc divemode ; In divemode?
|
|
504 bra menu_draw_line_none_divemode ; Yes
|
|
505
|
|
506 movlw MENU_LINE_MAX_LENGTH
|
|
507 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG)
|
|
508 clrf WREG
|
|
509 movff WREG,buffer+MENU_LINE_MAX_LENGTH;No ; Make sure won't be longer than MENU_LINE_MAX_LENGTH ch
|
|
510 call aa_wordprocessor
|
|
511 movlw MENU_HEIGHT ; No, Move to next line
|
|
512 addwf win_top,F
|
|
513 incf menu_item,F ; inc loop counter
|
|
514
|
|
515 movf start_item,W ; First line (scrolled)
|
|
516 subwf menu_item,W ; current - first
|
|
517 xorlw MENU_LINES_MAX ; Already done 6 lines ?
|
|
518 btfsc STATUS,Z
|
|
519 return ; YES
|
|
520 menu_draw_line_none2:
|
|
521 movf menu_item,W ; Done item_max lines ?
|
|
522 xorwf item_max,W
|
|
523 btfss STATUS,Z
|
|
524 bra menu_draw_lines_1 ; No: loop...
|
|
525 return
|
|
526
|
|
527 menu_draw_line_none_divemode:
|
|
528 movlw .10
|
|
529 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG)
|
|
530 clrf WREG
|
|
531 movff WREG,buffer+.10
|
|
532
|
|
533 call aa_wordprocessor ; Draw the line!
|
|
534
|
|
535 movlw .0
|
|
536 movff WREG,win_invert ; Reset invert flag
|
|
537
|
|
538 movlw .24 ; Divemode menu spacing
|
|
539 addwf win_top,F
|
|
540 incf menu_item,F ; inc loop counter
|
|
541
|
|
542 movlw .3
|
|
543 cpfseq menu_item ; At pos 4?
|
|
544 bra menu_draw_line_none2 ; No
|
|
545
|
|
546 movlw divemode_menu_item4_row
|
|
547 movff WREG,win_top ; Reset row
|
|
548 movlw divemode_menu_item4_column
|
|
549 movff WREG,win_leftx2 ; New column
|
|
550 bra menu_draw_line_none2 ; Done.
|
|
551
|
|
552 ;-----------------------------------------------------------------------------
|
|
553 ; Put a mark in front of the current line
|
|
554 menu_draw_selected_line:
|
|
555 clrf timeout_counter2 ; Reset timeout
|
|
556 WIN_BOX_BLACK .34,.221,MENU_LEFT-8,MENU_LEFT-2 ; Clear left column
|
|
557
|
50
|
558 call TFT_standard_color
|
0
|
559 WIN_SMALL MENU_LEFT-8, 0 ; Arrow symbol only in small font
|
|
560 movf start_item,W ; First line (scrolled)
|
|
561 subwf selected_item,W ; selected - first
|
|
562 mullw MENU_HEIGHT ; 30 pixel by line
|
|
563 movf PRODL,W ; result
|
|
564 addwf menu_center,W ; added to first line
|
|
565 movwf win_top ; and stored to pos.
|
|
566 STRCPY_PRINT "\xb7" ; print cursor
|
|
567
|
|
568 return
|
|
569
|
|
570 END
|