comparison code_part1/OSTC_code_asm_part1/surfmode.asm @ 229:85ea09d3b9d8

Nofly should not be reset after dive simulation (bug BB18).
author JeanDo
date Tue, 15 Mar 2011 18:13:51 +0100
parents 3f4d60385f9c
children 2cbaa01dac26
comparison
equal deleted inserted replaced
228:6d4e29d80ff3 229:85ea09d3b9d8
225 call nofly_timeout60 ; checks if nofly time is > 0 225 call nofly_timeout60 ; checks if nofly time is > 0
226 bcf oneminupdate 226 bcf oneminupdate
227 return 227 return
228 228
229 nofly_timeout60: 229 nofly_timeout60:
230 bsf nofly_active ; Set flag 230 movf nofly_time+0,W ; Is nofly null ?
231 iorwf nofly_time+1,W
232 bnz nofly_timeout60_1 ; No...
233
234 bcf nofly_active ; Clear flag
235 bcf LED_blue ; Clear led.
236 return
237
238 nofly_timeout60_1:
239 bsf nofly_active ; Set flag
231 movlw d'1' 240 movlw d'1'
232 subwf nofly_time+0,F 241 subwf nofly_time+0,F
233 movlw d'0' 242 movlw d'0'
234 subwfb nofly_time+1,F ; reduce by one 243 subwfb nofly_time+1,F ; reduce by one
235 tstfsz nofly_time+0 ; =0?
236 return
237 tstfsz nofly_time+1 ; =0?
238 return
239 bcf nofly_active ; Clear flag
240 bcf LED_blue
241 incf nofly_time+0,F ; =1
242 return 244 return
243 245
244 calc_surface_interval: 246 calc_surface_interval:
245 movff int_O_desaturation_time+0,lo ; divide by 60... 247 movff int_O_desaturation_time+0,lo ; divide by 60...
246 movff int_O_desaturation_time+1,hi 248 movff int_O_desaturation_time+1,hi