comparison src/menu_processor.asm @ 656:8af5aefbcdaf default tip

Update to 3.31 beta
author heinrichsweikamp
date Thu, 27 Nov 2025 18:32:58 +0100
parents 75e90cd0c2c3
children
comparison
equal deleted inserted replaced
655:c7b7b8a358cd 656:8af5aefbcdaf
96 bra menu_processor_menu_body ; No, the normal dive mode menu has no title and footer 96 bra menu_processor_menu_body ; No, the normal dive mode menu has no title and footer
97 97
98 ; draw menu title 98 ; draw menu title
99 WIN_BOX_BLACK dm_menu_row+.2,dm_menu_row+.26,dm_menu_left+.2,dm_menu_right-.2 ; clear menu title area 99 WIN_BOX_BLACK dm_menu_row+.2,dm_menu_row+.26,dm_menu_left+.2,dm_menu_right-.2 ; clear menu title area
100 WIN_SMALL .2, dm_menu_row+.2 ; set menu title font and position 100 WIN_SMALL .2, dm_menu_row+.2 ; set menu title font and position
101 FONT_COLOR color_greenish ; set menu title font color 101 FONT_COLOR color_green ; set menu title font color
102 movff menu_title_addr+0,FSR1L ; point to multi-lingual menu title text 102 movff menu_title_addr+0,FSR1L ; point to multi-lingual menu title text
103 movff menu_title_addr+1,FSR1H ; ... 103 movff menu_title_addr+1,FSR1H ; ...
104 call strcpy_text_FSR ; copy translated text into the buffer 104 call strcpy_text_FSR ; copy translated text into the buffer
105 movf FSR2L,W ; get title text length 105 movf FSR2L,W ; get title text length
106 mullw .7 ; compute title length in pixels_x2 106 mullw .7 ; compute title length in pixels_x2
126 call TFT_ClearScreen ; clear screen 126 call TFT_ClearScreen ; clear screen
127 127
128 ; draw menu title 128 ; draw menu title
129 WIN_BOX_BLACK .2,.23,.0,.159 ; clear menu title area 129 WIN_BOX_BLACK .2,.23,.0,.159 ; clear menu title area
130 WIN_STD .0, .2 ; set menu title font and position 130 WIN_STD .0, .2 ; set menu title font and position
131 FONT_COLOR color_greenish ; set menu title font color 131 FONT_COLOR color_green ; set menu title font color
132 movff menu_title_addr+0,FSR1L ; point to multi-lingual menu title text 132 movff menu_title_addr+0,FSR1L ; point to multi-lingual menu title text
133 movff menu_title_addr+1,FSR1H ; ... 133 movff menu_title_addr+1,FSR1H ; ...
134 call strcpy_text_FSR ; copy translated text into the buffer 134 call strcpy_text_FSR ; copy translated text into the buffer
135 movf FSR2L,W ; get title text length 135 movf FSR2L,W ; get title text length
136 mullw .9 ; compute title length in pixels_x2 136 mullw .9 ; compute title length in pixels_x2
143 movwf FSR2L ; set buffer pointer to end of max length 143 movwf FSR2L ; set buffer pointer to end of max length
144 clrf INDF2 ; terminate string at max length 144 clrf INDF2 ; terminate string at max length
145 PRINT ; output menu title 145 PRINT ; output menu title
146 146
147 ; draw footer line 147 ; draw footer line
148 FONT_COLOR_MEMO ; select default color 148 FONT_COLOR color_green ; set menu title font color
149 WIN_TINY .5, .224 ; tiny font, left position 149 WIN_TINY .5, .224 ; tiny font, left position
150 STRCPY_TEXT_PRINT tNext ; print "Next" 150 STRCPY_TEXT_PRINT tNext ; print "Next"
151 WIN_TINY .124, .224 ; tiny font, righ position 151 WIN_TINY .124, .224 ; tiny font, righ position
152 STRCPY_TEXT_PRINT tEnter ; print "Enter" 152 STRCPY_TEXT_PRINT tEnter ; print "Enter"
153 153
266 ; Menu HMI Operation 266 ; Menu HMI Operation
267 ; 267 ;
268 global menu_vertical 268 global menu_vertical
269 menu_vertical: 269 menu_vertical:
270 rcall menu_draw_menu_items ; draw all menu items 270 rcall menu_draw_menu_items ; draw all menu items
271 bcf force_all_caps ; clear flag (which is only used in dn hardware)
271 movlw CCP1CON_VALUE ; load PWM setting 272 movlw CCP1CON_VALUE ; load PWM setting
272 btfss divemode ; in dive mode? 273 btfss divemode ; in dive mode?
273 movwf CCP1CON ; NO - power-on backlight 274 movwf CCP1CON ; NO - power-on backlight
274 275
275 menu_vertical_loop: 276 menu_vertical_loop: