Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/divemode.asm @ 615:3ab53b57f879
Bugfix: CF01 for end-of-dive detection
author | heinrichsweikamp |
---|---|
date | Fri, 20 Jul 2012 15:41:56 +0200 |
parents | ec2cfd4b748b |
children | 8d1ff6fc54f5 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Mon Jul 16 10:42:34 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Fri Jul 20 15:41:56 2012 +0200 @@ -1658,10 +1658,20 @@ btfsc high_altitude_mode ; In high altitude (Fly) mode? bra set_dive_modes3 ; Yes! + btfss divemode ; In divemode? + bra set_dive_modes0 ; No. + + ; in Divemode, check threshold from CF01 + GETCUSTOM8 .1 ; loads dive_threshold in WREG + movwf sub_a+0 ; dive_treshold is in cm + clrf sub_a+1 + bra set_dive_modes1 ; Done. + set_dive_modes0: GETCUSTOM8 .0 ; loads dive_threshold in WREG movwf sub_a+0 ; dive_treshold is in cm clrf sub_a+1 + bra set_dive_modes1 ; Done. set_dive_modes1: SAFE_2BYTE_COPY rel_pressure, sub_b