# HG changeset patch # User heinrichsweikamp # Date 1312894015 -7200 # Node ID ec28f64bfeffa4089f7d205b2098fe8d655cbba9 # Parent c54d32ec2133fc097be7a1b2b71d612b31bd7ea1 max depth in logbook had salinity applied already... diff -r c54d32ec2133 -r ec28f64bfeff code_part1/OSTC_code_asm_part1/menu_logbook.asm --- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sun Aug 07 21:01:13 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm Tue Aug 09 14:46:55 2011 +0200 @@ -390,24 +390,6 @@ incf last_temperature+1,F ; Yes, make last_temperature+1>1 to make "display_profile2e" working display_profile_offset4: -; Offset to Salinity - incf_eeprom_address d'33' ; Macro, that adds 8Bit to eeprom_address:2 - call I2CREAD ; Read Salinity - movff SSPBUF,wait_temp ; Copy Salinity - decf_eeprom_address d'33' ; Macro, that subtracts 8Bit from eeprom_address:2 - - movff lo,xA+0 - movff hi,xA+1 - movlw d'102' ; 0,98bar/10m - movwf xB+0 - clrf xB+1 - call mult16x16 ;xA*xB=xC (lo:hi * 100) - movff wait_temp,xB+0 ; Salinity - clrf xB+1 - call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder - movff xC+0,lo - movff xC+1,hi ; restore lo and hi with updated value - bsf leftbind output_16dp d'3' ; max. depth STRCAT "m " @@ -1404,28 +1386,11 @@ call I2CREAD4 ; Block read movff SSPBUF,hi -; Offset to Salinity - incf_eeprom_address d'33' ; Macro, that adds 8Bit to eeprom_address:2 - call I2CREAD ; Read Salinity - movff SSPBUF,wait_temp ; Copy Salinity - decf_eeprom_address d'33' ; Macro, that subtracts 8Bit from eeprom_address:2 - movff lo,xA+0 - movff hi,xA+1 - movlw d'102' ; 0,98bar/10m - movwf xB+0 - clrf xB+1 - call mult16x16 ;xA*xB=xC (lo:hi * 100) - movff wait_temp,xB+0 ; Salinity - clrf xB+1 - call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder - movff xC+0,lo - movff xC+1,hi ; restore lo and hi with updated value - bsf leftbind bsf ignore_digit5 ; Do not display 1cm figure output_16dp d'3' ; max. depth STRCAT "m " - call I2CREAD3 ; Block read start + call I2CREAD4 ; Block read movff SSPBUF,lo ; read divetime in minutes call I2CREAD4 ; Block read movff SSPBUF,hi ; read divetime in minutes