comparison code_part1/OSTC_code_asm_part1/customview.asm @ 552:44e9b961f156

Compute ppO2 for pSCR diving
author heinrichsweikamp
date Sat, 04 Feb 2012 18:23:36 +0100
parents 9fc8feff27a5
children cda5b45b953f
comparison
equal deleted inserted replaced
551:c67bf1ca73ef 552:44e9b961f156
87 bra customview_1sec_ead_end ; Show END and EAD in divemode 87 bra customview_1sec_ead_end ; Show END and EAD in divemode
88 dcfsnz WREG,F 88 dcfsnz WREG,F
89 bra customview_1sec_@5 ; Show TTS for extra time. 89 bra customview_1sec_@5 ; Show TTS for extra time.
90 dcfsnz WREG,F 90 dcfsnz WREG,F
91 bra customview_1sec_cave_bailout; Show Cave conso prediction. 91 bra customview_1sec_cave_bailout; Show Cave conso prediction.
92 92 dcfsnz WREG,F
93 bra customview_1sec_pSCR_ppO2 ; Show/Update pSCR ppO2
93 ; Menupos3=0, do nothing 94 ; Menupos3=0, do nothing
94 return 95 return
95 96
96 customview_1sec_average: 97 customview_1sec_average:
97 goto PLED_total_average_show2 ; Update the figures only 98 goto PLED_total_average_show2 ; Update the figures only
131 132
132 customview_1sec_cave_bailout: 133 customview_1sec_cave_bailout:
133 bsf menu3_active ; Set Flag 134 bsf menu3_active ; Set Flag
134 goto PLED_show_cave_bailout 135 goto PLED_show_cave_bailout
135 136
137 customview_1sec_pSCR_ppO2:
138 goto PLED_show_pSCR_ppO2 ; Yes, compute and show value
139
140
136 ;============================================================================= 141 ;=============================================================================
137 ; Do every-minute tasks for the custom view area 142 ; Do every-minute tasks for the custom view area
138 143
139 customview_minute: 144 customview_minute:
140 movff menupos3,WREG ; copy 145 movff menupos3,WREG ; copy
154 bra customview_minute_ead_end ; Show END and EAD in divemode 159 bra customview_minute_ead_end ; Show END and EAD in divemode
155 dcfsnz WREG,F 160 dcfsnz WREG,F
156 bra customview_minute_@5 ; Show TTS for extra time. 161 bra customview_minute_@5 ; Show TTS for extra time.
157 dcfsnz WREG,F 162 dcfsnz WREG,F
158 bra customview_minute_cave_bailout; Show Cave consomation prediction. 163 bra customview_minute_cave_bailout; Show Cave consomation prediction.
164 dcfsnz WREG,F
165 bra customview_minute_pSCR_ppO2; Show pSCR ppO2 level
159 166
160 ; Menupos3=0, do nothing 167 ; Menupos3=0, do nothing
161 return 168 return
162 169
163 customview_minute_clock: 170 customview_minute_clock:
171 customview_minute_ead_end: ; Do nothing extra 178 customview_minute_ead_end: ; Do nothing extra
172 customview_minute_marker: ; Do nothing extra 179 customview_minute_marker: ; Do nothing extra
173 customview_minute_stopwatch: ; Do nothing extra 180 customview_minute_stopwatch: ; Do nothing extra
174 customview_minute_average: ; Do nothing extra 181 customview_minute_average: ; Do nothing extra
175 customview_minute_graphs: ; Do nothing extra 182 customview_minute_graphs: ; Do nothing extra
183 customview_minute_pSCR_ppO2: ; Do nothing extra
176 return 184 return
177 185
178 ;============================================================================= 186 ;=============================================================================
179 ; Show next customview (and delete this flag) 187 ; Show next customview (and delete this flag)
180 188
184 192
185 btfsc FLAG_apnoe_mode ; In Apnoe mode? 193 btfsc FLAG_apnoe_mode ; In Apnoe mode?
186 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely 194 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely
187 195
188 incf menupos3,F ; Number of customview to show 196 incf menupos3,F ; Number of customview to show
189 movlw d'9' ; Max number 197 movlw d'10' ; Max number
190 cpfsgt menupos3 ; Max reached? 198 cpfsgt menupos3 ; Max reached?
191 bra customview_mask ; No, show 199 bra customview_mask ; No, show
192 clrf menupos3 ; Reset to zero (Zero=no custom view) 200 clrf menupos3 ; Reset to zero (Zero=no custom view)
193 201
194 customview_mask: 202 customview_mask:
212 bra customview_init_ead_end ; 7: Show END and EAD in divemode 220 bra customview_init_ead_end ; 7: Show END and EAD in divemode
213 dcfsnz WREG,F 221 dcfsnz WREG,F
214 bra customview_init_@5 ; 8: Show TTS for extra time. 222 bra customview_init_@5 ; 8: Show TTS for extra time.
215 dcfsnz WREG,F 223 dcfsnz WREG,F
216 bra customview_init_cave_bailout ; 9: Show Cave consomation prediction. 224 bra customview_init_cave_bailout ; 9: Show Cave consomation prediction.
225 dcfsnz WREG,F
226 bra customview_init_pSCR_ppo2 ; 10: Show ppO2 for pSCR users
217 227
218 customview_init_nocustomview: 228 customview_init_nocustomview:
219 bra customview_toggle_exit 229 bra customview_toggle_exit
220 230
221 customview_init_average: 231 customview_init_average:
316 326
317 call deco_calc_desaturation_time ; calculate desaturation time 327 call deco_calc_desaturation_time ; calculate desaturation time
318 movlb b'00000001' ; select ram bank 1 328 movlb b'00000001' ; select ram bank 1
319 call PLED_tissue_saturation_graph 329 call PLED_tissue_saturation_graph
320 330
331 bra customview_toggle_exit
332
333 customview_init_pSCR_ppo2:
334 GETCUSTOM8 d'61' ; Show pSCR ppO2?
335 decfsz WREG,F ; WREG=1?
336 bra customview_toggle ; No, use next Customview
337
338 call PLED_show_pSCR_ppO2 ; Yes, compute and show value
339
321 bra customview_toggle_exit 340 bra customview_toggle_exit
322 341
323 customview_toggle_exit: 342 customview_toggle_exit:
324 bcf toggle_customview ; Clear flag 343 bcf toggle_customview ; Clear flag
325 ostc_debug 'Y' ; Sends debug-information to screen in debugmode 344 ostc_debug 'Y' ; Sends debug-information to screen in debugmode