changeset 406:2534277be060

Bug #52 fixed (ppO2 blinking if setpoint is not physically possible)
author heinrichsweikamp
date Wed, 06 Jul 2011 22:06:40 +0200
parents dd780d7b352b
children 47b1135cbff3
files code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm
diffstat 3 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm	Thu Jun 30 19:47:53 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/definitions.asm	Wed Jul 06 22:06:40 2011 +0200
@@ -85,8 +85,8 @@
 
 ;=============================================================================
 
-#include "../OSTC_code_c_part2/shared_definitions.h"
-;#include "shared_definitions.h"
+;#include "../OSTC_code_c_part2/shared_definitions.h"
+#include "shared_definitions.h"
 
 ;=============================================================================
 ; Reserve space for C-code data space. Eg.when calling log.
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Thu Jun 30 19:47:53 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Wed Jul 06 22:06:40 2011 +0200
@@ -120,8 +120,8 @@
 diveloop_loop1z
 	bcf		update_divetime				; clear flag
 
-	btfsc	FLAG_const_ppO2_mode		; only in const_ppO2_mode
-	call	PLED_const_ppO2_value		; display const ppO2 setting in [bar]
+;	btfsc	FLAG_const_ppO2_mode		; only in const_ppO2_mode
+;	call	PLED_const_ppO2_value		; display const ppO2 setting in [bar]
 	btfsc	ppO2_show_value				; show ppO2?
 	call	check_ppO2					; check ppO2 and displays warning if required
 
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Thu Jun 30 19:47:53 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Wed Jul 06 22:06:40 2011 +0200
@@ -3107,6 +3107,7 @@
 	cpfslt		xC+0							; Setpoint value possible?
 	bra			PLED_const_ppO2_value1			; Yes
 
+	clrf		hi								; Reset hi
 	movff		xC+0,char_I_const_ppO2			; No, Overwrite with actual value
 	bra			PLED_const_ppO2_value1a
 
@@ -3136,19 +3137,19 @@
 
 	; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value!
 
-	movff		xC+0,xA+0
+	movff		xC+0,xA+0				; xC=p_amb/10
 	movff		xC+1,xA+1
 	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
-	movff		xC+1,hi						; For test if ppO2>2,55bar
+	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:
@@ -3156,7 +3157,6 @@
 	movff		ppO2_setpoint_store,char_I_const_ppO2		; Restore Setpoint
 	clrf		hi
 	
-
 PLED_const_ppO2_value1a:
 	movff	char_I_const_ppO2,lo
 
@@ -3172,7 +3172,7 @@
 	bsf		leftbind
 	output_16dp	d'3'
 	bcf		leftbind
-	STRCAT_PRINT  " "				; Display Setpoint with training zero
+	STRCAT_PRINT  " "				; Display Setpoint with trailing zero
 	call	PLED_standard_color		; Reset color
 	return