comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 307:5bc3467fc421

New live EAD/END in divemode (both OCR and CCR).
author JeanDo
date Sun, 01 May 2011 03:35:42 +0200
parents 77c70898c7aa
children 2f21f7a77608
comparison
equal deleted inserted replaced
306:ab1678d98e46 307:5bc3467fc421
3057 bcf leftbind 3057 bcf leftbind
3058 call word_processor 3058 call word_processor
3059 call PLED_standard_color 3059 call PLED_standard_color
3060 return 3060 return
3061 3061
3062 ;=============================================================================
3063 ; Display EAD/END computed in calc_hauptroutine_update_tissues() every 2sec.
3064 ;
3062 PLED_show_end_ead_divemode: 3065 PLED_show_end_ead_divemode:
3066 call PLED_divemask_color ; Set Color for Divemode mask
3067
3068 WIN_FONT FT_SMALL
3063 WIN_LEFT .95 3069 WIN_LEFT .95
3064 WIN_TOP .192 3070 WIN_TOP .192
3065 WIN_FONT FT_SMALL 3071 lfsr FSR2,letter
3066 call PLED_divemask_color ; Set Color for Divemode mask 3072 OUTPUTTEXTH .299 ; EAD:
3067 lfsr FSR2,letter 3073 call word_processor
3068 OUTPUTTEXTH .299 ; EAD: 3074
3069 call word_processor
3070 WIN_LEFT .95
3071 WIN_TOP .216 3075 WIN_TOP .216
3072 lfsr FSR2,letter 3076 lfsr FSR2,letter
3073 OUTPUTTEXTH .298 ; END: 3077 OUTPUTTEXTH .298 ; END:
3074 call word_processor 3078 call word_processor
3075 call PLED_standard_color 3079
3076 3080 call PLED_standard_color ; Back to white.
3077 btfss FLAG_const_ppO2_mode ; are we in ppO2 mode?
3078 bra PLED_show_end_ead_divemode2 ; no, show OC EAD and END
3079
3080 ; We are in CCR mode...
3081 btfss is_bailout ; In bailout mode?
3082 bra PLED_show_end_ead_divemode3 ; No, show CC EAD and END
3083
3084 PLED_show_end_ead_divemode2: ; Show OC EAD and END
3085 ; Show EAD:
3086 WIN_LEFT .125 3081 WIN_LEFT .125
3087 WIN_TOP .192 3082 WIN_TOP .192
3088 3083 lfsr FSR2,letter
3089 ; Show END: 3084 movff char_O_EAD,lo
3090 WIN_LEFT .125 3085 bsf leftbind
3086 output_8 ; Print EAD w/o leading space.
3087 STRCAT_PRINT "m"
3088
3091 WIN_TOP .216 3089 WIN_TOP .216
3092 return 3090 lfsr FSR2,letter
3093 3091 movff char_O_END,lo
3094 PLED_show_end_ead_divemode3: ; Show CC EAD, END and pO2[Diluent] 3092 output_8 ; Print END w/o leading space.
3095 ; Show ppO2[Diluent] 3093 bcf leftbind
3094 STRCAT_PRINT "m"
3095
3096 btfsc is_bailout ; In bailout mode?
3097 return ; Yes: done.
3098
3099 btfss FLAG_const_ppO2_mode ; In (true) CCR mode ?
3100 return ; No: done.
3101
3102 ; Show ppO2[Diluent]
3103
3096 WIN_LEFT .95 3104 WIN_LEFT .95
3097 WIN_TOP .168 3105 WIN_TOP .168
3098 call PLED_divemask_color ; Set Color for Divemode mask 3106 call PLED_divemask_color ; Set Color for Divemode mask
3099 STRCPY_PRINT "ppO2:" ; ppO2 of diluent 3107 STRCPY_PRINT "ppO2:" ; ppO2 of diluent
3100 call PLED_standard_color 3108 call PLED_standard_color
3101 3109
3102 movff amb_pressure+0,xA+0
3103 movff amb_pressure+1,xA+1
3104 movlw d'10'
3105 movwf xB+0
3106 clrf xB+1
3107 call div16x16 ; xC=p_amb/10
3108 movff xC+0,xA+0
3109 movff xC+1,xA+1
3110 movff char_I_O2_ratio,xB+0
3111 clrf xB+1
3112 call mult16x16 ; char_I_O2_ratio * p_amb/10
3113 movff xC+0,lo
3114 movff xC+1,hi ; for output
3115
3116 WIN_LEFT .130 3110 WIN_LEFT .130
3117 WIN_TOP .168 3111 WIN_TOP .168
3118 lfsr FSR2,letter 3112 lfsr FSR2,letter
3119 3113
3120 movff xC+0,sub_a+0 3114 movff char_O_diluent_ppO2, lo
3121 movff xC+1,sub_a+1 ; for compare 3115 clrf hi
3122 movlw LOW d'10000' 3116 bsf leftbind
3123 movwf sub_b+0 3117 output_16dp d'3' ; Show ppO2 w/o leading zero
3124 movlw HIGH d'10000' ; ppO2 has mbar resolution...
3125 movwf sub_b+1
3126 call sub16 ; sub_c = sub_a - sub_b
3127 movlw '0'
3128 btfsc neg_flag ; Display leading zero manually?
3129 movwf POSTINC2 ; Yes!
3130
3131 bsf leftbind
3132 bsf ignore_digit4
3133 output_16dp d'1' ; Show ppO2 w/o leading zero
3134 bcf ignore_digit4
3135 bcf leftbind 3118 bcf leftbind
3136 STRCAT_PRINT " " ; Display ppO2[Diluent] 3119 STRCAT_PRINT " " ; Display ppO2[Diluent]
3137 3120
3138 ; EAD and END: ToDo... 3121 return
3139 ; Show EAD: 3122
3140 WIN_LEFT .125 3123 ;=============================================================================
3141 WIN_TOP .192
3142
3143 ; Show END:
3144 WIN_LEFT .125
3145 WIN_TOP .216
3146 return
3147
3148 3124
3149 PLED_show_leading_tissue: 3125 PLED_show_leading_tissue:
3150 call PLED_divemask_color ; Set Color for Divemode mask 3126 call PLED_divemask_color ; Set Color for Divemode mask
3151 DISPLAYTEXTH .282 ; L. Tissue: 3127 DISPLAYTEXTH .282 ; L. Tissue:
3152 PLED_show_leading_tissue_2: 3128 PLED_show_leading_tissue_2: