Mercurial > public > mk2
changeset 615:3ab53b57f879
Bugfix: CF01 for end-of-dive detection
author | heinrichsweikamp |
---|---|
date | Fri, 20 Jul 2012 15:41:56 +0200 |
parents | 7a269c01192a |
children | ee5a9c0d09fb |
files | code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/menu_reset.asm |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
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
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm Mon Jul 16 10:42:34 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm Fri Jul 20 15:41:56 2012 +0200 @@ -109,7 +109,7 @@ ;---- BANK0 custom function defaults ------------------------------------- ; DEFAULT MIN MAX CF_DEFAULT CF_CENTI, d'100', d'50', d'250' ; CF00 dive_threshold 100cm - CF_DEFAULT CF_CENTI, d'30', d'10', d'100' ; CF01 surf_threshold 30cm + CF_DEFAULT CF_CENTI, d'40', d'20', d'100' ; CF01 surf_threshold 40cm CF_DEFAULT CF_INT15, d'240', d'0', d'600' ; CF02 diveloop_timeout 240s CF_DEFAULT CF_SEC, d'120', d'30', d'240' ; CF03 surfloop_timeout 120s CF_DEFAULT CF_SEC, d'5', d'1', d'30' ; CF04 premenu_timeout 5s