comparison code_part1/OSTC_code_asm_part1/customview.asm @ 479:9fc8feff27a5

Enable reset in cave bailout prediction, by using chrono average depth.
author JeanDo
date Thu, 13 Oct 2011 01:59:59 +0200
parents fd8266b511cc
children 44e9b961f156
comparison
equal deleted inserted replaced
478:fd8266b511cc 479:9fc8feff27a5
25 ; ToDo: 25 ; ToDo:
26 26
27 ;============================================================================= 27 ;=============================================================================
28 ; Show the customview-dependent entry for the divemode menu 28 ; Show the customview-dependent entry for the divemode menu
29 ; 29 ;
30 customview_menu_entry3: 30 customview_menu_entry3:
31 ; bcf menu3_active ;=1: menu entry three in divemode menu is active
32
33 movff menupos3,WREG ; copy 31 movff menupos3,WREG ; copy
34 dcfsnz WREG,F 32 dcfsnz WREG,F
35 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu 33 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu
36 dcfsnz WREG,F 34 dcfsnz WREG,F
37 bra customview_menu3_marker ; Show the marker option in divemode menu 35 bra customview_menu3_marker ; Show the marker option in divemode menu
38 dcfsnz WREG,F 36 dcfsnz WREG,F
39 bra customview_menu3_clock ; Show the clock option in divemode menu 37 bra customview_menu3_clock ; Show nothing
40 dcfsnz WREG,F 38 dcfsnz WREG,F
41 bra customview_menu3_lead_tiss ; Show the leading tissue option in divemode menu 39 bra customview_menu3_lead_tiss ; Show nothing
42 ; Menupos3=0, do nothing 40 dcfsnz WREG,F
43 return 41 bra customview_menu3_average ; Show nothing
44 42 dcfsnz WREG,F
43 bra customview_menu3_graphs ; Show nothing
44 dcfsnz WREG,F
45 bra customview_menu3_ead_end ; Show nothing
46 dcfsnz WREG,F
47 bra customview_menu3_@5 ; Show nothing
48 dcfsnz WREG,F
49 bra customview_menu3_cave_bailout; Show reset option
50 return
51
52 customview_menu3_cave_bailout:
45 customview_menu3_stopwatch: 53 customview_menu3_stopwatch:
46 ; bsf menu3_active ; Set Flag
47 DISPLAYTEXT .33 ; ResetAvr 54 DISPLAYTEXT .33 ; ResetAvr
48 return 55 return
49 56
50 customview_menu3_marker: 57 customview_menu3_marker:
51 ; bsf menu3_active ; Set Flag
52 DISPLAYTEXT .30 ; Set Marker 58 DISPLAYTEXT .30 ; Set Marker
53 return 59 return
54 60
55 customview_menu3_clock: ; No menu entry 61 customview_menu3_clock: ; No menu entry
56 customview_menu3_lead_tiss ; No menu entry 62 customview_menu3_lead_tiss:
63 customview_menu3_average:
64 customview_menu3_graphs:
65 customview_menu3_ead_end:
66 customview_menu3_@5:
57 return 67 return
58 68
59 ;============================================================================= 69 ;=============================================================================
60 ; Do every-second tasks for the custom view area 70 ; Do every-second tasks for the custom view area
61 71
118 128
119 customview_1sec_@5: 129 customview_1sec_@5:
120 goto PLED_show_@5 130 goto PLED_show_@5
121 131
122 customview_1sec_cave_bailout: 132 customview_1sec_cave_bailout:
133 bsf menu3_active ; Set Flag
123 goto PLED_show_cave_bailout 134 goto PLED_show_cave_bailout
124 135
125 ;============================================================================= 136 ;=============================================================================
126 ; Do every-minute tasks for the custom view area 137 ; Do every-minute tasks for the custom view area
127 138
166 177
167 ;============================================================================= 178 ;=============================================================================
168 ; Show next customview (and delete this flag) 179 ; Show next customview (and delete this flag)
169 180
170 customview_toggle: 181 customview_toggle:
171 bcf menu3_active ;=1: menu entry three in divemode menu is active 182 bcf menu3_active ;=1: menu entry three in divemode menu is active
172 ostc_debug 'X' ; Sends debug-information to screen if debugmode active 183 ostc_debug 'X' ; Sends debug-information to screen if debugmode active
173 184
174 btfsc FLAG_apnoe_mode ; In Apnoe mode? 185 btfsc FLAG_apnoe_mode ; In Apnoe mode?
175 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely 186 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely
176 187
236 decfsz WREG,F ; WREG=1? 247 decfsz WREG,F ; WREG=1?
237 bra customview_toggle ; No, use next Customview 248 bra customview_toggle ; No, use next Customview
238 249
239 call PLED_standard_color 250 call PLED_standard_color
240 DISPLAYTEXT d'151' ; Set Marker? 251 DISPLAYTEXT d'151' ; Set Marker?
241 bsf menu3_active ; Set Flag 252 bsf menu3_active ; Set Flag
242 bra customview_toggle_exit 253 bra customview_toggle_exit
243 254
244 customview_init_clock: ; Init Clock 255 customview_init_clock: ; Init Clock
245 call PLED_diveclock 256 call PLED_diveclock
246 bra customview_toggle_exit 257 bra customview_toggle_exit
286 GETCUSTOM15 d'59' ; Conso level warning set ? 297 GETCUSTOM15 d'59' ; Conso level warning set ?
287 movf lo,W 298 movf lo,W
288 iorwf hi,W 299 iorwf hi,W
289 bz customview_toggle ; No: jump to next Customview ! 300 bz customview_toggle ; No: jump to next Customview !
290 301
302 bsf menu3_active ; Set Flag
291 call PLED_show_cave_bailout 303 call PLED_show_cave_bailout
292 bra customview_toggle_exit 304 bra customview_toggle_exit
293 305
294 customview_init_graphs: ; Show tissue graph 306 customview_init_graphs: ; Show tissue graph
295 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) 307 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG)