# HG changeset patch
# User JeanDo
# Date 1304345647 -7200
# Node ID 91371c7553f58a874447e66907b2ccfc1e017a60
# Parent  b20fc8c4ac92d529bc25140889b467d0fb7157b4
BUGFIX typo when passing Gas#4 to deko model (bug#43)

diff -r b20fc8c4ac92 -r 91371c7553f5 code_part1/OSTC_code_asm_part1/divemode.asm
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Sun May 01 19:55:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Mon May 02 16:14:07 2011 +0200
@@ -292,6 +292,7 @@
 divemode_check_decogases:					; CALLed from Simulator, too
 
 	clrf    EEADRH                      ; Make sure to select eeprom bank 0
+	
 	read_int_eeprom		d'7'			; Read He ratio
 	movff	EEDATA,char_I_deco_He_ratio+0	; And copy into hold register
 	read_int_eeprom		d'6'			; Read O2 ratio
@@ -324,7 +325,7 @@
 
 	read_int_eeprom		d'19'			; Read He ratio
 	movff	EEDATA,char_I_deco_He_ratio+3	; And copy into hold register
-	read_int_eeprom		d'17'			; Read O2 ratio
+	read_int_eeprom		d'18'			; Read O2 ratio
 	movff	char_I_deco_He_ratio+3, wait_temp			; copy into bank1 register
 	bsf		STATUS,C					; 
 	movlw	d'100'						; 100%
@@ -1765,8 +1766,8 @@
 	movlw	d'100'						; 100%
 	subfwb	wait_temp,W					; minus He
 	bsf		STATUS,C					; Borrow bit
-	subfwb	EEDATA,F					; minus O2
-	movff	EEDATA, char_I_N2_ratio		; = N2!
+	subfwb	EEDATA,W					; minus O2
+	movff	WREG, char_I_N2_ratio		; = N2!
 
 ; Configure gaslist_active flag register
 	read_int_eeprom	d'27'