comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 301:a5fd8777a598

Display ppO2[Diluent] in CCR modes
author heinrichsweikamp
date Sat, 30 Apr 2011 10:40:18 +0200
parents 438ecb8090eb
children 9c39cedb662b
comparison
equal deleted inserted replaced
300:438ecb8090eb 301:a5fd8777a598
543 return 543 return
544 544
545 ;============================================================================= 545 ;=============================================================================
546 546
547 PLED_display_velocity: 547 PLED_display_velocity:
548 ; btfsc multi_gf_display ; Is the Multi-GF Table displayed?
549 ; return ; Yes, No update and return!
550
551 ostc_debug 'v' ; Sends debug-information to screen if debugmode active 548 ostc_debug 'v' ; Sends debug-information to screen if debugmode active
552 WIN_TOP .90 549 WIN_TOP .90
553 WIN_LEFT .0 550 WIN_LEFT .0
554 WIN_FONT FT_SMALL 551 WIN_FONT FT_SMALL
555 PLED_color_code warn_velocity ; Color code output 552 PLED_color_code warn_velocity ; Color code output
972 bcf leftbind 969 bcf leftbind
973 STRCAT_PRINT "°C " 970 STRCAT_PRINT "°C "
974 return 971 return
975 972
976 PLED_temp_divemode: 973 PLED_temp_divemode:
977 ; btfsc multi_gf_display ; Is the Multi-GF Table displayed?
978 ; return ; Yes, No update and return!
979
980 ostc_debug 'u' ; Sends debug-information to screen if debugmode active 974 ostc_debug 'u' ; Sends debug-information to screen if debugmode active
981 975
982 ; temperature 976 ; temperature
983 movff temperature+0,last_temperature+0 977 movff temperature+0,last_temperature+0
984 movff temperature+1,last_temperature+1 978 movff temperature+1,last_temperature+1
1004 clrf WREG ; Allow up to 5 chars to avoid 998 clrf WREG ; Allow up to 5 chars to avoid
1005 movff WREG,letter+5 ; collision with sat graphs 999 movff WREG,letter+5 ; collision with sat graphs
1006 call word_processor 1000 call word_processor
1007 return 1001 return
1008 1002
1009 PLED_show_ppO2: ; Show ppO2 1003 PLED_show_ppO2: ; Show ppO2 (ppO2 stored in xC)
1010 ostc_debug 't' ; Sends debug-information to screen if debugmode active 1004 ostc_debug 't' ; Sends debug-information to screen if debugmode active
1011 WIN_TOP .119 1005 WIN_TOP .119
1012 WIN_LEFT .0 1006 WIN_LEFT .0
1013 WIN_FONT FT_SMALL 1007 WIN_FONT FT_SMALL
1014 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) 1008 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC)
1049 bra PLED_display_clear_common_y1; also returns! 1043 bra PLED_display_clear_common_y1; also returns!
1050 1044
1051 PLED_active_gas_divemode: ; Displays current gas (e.g. 40/20) if a) He>0 or b) O2>Custom9 1045 PLED_active_gas_divemode: ; Displays current gas (e.g. 40/20) if a) He>0 or b) O2>Custom9
1052 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode 1046 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode
1053 return 1047 return
1054
1055 ; btfsc multi_gf_display ; Is the Multi-GF Table displayed?
1056 ; return ; Yes, No update and return!
1057 1048
1058 WIN_INVERT .0 ; Init new Wordprocessor 1049 WIN_INVERT .0 ; Init new Wordprocessor
1059 call PLED_active_gas_divemode_show ; Show gas (Non-Inverted in all cases) 1050 call PLED_active_gas_divemode_show ; Show gas (Non-Inverted in all cases)
1060 1051
1061 btfss better_gas_available ;=1: A better gas is available and a gas change is advised in divemode 1052 btfss better_gas_available ;=1: A better gas is available and a gas change is advised in divemode
2970 DISPLAYTEXTH .274 ; CF I and CF II Menu 2961 DISPLAYTEXTH .274 ; CF I and CF II Menu
2971 DISPLAYTEXTH .275 ; for Details! 2962 DISPLAYTEXTH .275 ; for Details!
2972 return 2963 return
2973 2964
2974 PLED_const_ppO2_value: 2965 PLED_const_ppO2_value:
2975 ; btfsc multi_gf_display ; Is the Multi-GF Table displayed?
2976 ; return ; Yes, No update and return!
2977
2978 ostc_debug 'j' ; Sends debug-information to screen if debugmode active 2966 ostc_debug 'j' ; Sends debug-information to screen if debugmode active
2979 2967
2980 WIN_TOP .168 2968 WIN_TOP .168
2981 WIN_LEFT .50 2969 WIN_LEFT .50
2982 WIN_FONT FT_SMALL 2970 WIN_FONT FT_SMALL
3135 lfsr FSR2,letter 3123 lfsr FSR2,letter
3136 output_16_3 3124 output_16_3
3137 STRCAT_PRINT "m" ; Display END 3125 STRCAT_PRINT "m" ; Display END
3138 return 3126 return
3139 3127
3140 PLED_show_end_ead_divemode3: ; Show CC EAD and END 3128 PLED_show_end_ead_divemode3: ; Show CC EAD, END and pO2[Diluent]
3141 ; ToDo... 3129 ; Show ppO2[Diluent]
3130 WIN_LEFT .95
3131 WIN_TOP .168
3132 call PLED_divemask_color ; Set Color for Divemode mask
3133 STRCPY_PRINT "ppO2:" ; ppO2 of diluent
3134 call PLED_standard_color
3135
3136 movff amb_pressure+0,xA+0
3137 movff amb_pressure+1,xA+1
3138 movlw d'10'
3139 movwf xB+0
3140 clrf xB+1
3141 call div16x16 ; xC=p_amb/10
3142 movff xC+0,xA+0
3143 movff xC+1,xA+1
3144 movff char_I_O2_ratio,xB+0
3145 clrf xB+1
3146 call mult16x16 ; char_I_O2_ratio * p_amb/10
3147 movff xC+0,lo
3148 movff xC+1,hi ; for output
3149
3150 WIN_LEFT .130
3151 WIN_TOP .168
3152 lfsr FSR2,letter
3153
3154 movff xC+0,sub_a+0
3155 movff xC+1,sub_a+1 ; for compare
3156 movlw LOW d'10000'
3157 movwf sub_b+0
3158 movlw HIGH d'10000' ; ppO2 has mbar resolution...
3159 movwf sub_b+1
3160 call sub16 ; sub_c = sub_a - sub_b
3161 movlw '0'
3162 btfsc neg_flag ; Display leading zero manually?
3163 movwf POSTINC2 ; Yes!
3164
3165 bsf leftbind
3166 bsf ignore_digit4
3167 output_16dp d'1' ; Show ppO2 w/o leading zero
3168 bcf ignore_digit4
3169 bcf leftbind
3170 STRCAT_PRINT " " ; Display ppO2[Diluent]
3171
3172 ; EAD and END: ToDo...
3142 return 3173 return
3143 3174
3144 3175
3145 PLED_show_leading_tissue: 3176 PLED_show_leading_tissue:
3146 call PLED_divemask_color ; Set Color for Divemode mask 3177 call PLED_divemask_color ; Set Color for Divemode mask
3198 PLED_topline_box2: 3229 PLED_topline_box2:
3199 WIN_BOX_COLOR .0, .26, .0, .159 3230 WIN_BOX_COLOR .0, .26, .0, .159
3200 return 3231 return
3201 3232
3202 PLED_display_cns: 3233 PLED_display_cns:
3203 ; btfsc multi_gf_display ; Is the Multi-GF Table displayed?
3204 ; return ; Yes, No update and return!
3205
3206 btfsc gauge_mode ; Do not display in gauge mode 3234 btfsc gauge_mode ; Do not display in gauge mode
3207 return 3235 return
3208 3236
3209 btfsc FLAG_apnoe_mode ; Do not display in apnoe mode 3237 btfsc FLAG_apnoe_mode ; Do not display in apnoe mode
3210 return 3238 return