comparison code_part1/OSTC_code_asm_part1/customview.asm @ 137:e6aa4a74c3c2

Fix: Customviews for Apnoe and Gauge mode
author mh <>
date Wed, 05 Jan 2011 20:44:10 +0100
parents 48f12271eb18
children fc699a7460e6
comparison
equal deleted inserted replaced
136:20b2c77a6cd2 137:e6aa4a74c3c2
126 call PLED_tissue_saturation_graph 126 call PLED_tissue_saturation_graph
127 return 127 return
128 128
129 customview_minute_marker: ; Do nothing extra 129 customview_minute_marker: ; Do nothing extra
130 customview_minute_stopwatch: ; Do nothing extra 130 customview_minute_stopwatch: ; Do nothing extra
131 customview_minute_average: ; Do nothing extra 131 customview_minute_average: ; Do nothing extra
132 return 132 return
133 133
134 ;============================================================================= 134 ;=============================================================================
135 ; Yes, show next customview (and delete this flag) 135 ; Yes, show next customview (and delete this flag)
136 136
137 customview_toggle: 137 customview_toggle:
138 ostc_debug 'X' ; Sends debug-information to screen if debugmode active 138 ostc_debug 'X' ; Sends debug-information to screen if debugmode active
139
140 btfsc FLAG_apnoe_mode ; In Apnoe mode?
141 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely
142
139 incf menupos3,F ; Number of customview to show 143 incf menupos3,F ; Number of customview to show
140 movlw d'6' ; Max number 144 movlw d'6' ; Max number
141 cpfsgt menupos3 ; Max reached? 145 cpfsgt menupos3 ; Max reached?
142 bra customview_mask ; No, show 146 bra customview_mask ; No, show
143 clrf menupos3 ; Reset to zero (Zero=no custom view) 147 clrf menupos3 ; Reset to zero (Zero=no custom view)
144 customview_mask: 148 customview_mask:
145 call PLED_clear_customview_divemode 149 call PLED_clear_customview_divemode
188 customview_init_lead_tissue: ; Show leading tissue 192 customview_init_lead_tissue: ; Show leading tissue
189 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG) 193 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG)
190 decfsz WREG,F ; WREG=1? 194 decfsz WREG,F ; WREG=1?
191 bra customview_toggle ; No, use next Customview 195 bra customview_toggle ; No, use next Customview
192 196
197 btfsc no_deco_customviews ; no-deco-mode-flag = 1
198 bra customview_toggle ; Yes, use next Customview!
199
193 call PLED_show_leading_tissue 200 call PLED_show_leading_tissue
194 bra customview_toggle_exit 201 bra customview_toggle_exit
195 202
196 customview_init_graphs: ; Show tissue graph 203 customview_init_graphs: ; Show tissue graph
197 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) 204 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG)
198 decfsz WREG,F ; WREG=1? 205 decfsz WREG,F ; WREG=1?
199 bra customview_toggle ; No, use next Customview 206 bra customview_toggle ; No, use next Customview
207
208 btfsc no_deco_customviews ; no-deco-mode-flag = 1
209 bra customview_toggle ; Yes, use next Customview!
200 210
201 call deco_calc_desaturation_time ; calculate desaturation time 211 call deco_calc_desaturation_time ; calculate desaturation time
202 movlb b'00000001' ; select ram bank 1 212 movlb b'00000001' ; select ram bank 1
203 call PLED_tissue_saturation_graph 213 call PLED_tissue_saturation_graph
204 bra customview_toggle_exit 214 bra customview_toggle_exit
230 240
231 surfcustomview_init_nocustomview: 241 surfcustomview_init_nocustomview:
232 bra surfcustomview_toggle_exit 242 bra surfcustomview_toggle_exit
233 243
234 surfcustomview_init_graphs: 244 surfcustomview_init_graphs:
245 btfsc no_deco_customviews ; no-deco-mode-flag = 1
246 bra surfcustomview_toggle ; Yes, use next Customview!
247
235 call PLED_tissue_saturation_graph; Draw the graphs 248 call PLED_tissue_saturation_graph; Draw the graphs
236 bra surfcustomview_toggle_exit 249 bra surfcustomview_toggle_exit
237 250
238 surfcustomview_init_gaslist: 251 surfcustomview_init_gaslist:
252 btfsc no_deco_customviews ; no-deco-mode-flag = 1
253 bra surfcustomview_toggle ; Yes, use next Customview!
254
239 call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list 255 call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list
240 bra surfcustomview_toggle_exit 256 bra surfcustomview_toggle_exit
241 257
242 surfcustomview_init_interval: 258 surfcustomview_init_interval:
243 call PLED_standard_color 259 call PLED_standard_color
284 ; bra surfcustomview_1sec_cfview ; Update the critical cf view 300 ; bra surfcustomview_1sec_cfview ; Update the critical cf view
285 ; ; Menupos3=0, do nothing 301 ; ; Menupos3=0, do nothing
286 ; return 302 ; return
287 ;surfcustomview_1sec_cfview: ; Do nothing extra 303 ;surfcustomview_1sec_cfview: ; Do nothing extra
288 ;surfcustomview_1sec_graphs: ; Do nothing extra 304 ;surfcustomview_1sec_graphs: ; Do nothing extra
289 ;surfcustomview_1sec_gaslist: ; Do nothing extra 305 ;surfcustomview_1sec_gaslist: ; Do nothing extra
290 ;surfcustomview_1sec_interval: ; Do nothing extra 306 ;surfcustomview_1sec_interval: ; Do nothing extra
291 return 307 return
292 308
293 ;============================================================================= 309 ;=============================================================================
294 310
295 surfcustomview_minute: ; Do every-minute tasks for the custom view area 311 surfcustomview_minute: ; Do every-minute tasks for the custom view area
299 dcfsnz WREG,F 315 dcfsnz WREG,F
300 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List 316 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List
301 dcfsnz WREG,F 317 dcfsnz WREG,F
302 bra surfcustomview_minute_interval ; Update the Interval display 318 bra surfcustomview_minute_interval ; Update the Interval display
303 dcfsnz WREG,F 319 dcfsnz WREG,F
304 bra surfcustomview_minute_cfview ; Update the critical cf view 320 bra surfcustomview_minute_cfview ; Update the critical cf view
305 ; Menupos3=0, do nothing 321 ; Menupos3=0, do nothing
306 return 322 return
307 323
308 surfcustomview_minute_graphs: 324 surfcustomview_minute_graphs:
309 call PLED_tissue_saturation_graph ; Draw/Update the graphs 325 call PLED_tissue_saturation_graph ; Draw/Update the graphs