diff src/customview.asm @ 53:2825f1d2262f

NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
author heinrichsweikamp
date Sun, 29 Sep 2013 18:53:22 +0200
parents 7c7d7644ca37
children 37275e0fa7f5
line wrap: on
line diff
--- a/src/customview.asm	Sun Sep 29 16:33:03 2013 +0200
+++ b/src/customview.asm	Sun Sep 29 18:53:22 2013 +0200
@@ -40,6 +40,10 @@
 	bra		customview_1sec_view4
 	dcfsnz	WREG,F
 	bra		customview_1sec_view5
+	dcfsnz	WREG,F
+	bra		customview_1sec_view6
+	dcfsnz	WREG,F
+	bra		customview_1sec_view7
 	; Menupos3=0, do nothing
 	return
 
@@ -58,6 +62,12 @@
 customview_1sec_view5:
     call    TFT_gf_info                     ; Update GF informations
     return
+customview_1sec_view6:
+    ; Compass updated seperately (Faster) in divemode
+    return
+customview_1sec_view7:                      ; Dynamic gaslist
+    call    TFT_dyn_gaslist                 ; Update the gaslist
+    return
 
 ;=============================================================================
 ; Do every-minute tasks for the custom view area
@@ -281,7 +291,7 @@
 customview_toggle:
 	bcf		switch_right
 	incf	menupos3,F			            ; Number of customview to show
-	movlw	d'6'							; Max number of customsviews in divemode
+	movlw	d'7'							; Max number of customsviews in divemode
 	cpfsgt	menupos3			            ; Max reached?
 	bra		customview_mask		            ; No, show
 customview_toggle_reset:					; Timeout occured
@@ -304,6 +314,8 @@
 	bra		customview_init_view5           ; GF informations
 	dcfsnz	WREG,F
 	bra		customview_init_view6           ; Compass
+	dcfsnz	WREG,F
+	bra		customview_init_view7           ; Dynamic gaslist
 customview_init_nocustomview:
     call    I2C_sleep_accelerometer         ; Stop accelerometer
     call    I2C_sleep_compass               ; Stop compass
@@ -361,6 +373,14 @@
     call	TFT_dive_compass_mask           ; Show compass
     bra		customview_toggle_exit
 
+customview_init_view7:                      ; Dynamic gaslist (View 7)
+	btfsc	FLAG_apnoe_mode					; In Apnoe mode?
+	bra		customview_toggle				; Yes, Call next view...
+	btfsc	FLAG_ccr_mode					; In CC mode?
+	bra		customview_toggle				; Yes, Call next view...
+    call    TFT_dyn_gaslist                 ; Show the dyn gaslist
+    bra		customview_toggle_exit
+
 customview_toggle_exit:
 	call	TFT_standard_color
 	bcf		toggle_customview			; Clear flag