Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 325:4a28d7a1c620
Fixed Setpoint behavior >2,55bar with CF38=ON
author | heinrichsweikamp |
---|---|
date | Sat, 07 May 2011 12:13:08 +0200 |
parents | a86c9d1219ce |
children | a7ed48daf597 |
comparison
equal
deleted
inserted
replaced
324:a86c9d1219ce | 325:4a28d7a1c620 |
---|---|
2976 tstfsz lo ; In Bailout mode (char_I_const_ppO2=0)? | 2976 tstfsz lo ; In Bailout mode (char_I_const_ppO2=0)? |
2977 bra PLED_const_ppO2_value2 ; No, display Setpoint | 2977 bra PLED_const_ppO2_value2 ; No, display Setpoint |
2978 | 2978 |
2979 ; Yes, Display "Bail" | 2979 ; Yes, Display "Bail" |
2980 call PLED_standard_color | 2980 call PLED_standard_color |
2981 OUTPUTTEXTH d'263' ;"Bail" | 2981 OUTPUTTEXTH d'263' ;"Bail " |
2982 call word_processor | 2982 call word_processor |
2983 return | 2983 return |
2984 | 2984 |
2985 PLED_const_ppO2_value2: ; Display SetPoint | 2985 PLED_const_ppO2_value2: ; Display SetPoint |
2986 ;Show fixed SP value | 2986 ;Show fixed SP value |
3024 movff PRODL,sub_a+0 | 3024 movff PRODL,sub_a+0 |
3025 movff PRODH,sub_a+1 | 3025 movff PRODH,sub_a+1 |
3026 call sub16 ; sub_c = sub_a - sub_b | 3026 call sub16 ; sub_c = sub_a - sub_b |
3027 | 3027 |
3028 btfss neg_flag | 3028 btfss neg_flag |
3029 bra PLED_const_ppO2_value11 ; Value in range | 3029 bra PLED_const_ppO2_value11 ; Value in range (lower then fix Setpoint) |
3030 | 3030 |
3031 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! | 3031 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! |
3032 | 3032 |
3033 movff xC+0,xA+0 | 3033 movff xC+0,xA+0 |
3034 movff xC+1,xA+1 | 3034 movff xC+1,xA+1 |
3035 movlw d'100' | 3035 movlw d'100' |
3036 movwf xB+0 | 3036 movwf xB+0 |
3037 clrf xB+1 | 3037 clrf xB+1 |
3038 call div16x16 ;xA/xB=xC with xA as remainder | 3038 call div16x16 ;xA/xB=xC with xA as remainder |
3039 | 3039 |
3040 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value | 3040 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value |
3041 | 3041 movff xC+1,hi ; For test if ppO2>2,55Bar |
3042 GETCUSTOM8 d'39' ; Adjust fixed SP? | 3042 |
3043 GETCUSTOM8 d'39' ; Adjust fixed SP? | |
3043 dcfsnz WREG,F | 3044 dcfsnz WREG,F |
3044 bra PLED_const_ppO2_value1a ; Yes! | 3045 bra PLED_const_ppO2_value1a ; Yes! |
3045 ; Do not adjust -> restore original SetPoint | 3046 ; Do not adjust -> restore original SetPoint |
3046 | 3047 |
3047 PLED_const_ppO2_value11: | 3048 PLED_const_ppO2_value11: |
3048 ; Setpoint in possible limits | 3049 ; Setpoint in possible limits |
3049 movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint | 3050 movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint |
3051 clrf hi | |
3052 | |
3050 | 3053 |
3051 PLED_const_ppO2_value1a: | 3054 PLED_const_ppO2_value1a: |
3052 PLED_color_code warn_ppo2 ; Color-code output | |
3053 movff char_I_const_ppO2,lo | 3055 movff char_I_const_ppO2,lo |
3054 clrf hi | 3056 |
3057 movff lo,WREG ; copy to WREG | |
3058 mullw .100 | |
3059 movff PRODH,xC+1 | |
3060 movff PRODL,xC+0 ; For color code | |
3061 PLED_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) | |
3062 | |
3063 tstfsz hi ; >2,55bar? | |
3064 rcall PLED_const_ppO2_too_hi ; Yes | |
3065 | |
3055 bsf leftbind | 3066 bsf leftbind |
3056 output_16dp d'3' | 3067 output_16dp d'3' |
3057 bcf leftbind | 3068 bcf leftbind |
3058 call word_processor | 3069 STRCAT_PRINT " " ; Display Setpoint with training zero |
3059 call PLED_standard_color | 3070 call PLED_standard_color ; Reset color |
3071 return | |
3072 | |
3073 PLED_const_ppO2_too_hi: | |
3074 movlw '>' | |
3075 movwf POSTINC2 ; Put ">" from WREG into buffer | |
3076 setf lo ; show ">2.55" | |
3077 clrf hi ; clear hi | |
3078 call PLED_warnings_color ; Set Warning color | |
3060 return | 3079 return |
3061 | 3080 |
3062 ;============================================================================= | 3081 ;============================================================================= |
3063 ; Display EAD/END computed in calc_hauptroutine_update_tissues() every 2sec. | 3082 ; Display EAD/END computed in calc_hauptroutine_update_tissues() every 2sec. |
3064 ; | 3083 ; |
3129 clrf hi | 3148 clrf hi |
3130 bsf leftbind | 3149 bsf leftbind |
3131 output_16dp d'3' ; Show ppO2 w/o leading zero | 3150 output_16dp d'3' ; Show ppO2 w/o leading zero |
3132 bcf leftbind | 3151 bcf leftbind |
3133 STRCAT_PRINT " " ; Display ppO2[Diluent] | 3152 STRCAT_PRINT " " ; Display ppO2[Diluent] |
3134 | |
3135 return | 3153 return |
3136 | 3154 |
3137 ;============================================================================= | 3155 ;============================================================================= |
3138 ; Display TTS after extra time at the same depth. | 3156 ; Display TTS after extra time at the same depth. |
3139 ; | 3157 ; |