Mercurial > public > mk2
diff 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 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm Sat Mar 05 10:09:32 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/surfmode.asm Tue Mar 15 18:13:51 2011 +0100 @@ -227,18 +227,20 @@ return nofly_timeout60: - bsf nofly_active ; Set flag + movf nofly_time+0,W ; Is nofly null ? + iorwf nofly_time+1,W + bnz nofly_timeout60_1 ; No... + + bcf nofly_active ; Clear flag + bcf LED_blue ; Clear led. + return + +nofly_timeout60_1: + bsf nofly_active ; Set flag movlw d'1' subwf nofly_time+0,F movlw d'0' - subwfb nofly_time+1,F ; reduce by one - tstfsz nofly_time+0 ; =0? - return - tstfsz nofly_time+1 ; =0? - return - bcf nofly_active ; Clear flag - bcf LED_blue - incf nofly_time+0,F ; =1 + subwfb nofly_time+1,F ; reduce by one return calc_surface_interval: