# HG changeset patch # User heinrichsweikamp # Date 1307906827 -7200 # Node ID ed26990716fe713d301f3a7b59da5f982d3840ce # Parent 84a1762de6ab18f105480bec7be6e5baecd4272d first gas does not reset change depth, display fix with multigas dives in logbook diff -r 84a1762de6ab -r ed26990716fe code_part1/OSTC_code_asm_part1/divemode.asm --- 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 diff -r 84a1762de6ab -r ed26990716fe code_part1/OSTC_code_asm_part1/interface.asm --- 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 diff -r 84a1762de6ab -r ed26990716fe code_part1/OSTC_code_asm_part1/menu_gassetup.asm --- 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: diff -r 84a1762de6ab -r ed26990716fe code_part1/OSTC_code_asm_part1/menu_logbook.asm --- 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