Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/surfmode.asm @ 107:a2b9eca1f396
customview for the surfacemode
author | heinrichsweikamp |
---|---|
date | Mon, 20 Dec 2010 18:30:16 +0100 |
parents | db4a20b413df |
children | 8aa8acada0fd |
comparison
equal
deleted
inserted
replaced
106:966ebf905514 | 107:a2b9eca1f396 |
---|---|
49 | 49 |
50 ; Startup tasks for decompression modes | 50 ; Startup tasks for decompression modes |
51 call PLED_display_cns_surface ; Update surface CNS display (If allowed by CF15) | 51 call PLED_display_cns_surface ; Update surface CNS display (If allowed by CF15) |
52 call PLED_desaturation_time ; display desaturation time | 52 call PLED_desaturation_time ; display desaturation time |
53 call PLED_nofly_time ; display nofly time | 53 call PLED_nofly_time ; display nofly time |
54 | |
55 btfss pre_dive_screen ; Show predive screen | |
56 call PLED_tissue_saturation_graph ; no, display saturation graph | |
57 btfsc pre_dive_screen ; Show predive screen | |
58 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen | |
59 | 54 |
60 call PLED_active_gas_surfmode ; Show start gas | 55 call PLED_active_gas_surfmode ; Show start gas |
61 call PLED_display_decotype_surface ; Show deco mode (ZH-L16, const. ppO2 or Multi-GF) | 56 call PLED_display_decotype_surface ; Show deco mode (ZH-L16, const. ppO2 or Multi-GF) |
62 | 57 |
63 surfloop1: | 58 surfloop1: |
132 call update_batt_voltage ; display battery voltage | 127 call update_batt_voltage ; display battery voltage |
133 call timeout_premenu ; timeout premenu | 128 call timeout_premenu ; timeout premenu |
134 call set_leds_surfmode ; Sets Warning and No-Fly LEDs | 129 call set_leds_surfmode ; Sets Warning and No-Fly LEDs |
135 call check_customfunctions ; Checks CF functions and displays warning symbol if something critical is wrong | 130 call check_customfunctions ; Checks CF functions and displays warning symbol if something critical is wrong |
136 call PLED_display_decotype_surface ; Show deco mode | 131 call PLED_display_decotype_surface ; Show deco mode |
132 call surfcustomview_second ; Do every-second tasks for the custom view area | |
137 btfsc enter_error_sleep ; Enter Fatal Error Routine? | 133 btfsc enter_error_sleep ; Enter Fatal Error Routine? |
138 call fatal_error_sleep ; Yes (In Sleepmode.asm!) | 134 call fatal_error_sleep ; Yes (In Sleepmode.asm!) |
139 bcf onesecupdate ; every second tasks done | 135 bcf onesecupdate ; every second tasks done |
140 | 136 |
141 surfloop_loop2: | 137 surfloop_loop2: |
160 goto menu ; Menu! | 156 goto menu ; Menu! |
161 btfsc divemode ; Divemode active? | 157 btfsc divemode ; Divemode active? |
162 goto diveloop ; Yes, switch into Divemode! | 158 goto diveloop ; Yes, switch into Divemode! |
163 btfsc sleepmode ; Sleepmode active? | 159 btfsc sleepmode ; Sleepmode active? |
164 goto sleeploop ; Yes, switch into sleepmode! | 160 goto sleeploop ; Yes, switch into sleepmode! |
161 | |
162 btfsc toggle_customview ; Next view? | |
163 call surfcustomview_toggle ; Yes, show next customview (and delete this flag) | |
164 | |
165 ; Check for the different UART flags | 165 ; Check for the different UART flags |
166 btfsc dump_external_eeprom ; Start interface (dumps EEPROM BANK 0 + additional data)? | 166 btfsc dump_external_eeprom ; Start interface (dumps EEPROM BANK 0 + additional data)? |
167 goto menu_interface ; Yes! | 167 goto menu_interface ; Yes! |
168 btfsc uart_settime ; Sync clock with PC? | 168 btfsc uart_settime ; Sync clock with PC? |
169 goto sync_clock ; Yes! | 169 goto sync_clock ; Yes! |
191 call update_date ; and date in divemode | 191 call update_date ; and date in divemode |
192 call calc_deko_surfmode ; calculate desaturation every minute | 192 call calc_deko_surfmode ; calculate desaturation every minute |
193 call check_temp_extrema ; check for new temperature extremas | 193 call check_temp_extrema ; check for new temperature extremas |
194 call PLED_custom_text ; Displays custom text | 194 call PLED_custom_text ; Displays custom text |
195 call calc_surface_interval ; Increases Surface-Interval time | 195 call calc_surface_interval ; Increases Surface-Interval time |
196 call surfcustomview_minute ; Do every-minute tasks for the custom view area | |
196 | 197 |
197 btfsc gauge_mode ; Ignore in gauge mode | 198 btfsc gauge_mode ; Ignore in gauge mode |
198 bra update_surfloop60_2 | 199 bra update_surfloop60_2 |
199 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode | 200 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode |
200 bra update_surfloop60_2 | 201 bra update_surfloop60_2 |
203 call PLED_display_cns_surface ; Update surface CNS display (If allowed by CF15) | 204 call PLED_display_cns_surface ; Update surface CNS display (If allowed by CF15) |
204 call PLED_nofly_time ; display nofly time | 205 call PLED_nofly_time ; display nofly time |
205 call PLED_desaturation_time ; display desaturation time | 206 call PLED_desaturation_time ; display desaturation time |
206 btfsc premenu ; Not when "Menu?" is displayed! | 207 btfsc premenu ; Not when "Menu?" is displayed! |
207 bra update_surfloop60_2 | 208 bra update_surfloop60_2 |
208 | |
209 btfss pre_dive_screen ; Show predive screen | |
210 call PLED_tissue_saturation_graph ; no, display saturation graph | |
211 btfsc pre_dive_screen ; Show predive screen | |
212 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen | |
213 | 209 |
214 update_surfloop60_2: | 210 update_surfloop60_2: |
215 call nofly_timeout60 ; checks if nofly time is > 0 | 211 call nofly_timeout60 ; checks if nofly time is > 0 |
216 bcf oneminupdate | 212 bcf oneminupdate |
217 return | 213 return |
406 btfsc gauge_mode | 402 btfsc gauge_mode |
407 bra timeout_premenu2 ; Skip in Gauge mode | 403 bra timeout_premenu2 ; Skip in Gauge mode |
408 btfsc FLAG_apnoe_mode | 404 btfsc FLAG_apnoe_mode |
409 bra timeout_premenu2 ; Skip in Apnoe mode | 405 bra timeout_premenu2 ; Skip in Apnoe mode |
410 | 406 |
411 btfss pre_dive_screen ; Show predive screen | |
412 call PLED_tissue_saturation_graph ; no, display saturation graph | |
413 btfsc pre_dive_screen ; Show predive screen | |
414 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen | |
415 | |
416 timeout_premenu2: | 407 timeout_premenu2: |
417 call update_surf_press ; rewrite serial number | 408 call update_surf_press ; rewrite serial number |
418 call PLED_serial ; rewrite serial number | 409 call PLED_serial ; rewrite serial number |
419 clrf timeout_counter3 ; Also clear timeout | 410 clrf timeout_counter3 ; Also clear timeout |
420 bcf switch_left ; and debounce switches | 411 bcf switch_left ; and debounce switches |
452 bra test_switches_surfmode4 | 443 bra test_switches_surfmode4 |
453 bsf menubit ; Enter Menu! | 444 bsf menubit ; Enter Menu! |
454 return | 445 return |
455 | 446 |
456 test_switches_surfmode4: | 447 test_switches_surfmode4: |
457 btg pre_dive_screen | 448 bsf toggle_customview ; Toggle customview (Cleared in customview.asm) |
458 | |
459 btfss pre_dive_screen ; Show predive screen | |
460 call PLED_tissue_saturation_graph ; no, display saturation graph | |
461 btfsc pre_dive_screen ; Show predive screen | |
462 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen | |
463 | |
464 return | 449 return |
465 | 450 |
466 timeout_surfmode: | 451 timeout_surfmode: |
467 incf timeout_counter2,F ; increase timeout counter | 452 incf timeout_counter2,F ; increase timeout counter |
468 GETCUSTOM8 d'3' ; loads surfloop_timeout into WREG | 453 GETCUSTOM8 d'3' ; loads surfloop_timeout into WREG |