Mercurial > public > hwos_code
comparison src/ms5541.asm @ 92:7ca1105751c7
add sensor calibration option (PC only), some cleanup
author | heinrichsweikamp |
---|---|
date | Wed, 16 Apr 2014 22:31:09 +0200 |
parents | 50c3e2c7ba7a |
children | 39f6c07ce2f6 |
comparison
equal
deleted
inserted
replaced
91:917393caf559 | 92:7ca1105751c7 |
---|---|
136 movlw LOW(.1000) ; add 1000 | 136 movlw LOW(.1000) ; add 1000 |
137 addwf isr_xC+1,F | 137 addwf isr_xC+1,F |
138 movlw HIGH(.1000) | 138 movlw HIGH(.1000) |
139 addwfc isr_xC+2,F | 139 addwfc isr_xC+2,F |
140 | 140 |
141 ; Add opt_pressure_adjust to result (SIGNED!) | |
142 movff opt_pressure_adjust,isr_xC+0 | |
143 | |
144 btfss isr_xC+0,7 ; <0? | |
145 bra pressure_extra_add ; No | |
146 ; Yes | |
147 comf isr_xC+0,F | |
148 incf isr_xC+0,F | |
149 ; Check for max. of 20mbar | |
150 movlw .21 | |
151 cpfslt isr_xC+0 | |
152 clrf isr_xC+0 | |
153 ; Subtract | |
154 movf isr_xC+0,W | |
155 subwf isr_xC+1,F | |
156 movlw .0 | |
157 subwfb isr_xC+2,F | |
158 bra pressure_extra_common | |
159 | |
160 pressure_extra_add: | |
161 ; Check for max. of 20mbar | |
162 movlw .21 | |
163 cpfslt isr_xC+0 | |
164 clrf isr_xC+0 | |
165 ; Add | |
166 movf isr_xC+0,W | |
167 addwf isr_xC+1,F | |
168 movlw .0 | |
169 addwfc isr_xC+2,F | |
170 | |
171 pressure_extra_common: | |
141 banksel common | 172 banksel common |
142 btfss simulatormode_active ; are we in simulator mode? | 173 btfss simulatormode_active ; are we in simulator mode? |
143 bra calc_compensation_2 ; no | 174 bra calc_compensation_2 ; no |
144 banksel isr_backup | 175 banksel isr_backup |
145 | 176 |