diff code_part1/OSTC_code_asm_part1/customview.asm @ 552:44e9b961f156

Compute ppO2 for pSCR diving
author heinrichsweikamp
date Sat, 04 Feb 2012 18:23:36 +0100
parents 9fc8feff27a5
children cda5b45b953f
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/customview.asm	Thu Feb 02 19:43:45 2012 +0100
+++ b/code_part1/OSTC_code_asm_part1/customview.asm	Sat Feb 04 18:23:36 2012 +0100
@@ -89,7 +89,8 @@
 	bra		customview_1sec_@5          ; Show TTS for extra time.
 	dcfsnz	WREG,F
 	bra		customview_1sec_cave_bailout; Show Cave conso prediction.
-
+	dcfsnz	WREG,F
+	bra		customview_1sec_pSCR_ppO2	; Show/Update pSCR ppO2
 	; Menupos3=0, do nothing
 	return
 
@@ -133,6 +134,10 @@
 	bsf		menu3_active                ; Set Flag
     goto    PLED_show_cave_bailout
 
+customview_1sec_pSCR_ppO2:
+	goto	PLED_show_pSCR_ppO2			; Yes, compute and show value
+	
+
 ;=============================================================================
 ; Do every-minute tasks for the custom view area
 
@@ -156,6 +161,8 @@
 	bra		customview_minute_@5        ; Show TTS for extra time.
 	dcfsnz	WREG,F
 	bra		customview_minute_cave_bailout; Show Cave consomation prediction.
+	dcfsnz	WREG,F
+	bra		customview_minute_pSCR_ppO2; Show pSCR ppO2 level
 
 	; Menupos3=0, do nothing
 	return
@@ -173,6 +180,7 @@
 customview_minute_stopwatch:            ; Do nothing extra
 customview_minute_average:				; Do nothing extra
 customview_minute_graphs:               ; Do nothing extra
+customview_minute_pSCR_ppO2:            ; Do nothing extra
 	return
 
 ;=============================================================================
@@ -186,7 +194,7 @@
 	bra		customview_toggle_exit			; Yes, ignore custom view in divemode completely
 
 	incf	menupos3,F			            ; Number of customview to show
-	movlw	d'9'							; Max number
+	movlw	d'10'							; Max number
 	cpfsgt	menupos3			            ; Max reached?
 	bra		customview_mask		            ; No, show
 	clrf	menupos3			            ; Reset to zero (Zero=no custom view)
@@ -214,6 +222,8 @@
 	bra		customview_init_@5              ; 8: Show TTS for extra time.
 	dcfsnz	WREG,F
 	bra		customview_init_cave_bailout    ; 9: Show Cave consomation prediction.
+	dcfsnz	WREG,F
+	bra		customview_init_pSCR_ppo2	    ; 10: Show ppO2 for pSCR users
 
 customview_init_nocustomview:
 	bra		customview_toggle_exit	
@@ -320,6 +330,15 @@
 
 	bra         customview_toggle_exit
 
+customview_init_pSCR_ppo2:
+ 	GETCUSTOM8	d'61'					; Show pSCR ppO2?
+	decfsz		WREG,F					; WREG=1?	
+	bra			customview_toggle		; No, use next Customview
+
+    call        PLED_show_pSCR_ppO2		; Yes, compute and show value
+	
+	bra         customview_toggle_exit
+
 customview_toggle_exit:
 	bcf		toggle_customview			; Clear flag
 	ostc_debug	'Y'		                ; Sends debug-information to screen in debugmode