comparison code_part1/OSTC_code_asm_part1/surfmode.asm @ 353:b5b030c1ae7e

Avoid spurious switch-depth stops with 3 or more gas.
author JeanDo
date Tue, 07 Jun 2011 01:16:55 +0200
parents 797e2ac42d24
children 6f7965ec5f49
comparison
equal deleted inserted replaced
349:ed137d66ac65 353:b5b030c1ae7e
271 set_leds_surfmode: 271 set_leds_surfmode:
272 btfsc nofly_active 272 btfsc nofly_active
273 btg LED_blue 273 btg LED_blue
274 return 274 return
275 275
276 ;=============================================================================
277
276 calc_deko_surfmode: 278 calc_deko_surfmode:
277 ostc_debug 'I' ; Sends debug-information to screen if debugmode active 279 ostc_debug 'I' ; Sends debug-information to screen if debugmode active
278 280
279 movff last_surfpressure+0,int_I_pres_surface+0 ; copy surface air pressure to deco routine 281 movff last_surfpressure+0,int_I_pres_surface+0 ; copy surface air pressure to deco routine
280 movff last_surfpressure+1,int_I_pres_surface+1 282 movff last_surfpressure+1,int_I_pres_surface+1
281 clrf wait_temp ; Use as buffer 283 clrf WREG ; Use as buffer
282 movff wait_temp,char_I_He_ratio ; No He at the Surface 284 movff WREG,char_I_He_ratio ; No He at the Surface
283 movlw d'79' ; 79% N2 285 movlw d'79' ; 79% N2
284 movwf wait_temp ; Use as buffer 286 movff WREG,char_I_N2_ratio ; Air at the Surface
285 movff wait_temp,char_I_N2_ratio ; No He at the Surface
286 287
287 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine 288 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine
288 GETCUSTOM8 d'11' ; Saturation multiplier % 289 GETCUSTOM8 d'11' ; Saturation multiplier %
289 movff WREG,char_I_saturation_multiplier 290 movff WREG,char_I_saturation_multiplier
290 GETCUSTOM8 d'12' ; Desaturation multiplier % 291 GETCUSTOM8 d'12' ; Desaturation multiplier %
297 movff int_O_desaturation_time+0,desaturation_time_buffer+0 298 movff int_O_desaturation_time+0,desaturation_time_buffer+0
298 movff int_O_desaturation_time+1,desaturation_time_buffer+1 299 movff int_O_desaturation_time+1,desaturation_time_buffer+1
299 300
300 return 301 return
301 302
303 ;=============================================================================
302 304
303 test_charger: 305 test_charger:
304 bcf TRISC,1 ; CHRG_OUT output 306 bcf TRISC,1 ; CHRG_OUT output
305 bsf CHRG_OUT 307 bsf CHRG_OUT
306 308