diff code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 124:4f9f477bb452

Rewrite display of decoplan: * Common stuff - fix clearing bottom of list, for fleecker-free updates. - fix "Wait..." topline_box while computing deco in planning - fix 'No Deco" std color and mark last page. - Allow stops up to 240' * ZHL-16c model: - 6 lines max (sim or dive) - Print exceed stops as "add: ddd'" * GF model - 6 lines in divemode, 8 in planning. - any suitable number of pages. - "more..." when not the last page displayed. - fix displaying special depth for last stop (CF#29). - fix 0-time stops: just skip display. - fix end of list when reached the deepest stop. - fix no need to buffer decoplan twice.
author JeanDo
date Sat, 01 Jan 2011 01:57:50 +0100
parents f24137eb85de
children e26f49674956
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Thu Dec 30 23:45:20 2010 +0100
+++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Sat Jan 01 01:57:50 2011 +0100
@@ -341,14 +341,14 @@
 	bsf		multi_gf_display			; Yes, display the multi-gf table screen
 	bcf		last_ceiling_gf_shown		; Clear flag
 
-	call	PLED_decoplan_gf_page1			; Display the new screen
+    clrf    decoplan_page               ; Starts on page 0
+	call	PLED_decoplan_gf			; Display the new screen
 	return
 	
 divemenu_see_decoplan1:	
-
-	movff	char_O_deco_status,deco_status		; 
-	tstfsz	deco_status							; deco_status=0 if decompression calculation done
-	return										; calculation not yet finished!
+    movff	char_O_deco_status,WREG
+    tstfsz	WREG                        ; deco_status=0 if decompression calculation done
+    return                              ; calculation not yet finished!
 	
 	call	PLED_decoplan				; display the Decoplan
 	return
@@ -362,7 +362,7 @@
 	bra		timeout_divemenu2			; quit menu!
 
 divemenu_see_decoplan2_nextgf:
-	incf	temp8,F
+	incf	decoplan_page,F
 	btfsc	last_ceiling_gf_shown		; last ceiling shown?
 	bra		divemenu_see_decoplan2_0	; All done, clear and return
 
@@ -588,7 +588,6 @@
 	btfss	menubit					; is the Dive mode menu displayed?
 	return							; No
 
-
 	btfsc	display_set_simulator	; Is the Simulator Mask active?
 	bra		timeout_divemenu6		; Yes, update Simulator mask
 	
@@ -598,8 +597,8 @@
 	btfsc	multi_gf_display		; display the multi-gf table screen?
 	bra		timeout_divemenu3		; Yes...
 
-	movff	char_O_deco_status,deco_status		; 
-	tstfsz	deco_status				; deco_status=0 if decompression calculation done
+	movff	char_O_deco_status,WREG
+	tstfsz	WREG                        ; deco_status=0 if decompression calculation done
 	bra		timeout_divemenu1		; No, skip updating the decoplan
 	
 	call	PLED_decoplan			; update the Decoplan
@@ -614,7 +613,7 @@
 ;	bra		timeout_divemenu2a		; No, normal OLED rebuild
 
 ; Restore some outputs
-	clrf	temp8					; Page 0-1 of deco list
+	clrf	decoplan_page           ; Page 0-1 of deco list
 	call	PLED_clear_divemode_menu; Clear dive mode menu
 
 	btfsc	FLAG_apnoe_mode				; Ignore in Apnoe mode
@@ -646,11 +645,11 @@
 	return
 	
 timeout_divemenu3:
-	movff	char_O_deco_status,deco_status	; 
-	tstfsz	deco_status						; deco_status=0 if decompression calculation done
+	movff	char_O_deco_status,WREG
+	tstfsz	WREG                        ; deco_status=0 if decompression calculation done
 	bra		timeout_divemenu1				; No, skip updating the decoplan
 timeout_divemenu3x:
-	call	PLED_decoplan_gf_page_current	; Re-Draw Current page of GF Decoplan
+	call	PLED_decoplan_gf            ; Re-Draw Current page of GF Decoplan
 	bra		timeout_divemenu1			; Check timeout
 	
 timeout_divemenu6: