diff code_part1/OSTC_code_asm_part1/customview.asm @ 129:06c4899ddb4b

Custom views in dive mode configrable (New CF50-CF53) Total Average Depth (Non-Resetable) Some Display fixes in Divemode Bugfix Timeout reset in Surfacemode
author Heinrichsweikamp
date Tue, 04 Jan 2011 16:32:28 +0100
parents 6a94f96e9cea
children 03df42de03e1
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/customview.asm	Tue Jan 04 02:49:15 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/customview.asm	Tue Jan 04 16:32:28 2011 +0100
@@ -60,8 +60,14 @@
 	bra		customview_1sec_clock			; Update the Clock
 	dcfsnz	temp1,F
 	bra		customview_1sec_lead_tiss		; Update the leading tissue
+	dcfsnz	temp1,F
+	bra		customview_1sec_average			; Update the Average depth
 	; Menupos3=0, do nothing
 	return
+
+customview_1sec_average:
+	call	PLED_total_average_show2	; Update the figures only
+	return
 	
 customview_1sec_stopwatch:
 	call	PLED_stopwatch_show2	; Update figures only
@@ -83,6 +89,8 @@
 	bra		customview_minute_clock			; Update the Clock
 	dcfsnz	temp1,F
 	bra		customview_minute_lead_tiss		; Update the leading tissue
+	dcfsnz	temp1,F
+	bra		customview_minute_average		; Update the Average depth
 	; Menupos3=0, do nothing
 	return
 
@@ -96,12 +104,13 @@
 
 customview_minute_marker:			; Do nothing extra
 customview_minute_stopwatch:		; Do nothing extra
+customview_minute_average:			; Do nothing extra
 	return
 
 customview_toggle:		; Yes, show next customview (and delete this flag)
 	ostc_debug	'X'		; Sends debug-information to screen if debugmode active
 	incf	menupos3,F			; Number of customview to show
-	movlw	d'4'				; Max number
+	movlw	d'5'				; Max number
 	cpfsgt	menupos3			; Max reached?
 	bra		customview_mask		; No, show
 	clrf	menupos3			; Reset to zero (Zero=no custom view)
@@ -116,16 +125,29 @@
 	bra		customview_init_clock			; Show the clock
 	dcfsnz	temp1,F
 	bra		customview_init_lead_tissue		; Show the leading tissue
+	dcfsnz	temp1,F
+	bra		customview_init_average			; Show Total average depth
 ;	bra		customview_init_nocustomview	; menupos3=0 -> No Customview
 customview_init_nocustomview:
 	bra		customview_toggle_exit	
 
+customview_init_average:
+	call	PLED_total_average_show		; Show Average with mask
+	bra		customview_toggle_exit	
+
 customview_init_stopwatch:
-; Init Stopwatch
-	call	PLED_stopwatch_show
+	GETCUSTOM8	d'51'					; Show Stopwatch? (=1 in WREG)
+	decfsz		WREG,F					; WREG=1?	
+	bra			customview_toggle		; No, use next Customview
+
+	call	PLED_stopwatch_show			; Init Stopwatch display
 	bra		customview_toggle_exit	
 
 customview_init_marker:					; Init Marker 
+	GETCUSTOM8	d'50'					; Show Marker? (=1 in WREG)
+	decfsz		WREG,F					; WREG=1?	
+	bra			customview_toggle		; No, use next Customview
+
 	DISPLAYTEXT		d'151'				; Set Marker?
 	bra		customview_toggle_exit	
 
@@ -134,9 +156,18 @@
 	bra		customview_toggle_exit	
 
 customview_init_lead_tissue:			; Show leading tissue
+	GETCUSTOM8	d'53'					; Show Lead Tissue? (=1 in WREG)
+	decfsz		WREG,F					; WREG=1?	
+	bra			customview_toggle		; No, use next Customview
+
 	call	PLED_show_leading_tissue
 	bra		customview_toggle_exit	
 
+;customview_init_graphs:					; Show tissue graph
+; 	GETCUSTOM8	d'52'					; Show Tissue Graph? (=1 in WREG)
+;	decfsz		WREG,F					; WREG=1?	
+;	bra			customview_toggle		; No, use next Customview
+
 customview_toggle_exit:
 	bcf		toggle_customview			; Clear flag
 	ostc_debug	'Y'		; Sends debug-information to screen if debugmode active
@@ -200,7 +231,8 @@
 
 surfcustomview_toggle_exit:
 	bcf		toggle_customview			; Clear flag
-
+	clrf	timeout_counter2			; Clear timeout
+	return