changeset 325:4a28d7a1c620

Fixed Setpoint behavior >2,55bar with CF38=ON
author heinrichsweikamp
date Sat, 07 May 2011 12:13:08 +0200
parents a86c9d1219ce
children a7ed48daf597
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/english_text.asm code_part1/OSTC_code_asm_part1/french_text.asm code_part1/OSTC_code_asm_part1/german_text.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/spanish_text.asm
diffstat 6 files changed, 37 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Sat May 07 09:26:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Sat May 07 12:13:08 2011 +0200
@@ -1,7 +1,9 @@
 New in 1.89 beta:
 BETA Version - Do NOT use for diving!
 NEW: ppO2 in case of a loop flush can be displayed in CCR mode
-
+NEW: Fixed Setpoint with color warnings
+BUGFIX: Fixed Setpoint behavior >2,55bar with CF38=ON
+NEW: Future TTS also available in no-deco phase of dive
 
 New in 1.88 beta:
 BETA Version - Do NOT use for diving!
--- a/code_part1/OSTC_code_asm_part1/english_text.asm	Sat May 07 09:26:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/english_text.asm	Sat May 07 12:13:08 2011 +0200
@@ -340,7 +340,7 @@
     TCODE    .105,  .35,     "DDMMYY"                    ;260 DDMMYY
     TCODE    .105,  .35,     "YYMMDD"                    ;261 YYMMDD
     TCODE    .1,    .1,      "OSTC "                     ;262 OSTC 
-    TCODE    .65,   .168,    "Bail"                      ;263 Bail
+    TCODE    .65,   .168,    "Bail "                     ;263 Bail 
     TCODE    .7,    .48,     "Air   "                    ;264 Air
     TCODE    .120,  .135,    "Air   "                    ;265 Air
     TCODE    .2,    .39,     "Calibrate"                 ;266 Calibrate
--- a/code_part1/OSTC_code_asm_part1/french_text.asm	Sat May 07 09:26:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/french_text.asm	Sat May 07 12:13:08 2011 +0200
@@ -341,7 +341,7 @@
     TCODE    .105,  .35,     "JJMMAA"                    ;260 DDMMYY
     TCODE    .105,  .35,     "AAMMJJ"                    ;261 YYMMDD
     TCODE    .1,    .1,      "OSTC "                     ;262 OSTC 
-    TCODE    .65,   .168,    "Bail"                      ;263 Bail
+    TCODE    .65,   .168,    "Bail "                     ;263 Bail 
     TCODE    .7,    .48,     "Air   "                    ;264 Air
     TCODE    .120,  .135,    "Air   "                    ;265 Air
     TCODE    .2,    .39,     "Calibrer"                  ;266 Calibrate
--- a/code_part1/OSTC_code_asm_part1/german_text.asm	Sat May 07 09:26:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/german_text.asm	Sat May 07 12:13:08 2011 +0200
@@ -341,7 +341,7 @@
     TCODE    .105,  .35,     "DDMMYY"                    ;260 DDMMYY
     TCODE    .105,  .35,     "YYMMDD"                    ;261 YYMMDD
     TCODE    .1,    .1,      "OSTC "                     ;262 OSTC 
-    TCODE    .65,   .168,    "Bail"                      ;263 Bail
+    TCODE    .65,   .168,    "Bail "                     ;263 Bail 
     TCODE    .7,    .48,     "Luft  "                    ;264 Air
     TCODE    .120,  .135,    "Luft  "                    ;265 Air
     TCODE    .2,    .39,     "Kalibrieren"               ;266 Calibrate
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Sat May 07 09:26:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Sat May 07 12:13:08 2011 +0200
@@ -2978,7 +2978,7 @@
 
 ; Yes, Display "Bail"
 	call		PLED_standard_color
-	OUTPUTTEXTH		d'263'			;"Bail"
+	OUTPUTTEXTH		d'263'			;"Bail "
 	call	word_processor
 	return
 
@@ -3026,7 +3026,7 @@
 	call		sub16					; sub_c = sub_a - sub_b
 
 	btfss		neg_flag
-	bra			PLED_const_ppO2_value11			; Value in range
+	bra			PLED_const_ppO2_value11	; Value in range (lower then fix Setpoint)
 
 	; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value!
 
@@ -3035,28 +3035,47 @@
 	movlw		d'100'
 	movwf		xB+0
 	clrf		xB+1
-	call		div16x16				;xA/xB=xC with xA as remainder 	
-
-	movff		xC+0,char_I_const_ppO2			; No, Overwrite with actual value
+	call		div16x16					;xA/xB=xC with xA as remainder 	
+
+	movff		xC+0,char_I_const_ppO2		; No, Overwrite with actual value
+	movff		xC+1,hi						; For test if ppO2>2,55Bar
 	
-	GETCUSTOM8	d'39'							; Adjust fixed SP?
+	GETCUSTOM8	d'39'						; Adjust fixed SP?
 	dcfsnz		WREG,F
-	bra			PLED_const_ppO2_value1a			; Yes!
+	bra			PLED_const_ppO2_value1a		; Yes!
 	; Do not adjust -> restore original SetPoint
 
 PLED_const_ppO2_value11:
 ; Setpoint in possible limits
 	movff		ppO2_setpoint_store,char_I_const_ppO2		; Restore Setpoint
+	clrf		hi
+	
 
 PLED_const_ppO2_value1a:
-	PLED_color_code		warn_ppo2		; Color-code output
 	movff	char_I_const_ppO2,lo
-	clrf	hi
+
+	movff	lo,WREG					; copy to WREG
+	mullw	.100
+	movff	PRODH,xC+1
+	movff	PRODL,xC+0				; For color code
+	PLED_color_code		warn_ppo2	; Color-code output (ppO2 stored in xC)	
+
+	tstfsz	hi						; >2,55bar?
+	rcall	PLED_const_ppO2_too_hi	; Yes
+
 	bsf		leftbind
 	output_16dp	d'3'
 	bcf		leftbind
-	call	word_processor
-	call	PLED_standard_color
+	STRCAT_PRINT  " "				; Display Setpoint with training zero
+	call	PLED_standard_color		; Reset color
+	return
+
+PLED_const_ppO2_too_hi:
+	movlw	'>'
+	movwf	POSTINC2				; Put ">" from WREG into buffer
+	setf	lo						; show ">2.55"
+	clrf	hi						; clear hi
+	call	PLED_warnings_color		; Set Warning color
 	return
 
 ;=============================================================================
@@ -3131,7 +3150,6 @@
 	output_16dp	d'3'					; Show ppO2 w/o leading zero
 	bcf		leftbind
 	STRCAT_PRINT  " "					;  Display ppO2[Diluent]
-
 	return
 
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/spanish_text.asm	Sat May 07 09:26:47 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/spanish_text.asm	Sat May 07 12:13:08 2011 +0200
@@ -340,7 +340,7 @@
     TCODE    .105,  .35,     "DDMMAA"                    ;260 DDMMYY
     TCODE    .105,  .35,     "AAMMDD"                    ;261 YYMMDD
     TCODE    .1,    .1,      "OSTC "                     ;262 OSTC 
-    TCODE    .65,   .168,    "Bail"                      ;263 Bail
+    TCODE    .65,   .168,    "Bail "                     ;263 Bail 
     TCODE    .7,    .48,     "Aire  "                    ;264 Air
     TCODE    .120,  .135,    "Aire  "                    ;265 Air
     TCODE    .2,    .39,     "Calibrar"                  ;266 Calibrate