Mercurial > public > mk2
changeset 375:84a1762de6ab 64kByte Logbook
show saturation multiplier in logbook
author | heinrichsweikamp |
---|---|
date | Sun, 12 Jun 2011 16:18:22 +0200 |
parents | 6ee9c849ad92 |
children | ed26990716fe |
files | code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/menu_logbook.asm |
diffstat | 2 files changed, 35 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jun 12 08:52:41 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jun 12 16:18:22 2011 +0200 @@ -794,10 +794,7 @@ return store_dive_gf: - movff char_O_relative_gradient_GF,WREG; gradient factor relative (GF model) - movff char_I_deco_model,lo - decfsz lo,F ; jump over next line if char_I_deco_model == 1 - movff char_O_gradient_factor,WREG ; gradient factor absolute (Non-GF model) + movff char_O_gradient_factor,WREG ; gradient factor absolute call write_external_eeprom GETCUSTOM8 d'23' movwf divisor_gf ; Reload divisor from CF @@ -1346,18 +1343,20 @@ movff total_divetime_seconds+1,WREG ; Total dive time (Regardless of CF01) call write_external_eeprom - - - GETCUSTOM8 d'32' ; GF_lo -> WREG + movlw d'32' ; GF_lo movff char_I_deco_model,lo decfsz lo,F ; jump over next line if char_I_deco_model == 1 - movlw d'90' ; overwrite for non-gf modes + movlw d'11' ; Saturation Multiplier + call getcustom8_1 ; Get Custom function #WREG call write_external_eeprom ; write WREG into external memory - GETCUSTOM8 d'33' ; GF_hi -> WREG + + movlw d'33' ; GF_hi movff char_I_deco_model,lo decfsz lo,F ; jump over next line if char_I_deco_model == 1 - movlw d'90' ; overwrite for non-gf modes + movlw d'12' ; Desaturation Multiplier + call getcustom8_1 ; Get Custom function #WREG call write_external_eeprom ; write WREG into external memory + read_int_eeprom d'34' ; Read deco modell movf EEDATA,W call write_external_eeprom ; write WREG into external memory
--- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sun Jun 12 08:52:41 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sun Jun 12 16:18:22 2011 +0200 @@ -885,10 +885,19 @@ output_16dp d'3' ; Average depth STRCAT_PRINT "m" -; Show GF settings - incf_eeprom_address d'2' ; Skip total dive time + incf_eeprom_address d'4' ; Skip total dive time and GF factors + call I2CREAD ; Read deco modell + decf_eeprom_address d'2' ; back to GF factos + WIN_TOP .0 WIN_LEFT .75 + + movff SSPBUF,lo + movlw d'3' + cpfsgt lo + bra logbook_show_sat + +; Show GF settings call I2CREAD2 ; Read GF_lo movff SSPBUF,hi call I2CREAD2 ; Read GF_hi @@ -896,10 +905,24 @@ STRCPY "GF:" output_8 ; GF_hi PUTC '/' - movff lo,hi ; copy GF_lo + movff hi,lo ; copy GF_lo output_8 ; GF_lo call word_processor + bra logbook_deco_model ; Skip Sat +logbook_show_sat: + call I2CREAD2 ; Read Saturation x + movff SSPBUF,hi + call I2CREAD2 ; Read Desaturation x + movff SSPBUF,lo + STRCPY "Sat:" + output_8 ; Sat x + STRCAT "%/" + movff hi,lo ; copy Desat x + output_8 ; Desat x + STRCAT_PRINT "%" + +logbook_deco_model: ; Show deco model WIN_TOP .25 call I2CREAD2 ; Read deco modell