# HG changeset patch # User heinrichsweikamp # Date 1298970478 -3600 # Node ID 3cf6649e89acf12df1adc245d933fdb2f6a4c040 # Parent b6dd54b3567ce976ff9ed54e494d3288ce0a4282 If gas is inactive, overwrite char_I_deco_gas_changex with zero diff -r b6dd54b3567c -r 3cf6649e89ac code_part1/OSTC_code_asm_part1/divemode.asm --- a/code_part1/OSTC_code_asm_part1/divemode.asm Tue Mar 01 10:01:17 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Tue Mar 01 10:07:58 2011 +0100 @@ -357,7 +357,6 @@ movff EEDATA, char_I_deco_N2_ratio1; = N2! ; Now, set change depth. Inactive gases have depth=0! - read_int_eeprom d'118' ; read gas_change_depth Gas1 movff EEDATA,char_I_deco_gas_change5 read_int_eeprom d'119' ; read gas_change_depth Gas2 @@ -368,7 +367,21 @@ movff EEDATA,char_I_deco_gas_change2 read_int_eeprom d'122' ; read gas_change_depth Gas5 movff EEDATA,char_I_deco_gas_change1 +; If gas is inactive, overwrite char_I_deco_gas_changex with zero + read_int_eeprom d'27' ; read flag register + clrf WREG ; Clear WREG + btfss EEDATA,0 + movff WREG,char_I_deco_gas_change1; Gas1 + btfss EEDATA,1 + movff WREG,char_I_deco_gas_change2; Gas2 + btfss EEDATA,2 + movff WREG,char_I_deco_gas_change3; Gas3 + btfss EEDATA,3 + movff WREG,char_I_deco_gas_change4; Gas4 + btfss EEDATA,4 + movff WREG,char_I_deco_gas_change5; Gas5 + ; Debugger ; call enable_rs232