Mercurial > public > mk2
changeset 376:ed26990716fe 64kByte Logbook
first gas does not reset change depth, display fix with multigas dives in logbook
author | heinrichsweikamp |
---|---|
date | Sun, 12 Jun 2011 21:27:07 +0200 |
parents | 84a1762de6ab |
children | be71e563ac09 |
files | code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/interface.asm code_part1/OSTC_code_asm_part1/menu_gassetup.asm code_part1/OSTC_code_asm_part1/menu_logbook.asm |
diffstat | 4 files changed, 16 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jun 12 16:18:22 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jun 12 21:27:07 2011 +0200 @@ -1298,10 +1298,10 @@ addwf temp1,W ; copy to bits 0-3, result in WREG call write_external_eeprom - movlw d'2' ; information size tank + movlw d'1' ; information size GF movwf temp1 ; copy to bits 0-3 swapf temp1,F ; swap nibbels 0-3 with 4-7 - GETCUSTOM8 d'23' ; Divisor Tank + GETCUSTOM8 d'23' ; Divisor GF addwf temp1,W ; copy to bits 0-3, result in WREG call write_external_eeprom
--- a/code_part1/OSTC_code_asm_part1/interface.asm Sun Jun 12 16:18:22 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/interface.asm Sun Jun 12 21:27:07 2011 +0200 @@ -142,11 +142,16 @@ DISPLAYTEXT .16 ; "Start" call get_free_EEPROM_location ; + movlw d'1' ; increase addwf eeprom_address+0,F movlw d'0' addwfc eeprom_address+1,F +;For debug only +;clrf eeprom_address+0,F +;clrf eeprom_address+1,F + DISPLAYTEXT .17 ; "Data" rcall send_internal_eeprom1 ; sends complete 1st. page of internal EEPROM
--- a/code_part1/OSTC_code_asm_part1/menu_gassetup.asm Sun Jun 12 16:18:22 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_gassetup.asm Sun Jun 12 21:27:07 2011 +0200 @@ -653,13 +653,14 @@ OUTPUTTEXT .96 ; Yes bsf second_FA ; Is first gas - movf decodata+0,W ; read current value - addlw d'28' ; offset in memory - movwf EEADR - call read_eeprom ; Low-value - clrf EEDATA ; Set change depth to zero - call write_eeprom ; save result in EEPROM - +; Do not reset change depth (Kind request from Pascal)! +; movf decodata+0,W ; read current value +; addlw d'28' ; offset in memory +; movwf EEADR +; call read_eeprom ; Low-value +; clrf EEDATA ; Set change depth to zero +; call write_eeprom ; save result in EEPROM +; bra menu_firstgas1 menu_firstgas0:
--- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sun Jun 12 16:18:22 2011 +0200 +++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm Sun Jun 12 21:27:07 2011 +0200 @@ -503,6 +503,7 @@ incf_eeprom_address d'12' ; Skip 12 Bytes in EEPROM (faster) (Gaslist) call I2CREAD2 ; Read start gas (1-5) movff SSPBUF,active_gas ; Store + movff active_gas,average_depth_hold_total+3 ; keep copy to restore color incf_eeprom_address d'5' ; Skip 5 Bytes in EEPROM (faster) (Battery, firmware) call I2CREAD2 ; Read divisor