changeset 457:993e681e89cf

no decodata in logbook for apnea dives
author heinrichsweikamp
date Thu, 01 Sep 2011 11:57:11 +0200
parents f4fbda6db91c
children d300e6ad6f66
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/menu_logbook.asm
diffstat 3 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Wed Aug 31 09:27:16 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Thu Sep 01 11:57:11 2011 +0200
@@ -1,3 +1,6 @@
+New in 2.01 beta:
+BUGFIX: No decodata in logbook for apnea dives
+
 New in 2.00 Stable:
 Stable release
 BUGFIX: Fixing 32kB boundary read for logbook
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Wed Aug 31 09:27:16 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Thu Sep 01 11:57:11 2011 +0200
@@ -561,7 +561,7 @@
 
 ; shift address for header
 ; the header will be stored after the dive
-	incf_eeprom_address	d'57'				; Macro, that adds 8Bit to eeprom_address:2 with banking at 0x8000
+	incf_eeprom_address	d'57'				; Macro, that adds 8Bit to eeprom_address:2
 
 store_dive_data2:
     SAFE_2BYTE_COPY rel_pressure, lo
@@ -778,6 +778,9 @@
 	movf	decodata+1,W				; no stop time of length of first stop
 	call	write_external_eeprom
 	GETCUSTOM8	d'22'
+	
+	btfsc	FLAG_apnoe_mode				; in Apnoe mode?
+	movlw	d'0'					; Yes, set to zero
 	movwf	divisor_deco			; Reload divisor from CF
 	return
 
@@ -1764,6 +1767,8 @@
 	GETCUSTOM8	d'21'
 	movwf	divisor_temperature         ; load divisors for profile storage
 	GETCUSTOM8	d'22'
+	btfsc	FLAG_apnoe_mode				; in Apnoe mode?
+	movlw	d'0'					; Yes, set to zero
 	movwf	divisor_deco				
 	GETCUSTOM8	d'23'
 	movwf	divisor_gf
--- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm	Wed Aug 31 09:27:16 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm	Thu Sep 01 11:57:11 2011 +0200
@@ -154,7 +154,7 @@
 
 menu_logbook4:
 	; Adjust eeprom_address to set pointer on first headerbyte
-	incf_eeprom_address	d'2'            ; Macro, that adds 8Bit to eeprom_address:2 with banking at 0x8000
+	incf_eeprom_address	d'2'            ; Macro, that adds 8Bit to eeprom_address:2
 
 	btfss		logbook_profile_view			; Display profile (search routine is used in profileview, too)
 	bra			menu_logbook_display_loop		; No, display overwiev list
@@ -328,10 +328,10 @@
 	movff		SSPBUF,lo				; store in lo
 
 ; Offset to SamplingRate
-	incf_eeprom_address	d'32'				; Macro, that adds 8Bit to eeprom_address:2 with banking at 0x8000
+	incf_eeprom_address	d'32'				; Macro, that adds 8Bit to eeprom_address:2
 	call		I2CREAD						; Read Sampling rate
 	movff		SSPBUF,samplesecs_value		; Copy sampling rate
-	decf_eeprom_address	d'32'				; Macro, that subtracts 8Bit from eeprom_address:2 with banking at 0x8000
+	decf_eeprom_address	d'32'				; Macro, that subtracts 8Bit from eeprom_address:2
 
 	movff		lo,convert_value_temp+0		; Month (in lo, see above)
 	call		I2CREAD2					; Day