comparison code_part1/OSTC_code_asm_part1/surfmode.asm @ 13:3b30cd739782

1.53 beta rc2
author heinrichsweikamp
date Thu, 25 Mar 2010 22:16:19 +0100
parents 2b5c52ae3923
children 01510acaeb11
comparison
equal deleted inserted replaced
12:588a969a0cae 13:3b30cd739782
48 bra surfloop1 48 bra surfloop1
49 49
50 ; Startup tasks for decompression modes 50 ; Startup tasks for decompression modes
51 call PLED_desaturation_time ; display desaturation time 51 call PLED_desaturation_time ; display desaturation time
52 call PLED_nofly_time ; display nofly time 52 call PLED_nofly_time ; display nofly time
53 call PLED_tissue_saturation_graph ; display saturation graph 53
54 btfss pre_dive_screen ; Show predive screen
55 call PLED_tissue_saturation_graph ; no, display saturation graph
56 btfsc pre_dive_screen ; Show predive screen
57 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen
58
54 call PLED_active_gas_surfmode ; Show start gas 59 call PLED_active_gas_surfmode ; Show start gas
55 call PLED_display_decotype_surface ; Show deco mode (ZH-L16, const. ppO2 or Multi-GF) 60 call PLED_display_decotype_surface ; Show deco mode (ZH-L16, const. ppO2 or Multi-GF)
56 61
57 surfloop1: 62 surfloop1:
58 btfss gauge_mode ; Display only in gauge mode 63 btfss gauge_mode ; Display only in gauge mode
198 bra update_surfloop60_2 203 bra update_surfloop60_2
199 204
200 ; One Minute tasks for deco modes 205 ; One Minute tasks for deco modes
201 call PLED_nofly_time ; display nofly time 206 call PLED_nofly_time ; display nofly time
202 call PLED_desaturation_time ; display desaturation time 207 call PLED_desaturation_time ; display desaturation time
203 btfss premenu ; Not when "Menu?" is displayed! 208 btfsc premenu ; Not when "Menu?" is displayed!
204 call PLED_tissue_saturation_graph; display saturation graph 209 bra update_surfloop60_2
210
211 btfss pre_dive_screen ; Show predive screen
212 call PLED_tissue_saturation_graph ; no, display saturation graph
213 btfsc pre_dive_screen ; Show predive screen
214 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen
205 215
206 update_surfloop60_2: 216 update_surfloop60_2:
207 call nofly_timeout60 ; checks if nofly time is > 0 217 call nofly_timeout60 ; checks if nofly time is > 0
208 bcf oneminupdate 218 bcf oneminupdate
209 return 219 return
397 407
398 btfsc gauge_mode 408 btfsc gauge_mode
399 bra timeout_premenu2 ; Skip in Gauge mode 409 bra timeout_premenu2 ; Skip in Gauge mode
400 btfsc FLAG_apnoe_mode 410 btfsc FLAG_apnoe_mode
401 bra timeout_premenu2 ; Skip in Apnoe mode 411 bra timeout_premenu2 ; Skip in Apnoe mode
402 call PLED_tissue_saturation_graph ; rewrite graph 412
413 btfss pre_dive_screen ; Show predive screen
414 call PLED_tissue_saturation_graph ; no, display saturation graph
415 btfsc pre_dive_screen ; Show predive screen
416 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen
417
403 timeout_premenu2: 418 timeout_premenu2:
404 call update_surf_press ; rewrite serial number 419 call update_surf_press ; rewrite serial number
405 call PLED_serial ; rewrite serial number 420 call PLED_serial ; rewrite serial number
406 clrf timeout_counter3 ; Also clear timeout 421 clrf timeout_counter3 ; Also clear timeout
407 bcf switch_left ; and debounce switches 422 bcf switch_left ; and debounce switches
434 return 449 return
435 450
436 test_switches_surfmode2: 451 test_switches_surfmode2:
437 bcf switch_left 452 bcf switch_left
438 btfss premenu 453 btfss premenu
439 return 454 bra test_switches_surfmode4
440 bsf menubit ; Enter Menu! 455 bsf menubit ; Enter Menu!
441 return 456 return
442 457
443 458 test_switches_surfmode4:
459 btg pre_dive_screen
460
461 btfss pre_dive_screen ; Show predive screen
462 call PLED_tissue_saturation_graph ; no, display saturation graph
463 btfsc pre_dive_screen ; Show predive screen
464 call PLED_pre_dive_screen ; yes, display Pre-Dive Screen
465
466 return
444 467
445 timeout_surfmode: 468 timeout_surfmode:
446 incf timeout_counter2,F ; increase timeout counter 469 incf timeout_counter2,F ; increase timeout counter
447 GETCUSTOM8 d'3' ; loads surfloop_timeout into WREG 470 GETCUSTOM8 d'3' ; loads surfloop_timeout into WREG
448 addlw d'5' ; adds five seconds in case timout=zero! 471 addlw d'5' ; adds five seconds in case timout=zero!