Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/customview.asm @ 476:7779bfa89171
Cave bailout prediction.
author | JeanDo |
---|---|
date | Sun, 09 Oct 2011 23:37:59 +0200 |
parents | deced1cacff7 |
children | fd8266b511cc |
comparison
equal
deleted
inserted
replaced
475:472bccc39aeb | 476:7779bfa89171 |
---|---|
75 bra customview_1sec_graphs ; Update the leading tissue | 75 bra customview_1sec_graphs ; Update the leading tissue |
76 dcfsnz WREG,F | 76 dcfsnz WREG,F |
77 bra customview_1sec_ead_end ; Show END and EAD in divemode | 77 bra customview_1sec_ead_end ; Show END and EAD in divemode |
78 dcfsnz WREG,F | 78 dcfsnz WREG,F |
79 bra customview_1sec_@5 ; Show TTS for extra time. | 79 bra customview_1sec_@5 ; Show TTS for extra time. |
80 dcfsnz WREG,F | |
81 bra customview_1sec_cave_bailout; Show Cave conso prediction. | |
80 | 82 |
81 ; Menupos3=0, do nothing | 83 ; Menupos3=0, do nothing |
82 return | 84 return |
83 | 85 |
84 customview_1sec_average: | 86 customview_1sec_average: |
115 goto PLED_show_end_ead_divemode | 117 goto PLED_show_end_ead_divemode |
116 | 118 |
117 customview_1sec_@5: | 119 customview_1sec_@5: |
118 goto PLED_show_@5 | 120 goto PLED_show_@5 |
119 | 121 |
122 customview_1sec_cave_bailout: | |
123 goto PLED_show_cave_bailout | |
124 | |
120 ;============================================================================= | 125 ;============================================================================= |
121 ; Do every-minute tasks for the custom view area | 126 ; Do every-minute tasks for the custom view area |
122 | 127 |
123 customview_minute: | 128 customview_minute: |
124 movff menupos3,WREG ; copy | 129 movff menupos3,WREG ; copy |
136 bra customview_minute_graphs ; Update the graphs | 141 bra customview_minute_graphs ; Update the graphs |
137 dcfsnz WREG,F | 142 dcfsnz WREG,F |
138 bra customview_minute_ead_end ; Show END and EAD in divemode | 143 bra customview_minute_ead_end ; Show END and EAD in divemode |
139 dcfsnz WREG,F | 144 dcfsnz WREG,F |
140 bra customview_minute_@5 ; Show TTS for extra time. | 145 bra customview_minute_@5 ; Show TTS for extra time. |
146 dcfsnz WREG,F | |
147 bra customview_minute_cave_bailout; Show Cave consomation prediction. | |
141 | 148 |
142 ; Menupos3=0, do nothing | 149 ; Menupos3=0, do nothing |
143 return | 150 return |
144 | 151 |
145 customview_minute_clock: | 152 customview_minute_clock: |
146 goto PLED_diveclock2 ; Update the clock | 153 goto PLED_diveclock2 ; Update the clock |
147 | 154 |
148 customview_minute_lead_tiss: | 155 customview_minute_lead_tiss: |
149 goto PLED_show_leading_tissue_2 ; Update the leading tissue | 156 goto PLED_show_leading_tissue_2 ; Update the leading tissue |
150 | 157 |
158 customview_minute_cave_bailout: ; Do nothing extra | |
151 customview_minute_@5: ; Do nothing extra | 159 customview_minute_@5: ; Do nothing extra |
152 customview_minute_ead_end: ; Do nothing extra | 160 customview_minute_ead_end: ; Do nothing extra |
153 customview_minute_marker: ; Do nothing extra | 161 customview_minute_marker: ; Do nothing extra |
154 customview_minute_stopwatch: ; Do nothing extra | 162 customview_minute_stopwatch: ; Do nothing extra |
155 customview_minute_average: ; Do nothing extra | 163 customview_minute_average: ; Do nothing extra |
165 | 173 |
166 btfsc FLAG_apnoe_mode ; In Apnoe mode? | 174 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
167 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely | 175 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely |
168 | 176 |
169 incf menupos3,F ; Number of customview to show | 177 incf menupos3,F ; Number of customview to show |
170 movlw d'8' ; Max number | 178 movlw d'9' ; Max number |
171 cpfsgt menupos3 ; Max reached? | 179 cpfsgt menupos3 ; Max reached? |
172 bra customview_mask ; No, show | 180 bra customview_mask ; No, show |
173 clrf menupos3 ; Reset to zero (Zero=no custom view) | 181 clrf menupos3 ; Reset to zero (Zero=no custom view) |
174 | 182 |
175 customview_mask: | 183 customview_mask: |
176 call PLED_clear_customview_divemode | 184 call PLED_clear_customview_divemode |
185 bcf tts_extra_time ; By default, CLEAR computation of @5 request. | |
186 | |
177 movff menupos3,WREG ; Menupos3 holds number of customview function | 187 movff menupos3,WREG ; Menupos3 holds number of customview function |
178 dcfsnz WREG,F | 188 dcfsnz WREG,F |
179 bra customview_init_stopwatch ; Show the Stopwatch | 189 bra customview_init_stopwatch ; 1: Show the Stopwatch |
180 dcfsnz WREG,F | 190 dcfsnz WREG,F |
181 bra customview_init_marker ; Show the Marker-Menu | 191 bra customview_init_marker ; 2: Show the Marker-Menu |
182 dcfsnz WREG,F | 192 dcfsnz WREG,F |
183 bra customview_init_clock ; Show the clock | 193 bra customview_init_clock ; 3: Show the clock |
184 dcfsnz WREG,F | 194 dcfsnz WREG,F |
185 bra customview_init_lead_tissue ; Show the leading tissue | 195 bra customview_init_lead_tissue ; 4: Show the leading tissue |
186 dcfsnz WREG,F | 196 dcfsnz WREG,F |
187 bra customview_init_average ; Show Total average depth | 197 bra customview_init_average ; 5: Show Total average depth |
188 dcfsnz WREG,F | 198 dcfsnz WREG,F |
189 bra customview_init_graphs ; Show the graphs | 199 bra customview_init_graphs ; 6: Show the graphs |
190 dcfsnz WREG,F | 200 dcfsnz WREG,F |
191 bra customview_init_ead_end ; Show END and EAD in divemode | 201 bra customview_init_ead_end ; 7: Show END and EAD in divemode |
192 dcfsnz WREG,F | 202 dcfsnz WREG,F |
193 bra customview_init_@5 ; Show TTS for extra time. | 203 bra customview_init_@5 ; 8: Show TTS for extra time. |
194 bcf tts_extra_time ; Else, CLEAR computation of @5 request. | 204 dcfsnz WREG,F |
205 bra customview_init_cave_bailout ; 9: Show Cave consomation prediction. | |
195 | 206 |
196 customview_init_nocustomview: | 207 customview_init_nocustomview: |
197 bra customview_toggle_exit | 208 bra customview_toggle_exit |
198 | 209 |
199 customview_init_average: | 210 customview_init_average: |
269 bsf tts_extra_time | 280 bsf tts_extra_time |
270 call PLED_show_@5 ; Show (wait) | 281 call PLED_show_@5 ; Show (wait) |
271 | 282 |
272 bra customview_toggle_exit | 283 bra customview_toggle_exit |
273 | 284 |
285 customview_init_cave_bailout: | |
286 GETCUSTOM15 d'59' ; Conso level warning set ? | |
287 movf lo,W | |
288 iorwf hi,W | |
289 bz customview_toggle ; No: jump to next Customview ! | |
290 | |
291 call PLED_show_cave_bailout | |
292 bra customview_toggle_exit | |
293 | |
274 customview_init_graphs: ; Show tissue graph | 294 customview_init_graphs: ; Show tissue graph |
275 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) | 295 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) |
276 decfsz WREG,F ; WREG=1? | 296 decfsz WREG,F ; WREG=1? |
277 bra customview_toggle ; No, use next Customview | 297 bra customview_toggle ; No, use next Customview |
278 | 298 |