changeset 347:ba0f30f3d560

Ignore depths>130m in PC simulation
author heinrichsweikamp
date Wed, 25 May 2011 20:44:29 +0200
parents 193d1adc97b7
children d722a820b675
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/isr.asm
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Sat May 21 15:13:06 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Wed May 25 20:44:29 2011 +0200
@@ -1,3 +1,10 @@
+New in 1.91 beta:
+BETA Version - Do NOT use for diving!
+BUGFIX: Ignore depths>130m in PC simulation
+
+New in 1.90 Stable:
+Stable release
+
 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
--- a/code_part1/OSTC_code_asm_part1/isr.asm	Sat May 21 15:13:06 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/isr.asm	Wed May 25 20:44:29 2011 +0200
@@ -110,6 +110,13 @@
 
 simulator_int1:
 		movf	RCREG,w						; depth in m
+		movwf	PRODL						; Copy
+
+		movlw	d'140'						; Limit to 130m
+		cpfslt	PRODL						; compare with value in UART
+		movwf	PRODL						; Overwrite reading
+
+		movf	PRODL,w						; depth in m
 		mullw	d'100'						; result will be mbar
 		movff	PRODL,sim_pressure+0		; stored for pressure overwrite
 		movff	PRODH,sim_pressure+1