comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 277:46d1012d096a

Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
author heinrichsweikamp
date Mon, 18 Apr 2011 10:23:22 +0200
parents a728b4a1b660
children 8514588eb6a2
comparison
equal deleted inserted replaced
276:02303915c199 277:46d1012d096a
399 PLED_clear_decoarea: 399 PLED_clear_decoarea:
400 WIN_BOX_BLACK .54, .168, .90, .159 ;top, bottom, left, right 400 WIN_BOX_BLACK .54, .168, .90, .159 ;top, bottom, left, right
401 return 401 return
402 402
403 PLED_display_ndl_mask: 403 PLED_display_ndl_mask:
404 btfsc menubit ; Divemode menu active?
405 return ; Yes, return
406
404 ; Clear Dekostop and Dekosum 407 ; Clear Dekostop and Dekosum
405 rcall PLED_clear_decoarea 408 rcall PLED_clear_decoarea
406 409
407 call PLED_divemask_color ; Set Color for Divemode mask 410 call PLED_divemask_color ; Set Color for Divemode mask
408 DISPLAYTEXT d'84' ; NoStop 411 DISPLAYTEXT d'84' ; NoStop
436 439
437 WIN_FONT FT_SMALL 440 WIN_FONT FT_SMALL
438 return 441 return
439 442
440 PLED_display_deko_mask: 443 PLED_display_deko_mask:
441 rcall PLED_clear_decoarea 444 btfsc menubit ; Divemode menu active?
442 ; total deco time word 445 return ; Yes, return
443 call PLED_divemask_color ; Set Color for Divemode mask 446
444 DISPLAYTEXT d'85' ; TTS 447 rcall PLED_clear_decoarea
445 call PLED_standard_color 448 ; total deco time word
446 return 449 call PLED_divemask_color ; Set Color for Divemode mask
450 DISPLAYTEXT d'85' ; TTS
451 call PLED_standard_color
452 return
447 453
448 PLED_display_deko: 454 PLED_display_deko:
449 btfsc menubit ; Divemode menu active? 455 btfsc menubit ; Divemode menu active?
450 bra PLED_display_deko1 ; Yes, do not display deco, only GF (if required) 456 bra PLED_display_deko1 ; Yes, do not display deco, only GF (if required)
451 457
3049 STRCAT_PRINT "EAD:" 3055 STRCAT_PRINT "EAD:"
3050 WIN_LEFT .95 3056 WIN_LEFT .95
3051 WIN_TOP .216 3057 WIN_TOP .216
3052 lfsr FSR2,letter 3058 lfsr FSR2,letter
3053 STRCAT_PRINT "END:" 3059 STRCAT_PRINT "END:"
3060 call PLED_standard_color
3061
3062 btfss FLAG_const_ppO2_mode ; are we in ppO2 mode?
3063 bra PLED_show_end_ead_divemode2 ; no, show OC EAD and END
3064
3065 ; We are in CCR mode...
3066 btfss is_bailout ; In bailout mode?
3067 bra PLED_show_end_ead_divemode3 ; No, show CC EAD and END
3068
3069 PLED_show_end_ead_divemode2: ; Show OC EAD and END
3054 ; Show EAD: char_I_N2_ratio/0.79*rel_pressure:2*10 -> char_I_N2_ratio*rel_pressure:2/7900 -> EAD in m 3070 ; Show EAD: char_I_N2_ratio/0.79*rel_pressure:2*10 -> char_I_N2_ratio*rel_pressure:2/7900 -> EAD in m
3055 call PLED_standard_color
3056 WIN_LEFT .125 3071 WIN_LEFT .125
3057 WIN_TOP .192 3072 WIN_TOP .192
3058 movff char_I_N2_ratio,xA+0 3073 movff char_I_N2_ratio,xA+0
3059 clrf xA+1 3074 clrf xA+1
3060 movff rel_pressure+0,xB+0 3075 movff rel_pressure+0,xB+0
3091 movff xC+0,lo 3106 movff xC+0,lo
3092 movff xC+1,hi ; lo:hi now hold END in m 3107 movff xC+1,hi ; lo:hi now hold END in m
3093 lfsr FSR2,letter 3108 lfsr FSR2,letter
3094 output_16_3 3109 output_16_3
3095 STRCAT_PRINT "m" ; Display END 3110 STRCAT_PRINT "m" ; Display END
3111 return
3112
3113 PLED_show_end_ead_divemode3: ; Show CC EAD and END
3114 ; ToDo...
3096 return 3115 return
3097 3116
3098 3117
3099 PLED_show_leading_tissue: 3118 PLED_show_leading_tissue:
3100 call PLED_divemask_color ; Set Color for Divemode mask 3119 call PLED_divemask_color ; Set Color for Divemode mask