Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 406:2534277be060
Bug #52 fixed (ppO2 blinking if setpoint is not physically possible)
author | heinrichsweikamp |
---|---|
date | Wed, 06 Jul 2011 22:06:40 +0200 |
parents | 5b560559bc1a |
children | 3e0192f6c241 |
comparison
equal
deleted
inserted
replaced
405:dd780d7b352b | 406:2534277be060 |
---|---|
3105 | 3105 |
3106 movff ppO2_setpoint_store,WREG | 3106 movff ppO2_setpoint_store,WREG |
3107 cpfslt xC+0 ; Setpoint value possible? | 3107 cpfslt xC+0 ; Setpoint value possible? |
3108 bra PLED_const_ppO2_value1 ; Yes | 3108 bra PLED_const_ppO2_value1 ; Yes |
3109 | 3109 |
3110 clrf hi ; Reset hi | |
3110 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value | 3111 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value |
3111 bra PLED_const_ppO2_value1a | 3112 bra PLED_const_ppO2_value1a |
3112 | 3113 |
3113 PLED_const_ppO2_value1: | 3114 PLED_const_ppO2_value1: |
3114 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! | 3115 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! |
3134 btfss neg_flag | 3135 btfss neg_flag |
3135 bra PLED_const_ppO2_value11 ; Value in range (lower then fix Setpoint) | 3136 bra PLED_const_ppO2_value11 ; Value in range (lower then fix Setpoint) |
3136 | 3137 |
3137 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! | 3138 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value! |
3138 | 3139 |
3139 movff xC+0,xA+0 | 3140 movff xC+0,xA+0 ; xC=p_amb/10 |
3140 movff xC+1,xA+1 | 3141 movff xC+1,xA+1 |
3141 movlw d'100' | 3142 movlw d'100' |
3142 movwf xB+0 | 3143 movwf xB+0 |
3143 clrf xB+1 | 3144 clrf xB+1 |
3144 call div16x16 ;xA/xB=xC with xA as remainder | 3145 call div16x16 ;xA/xB=xC with xA as remainder |
3145 | 3146 |
3146 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value | 3147 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value |
3147 movff xC+1,hi ; For test if ppO2>2,55bar | 3148 movff xC+1,hi ; For test if ppO2>2,55bar |
3148 | 3149 |
3149 GETCUSTOM8 d'39' ; Adjust fixed SP? | 3150 GETCUSTOM8 d'39' ; Adjust fixed SP? |
3150 dcfsnz WREG,F | 3151 dcfsnz WREG,F |
3151 bra PLED_const_ppO2_value1a ; Yes! | 3152 bra PLED_const_ppO2_value1a ; Yes! |
3152 ; Do not adjust -> restore original SetPoint | 3153 ; Do not adjust -> restore original SetPoint |
3153 | 3154 |
3154 PLED_const_ppO2_value11: | 3155 PLED_const_ppO2_value11: |
3155 ; Setpoint in possible limits | 3156 ; Setpoint in possible limits |
3156 movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint | 3157 movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint |
3157 clrf hi | 3158 clrf hi |
3158 | 3159 |
3159 | |
3160 PLED_const_ppO2_value1a: | 3160 PLED_const_ppO2_value1a: |
3161 movff char_I_const_ppO2,lo | 3161 movff char_I_const_ppO2,lo |
3162 | 3162 |
3163 movff lo,WREG ; copy to WREG | 3163 movff lo,WREG ; copy to WREG |
3164 mullw .100 | 3164 mullw .100 |
3170 rcall PLED_const_ppO2_too_hi ; Yes | 3170 rcall PLED_const_ppO2_too_hi ; Yes |
3171 | 3171 |
3172 bsf leftbind | 3172 bsf leftbind |
3173 output_16dp d'3' | 3173 output_16dp d'3' |
3174 bcf leftbind | 3174 bcf leftbind |
3175 STRCAT_PRINT " " ; Display Setpoint with training zero | 3175 STRCAT_PRINT " " ; Display Setpoint with trailing zero |
3176 call PLED_standard_color ; Reset color | 3176 call PLED_standard_color ; Reset color |
3177 return | 3177 return |
3178 | 3178 |
3179 PLED_const_ppO2_too_hi: | 3179 PLED_const_ppO2_too_hi: |
3180 PUTC '>' | 3180 PUTC '>' |