changeset 607:227eaded4e1b

Small layout change for mainscreen
author heinrichsweikamp
date Thu, 12 Jul 2012 19:39:00 +0200
parents 4f43aee67da0
children b919b8f0b789
files code_part1/OSTC_code_asm_part1/english_text.asm code_part1/OSTC_code_asm_part1/french_text.asm code_part1/OSTC_code_asm_part1/german_text.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/russian_text.asm code_part1/OSTC_code_asm_part1/spanish_text.asm code_part1/OSTC_code_asm_part1/surfmode.asm code_part1/OSTC_code_asm_part1/turkish_text.asm
diffstat 8 files changed, 118 insertions(+), 164 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/english_text.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/english_text.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -107,18 +107,15 @@
 #DEFINE	TXT_GFLO6			 "GF_lo:"                    ; "GF_lo:"
 #DEFINE	TXT_GFHI6			 "GF_hi:"                    ; "GF_hi:"
 #DEFINE	TXT_PPO2_5			 "ppO2:"                     ; "ppO2:" 
-#DEFINE	TXT_OC_O1			 "O"                         ; "O"     
-#DEFINE	TXT_OC_C1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C1_1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C2_1			 "C"                         ; "C"     
-#DEFINE	TXT_GF_G1			 "G"                         ; "G"     
-#DEFINE	TXT_GF_F1			 "F"                         ; "F"     
 #DEFINE	TXT_SP2				 "SP"                        ; "SP"    
 #DEFINE	TXT_DIL4			 "Dil:"                      ; "Dil:"  
 #DEFINE	TXT_N2_2			 "N2"                        ; "N2"    
-#DEFINE	TXT_HE2				 "He"                        ; "He"    
-#DEFINE	TXT_PSCR_P1			 "p"                         ; "P"
-#DEFINE	TXT_PSCR_S1			 "S"                         ; "S"
+#DEFINE	TXT_HE2				 "He"                        ; "He"   
+#DEFINE	TXT_TX1				 "T"						 ; "T"
+#DEFINE	TXT_TX2				 "x"						 ; "x"
+#DEFINE	TXT_NX1				 "N"						 ; "N"
+#DEFINE	TXT_NX2				 "x"						 ; "x"
+ 
 #ENDIF                                                                   
 ;=============================================================================
 ;   macro     X     Y        "translation"               ; English original
--- a/code_part1/OSTC_code_asm_part1/french_text.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/french_text.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -108,18 +108,14 @@
 #DEFINE	TXT_GFLO6			 "GF_lo:"                    ; "GF_lo:"
 #DEFINE	TXT_GFHI6			 "GF_hi:"                    ; "GF_hi:"
 #DEFINE	TXT_PPO2_5			 "ppO2:"                     ; "ppO2:" 
-#DEFINE	TXT_OC_O1			 "O"                         ; "O"     
-#DEFINE	TXT_OC_C1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C1_1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C2_1			 "C"                         ; "C"     
-#DEFINE	TXT_GF_G1			 "G"                         ; "G"     
-#DEFINE	TXT_GF_F1			 "F"                         ; "F"     
 #DEFINE	TXT_SP2				 "SP"                        ; "SP"    
 #DEFINE	TXT_DIL4			 "Dil:"                      ; "Dil:"  
 #DEFINE	TXT_N2_2			 "N2"                        ; "N2"    
 #DEFINE	TXT_HE2				 "He"                        ; "He"    
-#DEFINE	TXT_PSCR_P1			 "p"                         ; "P"
-#DEFINE	TXT_PSCR_S1			 "S"                         ; "S"
+#DEFINE	TXT_TX1				 "T"						 ; "T"
+#DEFINE	TXT_TX2				 "x"						 ; "x"
+#DEFINE	TXT_NX1				 "N"						 ; "N"
+#DEFINE	TXT_NX2				 "x"						 ; "x"
                                                                          
 #ENDIF                                                                   
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/german_text.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/german_text.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -107,18 +107,14 @@
 #DEFINE	TXT_GFLO6			 "GF_lo:"                    ; "GF_lo:"
 #DEFINE	TXT_GFHI6			 "GF_hi:"                    ; "GF_hi:"
 #DEFINE	TXT_PPO2_5			 "ppO2:"                     ; "ppO2:" 
-#DEFINE	TXT_OC_O1			 "O"                         ; "O"     
-#DEFINE	TXT_OC_C1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C1_1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C2_1			 "C"                         ; "C"     
-#DEFINE	TXT_GF_G1			 "G"                         ; "G"     
-#DEFINE	TXT_GF_F1			 "F"                         ; "F"     
 #DEFINE	TXT_SP2				 "SP"                        ; "SP"    
 #DEFINE	TXT_DIL4			 "Dil:"                      ; "Dil:"  
 #DEFINE	TXT_N2_2			 "N2"                        ; "N2"    
 #DEFINE	TXT_HE2				 "He"                        ; "He"    
-#DEFINE	TXT_PSCR_P1			 "p"                         ; "P"
-#DEFINE	TXT_PSCR_S1			 "S"                         ; "S"
+#DEFINE	TXT_TX1				 "T"						 ; "T"
+#DEFINE	TXT_TX2				 "x"						 ; "x"
+#DEFINE	TXT_NX1				 "N"						 ; "N"
+#DEFINE	TXT_NX2				 "x"						 ; "x"
                                                                          
 #ENDIF                                                                   
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -1266,92 +1266,6 @@
     call    PLED_standard_color ; Back to normal (if O2<21 and He=0)
 	return
 
-PLED_display_decotype_surface:
-	WIN_LEFT	.85
-	WIN_FONT 	FT_SMALL
-	WIN_INVERT	.0					; Init new Wordprocessor
-	call	PLED_standard_color
-
-	clrf	EEADRH
-	read_int_eeprom d'34'		; Read deco data	
-	tstfsz	EEDATA
-	bra		show_decotype_surface2
-
-	;EEDATA=0
-	;ZH-L16-OC
-	WIN_TOP		.125
-    STRCPY_PRINT TXT_OC_O1
-
-	WIN_TOP		.150
-    STRCPY_PRINT TXT_OC_C1
-	return		
-
-show_decotype_surface2:
-	decf	EEDATA,F
-	tstfsz	EEDATA
-	bra		show_decotype_surface3
-	;EEDATA=1
-	;Gauge
-	return
-	
-show_decotype_surface3:
-    decf	EEDATA,F
-    tstfsz	EEDATA
-    bra	show_decotype_surface4
-	;EEDATA=2
-	;ZH-L16-CC
-    WIN_TOP		.125
-    call	PLED_standard_color
-    
-    STRCPY_PRINT TXT_CC_C1_1
-    
-    WIN_TOP		.150
-#IF TXT_CC_C1_1 == TXT_CC_C2_1
-    call	word_processor              ; Twice the same string.
-#ELSE
-    STRCPY_PRINT TXT_CC_C2_1
-#ENDIF
-    return
-
-show_decotype_surface4:
-	decf	EEDATA,F
-	tstfsz	EEDATA
-	bra		show_decotype_surface5
-	;EEDATA=3
-	;Apnoe
-	return
-
-show_decotype_surface5:
-    decf	EEDATA,F
-    tstfsz	EEDATA
-    bra		show_decotype_surface6
-	;EEDATA=4
-show_decotype_surface5_2:
-	;EEDATA=5
-    ;ZH16-GF OC or ZH16-GF CC
-    WIN_TOP		.125
-    STRCPY_PRINT TXT_GF_G1
-    
-    WIN_TOP		.150
-    STRCPY_PRINT TXT_GF_F1
-    return
-
-show_decotype_surface6:
-    decf	EEDATA,F
-    tstfsz	EEDATA
-    bra		show_decotype_surface7
-	bra		show_decotype_surface5_2
-show_decotype_surface7:
-	;EEDATA=6:
-   	;pSCR-GF  
-    WIN_TOP		.125
-    STRCPY_PRINT TXT_PSCR_P1
-    
-    WIN_TOP		.150
-    STRCPY_PRINT TXT_PSCR_S1
-    return
-
-
 ;-----------------------------------------------------------------------------
 ; Set color to grey when gas is inactive
 ; Inputs: WREG : gas# (0..4)
@@ -1544,7 +1458,7 @@
 	bcf		leftbind
 
 	STRCAT_PRINT  TXT_BAR3
-	bra		PLED_active_gas_surfmode_exit
+	return								; Done.
 
 PLED_active_gas_surfmode2:
 	WIN_TOP		.130
@@ -1553,7 +1467,6 @@
 	WIN_INVERT	.0					; Init new Wordprocessor
 	call	PLED_standard_color
 
-
 	read_int_eeprom 	d'33'			; Read byte (stored in EEDATA)
 	movff	EEDATA,active_gas			; Read start gas (1-5)
 
@@ -1591,28 +1504,56 @@
 	movff	char_I_He_ratio,hi			; Copy into Bank1 register
 
 	movlw	d'21'
-	cpfseq	lo				; Air? (O2=21%)
-	bra		PLED_active_gas_surfmode4 ; No!
+	cpfseq	lo							; Air? (O2=21%)
+	bra		PLED_active_gas_surfmode4 	; No!
 	tstfsz	hi							; Air? (He=0%)
-	bra		PLED_active_gas_surfmode4 ; No!
+	bra		PLED_active_gas_surfmode4 	; No!
 	
 							; Yes, display "Air" instead of 21/0
 	DISPLAYTEXTH		d'265'		;"Air  ", y-scale=2
-	bra		PLED_active_gas_surfmode_exit
+	return								; Done.
 
 PLED_active_gas_surfmode4:
 	lfsr	FSR2,letter
 	bsf		leftbind			; left orientated output
 	output_99					; O2 ratio is still in "lo"
+	movff	char_I_He_ratio,lo	; copy He ratio into lo
+	tstfsz	lo					; He>0?
+	bra		PLED_active_gas_surfmode5	; Yes.
+	bra		PLED_active_gas_surfmode6	; No, skip He
+PLED_active_gas_surfmode5:	
 	PUTC    '/'
-	movff	char_I_He_ratio,lo		; copy He ratio into lo
 	output_99
+PLED_active_gas_surfmode6:
 	bcf		leftbind
 	call	word_processor
-;	bra		PLED_active_gas_surfmode_exit
-PLED_active_gas_surfmode_exit:
-;   WIN_FRAME_BLACK   .122, .175, .82, .159
+
+	rcall	PLED_mainscreen_show_nx
+	tstfsz	lo					; He>0?
+	rcall	PLED_mainscreen_show_tx	; Yes
+	return								; Done.
+
+PLED_mainscreen_show_tx:
+	WIN_LEFT	.85
+	WIN_FONT 	FT_SMALL
+	WIN_INVERT	.0					; Init new Wordprocessor
+   	WIN_TOP		.127
+
+   	STRCPY_PRINT TXT_TX1
+  	WIN_TOP		.148
+	STRCPY_PRINT TXT_TX2
 	return
+PLED_mainscreen_show_nx:
+	WIN_LEFT	.85
+   	WIN_TOP		.127
+	WIN_FONT 	FT_SMALL
+	WIN_INVERT	.0					; Init new Wordprocessor
+
+   	STRCPY_PRINT TXT_NX1
+  	WIN_TOP		.148
+	STRCPY_PRINT TXT_NX2
+	return
+
 
 PLED_confirmbox:
     WIN_BOX_BLACK   .68, .146, .34, .101		;top, bottom, left, right
@@ -2481,17 +2422,41 @@
   endif
 
 	lfsr	FSR2,letter
-	OUTPUTTEXTH		d'262'              ; "OSTC "
-	clrf	EEADRH
-	clrf	EEADR                       ; Get Serial number LOW
-	call	read_eeprom                 ; read byte
-	movff	EEDATA,lo
-	incf	EEADR,F                     ; Get Serial number HIGH
-	call	read_eeprom                 ; read byte
-	movff	EEDATA,hi
-
-	bsf		leftbind
-	output_16
+	read_int_eeprom d'34'		; Read deco data
+	tstfsz	EEDATA
+	bra		show_decotype_mainscreen2
+	OUTPUTTEXT	.101			; ZH-L16 OC =0
+	bra		show_decotype_mainscreen8	; Done.
+show_decotype_mainscreen2:
+	decfsz	EEDATA,F
+	bra		show_decotype_mainscreen3
+	OUTPUTTEXT	.102			; Gauge	=1
+	bra		show_decotype_mainscreen8	; Done.
+show_decotype_mainscreen3:
+	decfsz	EEDATA,F
+	bra		show_decotype_mainscreen4
+	OUTPUTTEXT	.104			; ZH-L16 CC =2
+	bra		show_decotype_mainscreen8	; Done.
+show_decotype_mainscreen4:
+	decfsz	EEDATA,F
+	bra		show_decotype_mainscreen5
+	OUTPUTTEXT	.138			; Apnoe	=3
+	bra		show_decotype_mainscreen8	; Done.
+show_decotype_mainscreen5:
+	decfsz	EEDATA,F
+	bra		show_decotype_mainscreen6
+	OUTPUTTEXT	.152			; L16-GF OC	=4
+	bra		show_decotype_mainscreen8	; Done.
+show_decotype_mainscreen6:
+	decfsz	EEDATA,F
+	bra		show_decotype_mainscreen7
+	OUTPUTTEXT	.236			; L16-GF CC	=5
+	bra		show_decotype_mainscreen8	; Done.
+show_decotype_mainscreen7:
+	decfsz	EEDATA,F
+	bra		show_decotype_mainscreen8	; Done.
+	OUTPUTTEXT	.226			; pSCR-GF =6
+show_decotype_mainscreen8:
 	STRCAT  " \x90\x91 V"               ; Scribble logo...
 	movlw	softwareversion_x
 	movwf	lo
@@ -3789,7 +3754,7 @@
 	read_int_eeprom	d'64'
 	movlw	d'1'
 	cpfseq	EEDATA						; Custom text active?
-	bra		PLED_clear_custom_text		; No, Delete row
+	bra		PLED_custom_text_serial		; No, show serial instead
 	WIN_TOP		.200
 	WIN_LEFT	.0
 	WIN_FONT 	FT_SMALL
@@ -3825,12 +3790,26 @@
 	call	read_eeprom					; Read letter
 	return
 
-PLED_clear_custom_text:
-	movlw		d'24'
-	movwf		temp1
+PLED_custom_text_serial:
 	WIN_TOP		.200
-	WIN_LEFT	.0
-	call		PLED_display_clear_common_y1
+	WIN_LEFT	.50
+	WIN_FONT 	FT_SMALL
+	WIN_INVERT	.0					; Init new Wordprocessor
+	call		PLED_divemask_color	; Set Color for Divemode mask
+
+	lfsr	FSR2,letter
+	OUTPUTTEXTH		d'262'              ; "OSTC "
+	clrf	EEADRH
+	clrf	EEADR                       ; Get Serial number LOW
+	call	read_eeprom                 ; read byte
+	movff	EEDATA,lo
+	incf	EEADR,F                     ; Get Serial number HIGH
+	call	read_eeprom                 ; read byte
+	movff	EEDATA,hi
+	bsf		leftbind
+	output_16
+	call	word_processor
+	call	PLED_standard_color
 	return
 
 PLED_simdata_screen:			;Display Pre-Dive Screen
--- a/code_part1/OSTC_code_asm_part1/russian_text.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/russian_text.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -110,18 +110,14 @@
 #DEFINE	TXT_GFLO6			 "ÃÔíèæ:"                    ; "GF_lo:"
 #DEFINE	TXT_GFHI6			 "ÃÔâðõ:"                    ; "GF_hi:"
 #DEFINE	TXT_PPO2_5			 "ppO2:"                     ; "ppO2:" 
-#DEFINE	TXT_OC_O1			 "O"                         ; "O"     
-#DEFINE	TXT_OC_C1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C1_1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C2_1			 "C"                         ; "C"     
-#DEFINE	TXT_GF_G1			 "G"                         ; "G"     
-#DEFINE	TXT_GF_F1			 "F"                         ; "F"     
 #DEFINE	TXT_SP2				 "ÑÏ"                        ; "SP"    
 #DEFINE	TXT_DIL4			 "Äèë:"                      ; "Dil:"  
 #DEFINE	TXT_N2_2			 "N2"                        ; "N2"    
 #DEFINE	TXT_HE2				 "He"                        ; "He"    
-#DEFINE	TXT_PSCR_P1			 "p"                         ; "P"
-#DEFINE	TXT_PSCR_S1			 "S"                         ; "S"
+#DEFINE	TXT_TX1				 "T"						 ; "T"
+#DEFINE	TXT_TX2				 "x"						 ; "x"
+#DEFINE	TXT_NX1				 "N"						 ; "N"
+#DEFINE	TXT_NX2				 "x"						 ; "x"
 
 #ENDIF
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/spanish_text.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/spanish_text.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -106,18 +106,14 @@
 #DEFINE	TXT_GFLO6			 "GF_lo:"                    ; "GF_lo:"
 #DEFINE	TXT_GFHI6			 "GF_hi:"                    ; "GF_hi:"
 #DEFINE	TXT_PPO2_5			 "ppO2:"                     ; "ppO2:" 
-#DEFINE	TXT_OC_O1			 "O"                         ; "O"     
-#DEFINE	TXT_OC_C1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C1_1			 "C"                         ; "C"     
-#DEFINE	TXT_CC_C2_1			 "C"                         ; "C"     
-#DEFINE	TXT_GF_G1			 "G"                         ; "G"     
-#DEFINE	TXT_GF_F1			 "F"                         ; "F"     
 #DEFINE	TXT_SP2				 "SP"                        ; "SP"    
 #DEFINE	TXT_DIL4			 "Dil:"                      ; "Dil:"  
 #DEFINE	TXT_N2_2			 "N2"                        ; "N2"    
 #DEFINE	TXT_HE2				 "He"                        ; "He"    
-#DEFINE	TXT_PSCR_P1			 "p"                         ; "P"
-#DEFINE	TXT_PSCR_S1			 "S"                         ; "S"
+#DEFINE	TXT_TX1				 "T"						 ; "T"
+#DEFINE	TXT_TX2				 "x"						 ; "x"
+#DEFINE	TXT_NX1				 "N"						 ; "N"
+#DEFINE	TXT_NX2				 "x"						 ; "x"
                                                                          
 #ENDIF                                                                   
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/surfmode.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -55,7 +55,6 @@
 	call	PLED_nofly_time					; display nofly time
 
 	call	PLED_active_gas_surfmode		; Show start gas
-	call	PLED_display_decotype_surface	; Show deco mode (ZH-L16, const. ppO2 or Multi-GF)
 
 surfloop1:
 	btfss	gauge_mode					; Display only in gauge mode	
@@ -132,7 +131,6 @@
 	call	timeout_premenu				; timeout premenu
 	call	set_leds_surfmode			; Sets Warning and No-Fly LEDs
 	call    check_customfunctions       ; Checks CF functions and displays warning symbol if something critical is wrong
-	call	PLED_display_decotype_surface	; Show deco mode
 	call	surfcustomview_second		; Do every-second tasks for the custom view area
 	call    dive_type_icons             ; Draw Air/Nitrox/Trimix color icon.
 
--- a/code_part1/OSTC_code_asm_part1/turkish_text.asm	Thu Jul 05 11:25:32 2012 +0200
+++ b/code_part1/OSTC_code_asm_part1/turkish_text.asm	Thu Jul 12 19:39:00 2012 +0200
@@ -107,18 +107,14 @@
 #DEFINE	TXT_GFLO6		     "GFmin:"                    ; "GF_lo:"
 #DEFINE	TXT_GFHI6		     "GFmax:"                    ; "GF_hi:"
 #DEFINE	TXT_PPO2_5		     "ppO2:"                     ; "ppO2:"
-#DEFINE	TXT_OC_O1		     "O"                         ; "O"
-#DEFINE	TXT_OC_C1		     "C"                         ; "C"
-#DEFINE	TXT_CC_C1_1		     "C"                         ; "C"
-#DEFINE	TXT_CC_C2_1		     "C"                         ; "C"
-#DEFINE	TXT_GF_G1		     "G"                         ; "G"
-#DEFINE	TXT_GF_F1		     "F"                         ; "F"
 #DEFINE	TXT_SP2			     "SP"                        ; "SP"
 #DEFINE	TXT_DIL4		     "Dil:"                      ; "Dil:"
 #DEFINE	TXT_N2_2		     "N2"                        ; "N2"
 #DEFINE	TXT_HE2			     "He"                        ; "He"
-#DEFINE	TXT_PSCR_P1			 "p"                         ; "P"
-#DEFINE	TXT_PSCR_S1			 "S"                         ; "S"
+#DEFINE	TXT_TX1				 "T"						 ; "T"
+#DEFINE	TXT_TX2				 "x"						 ; "x"
+#DEFINE	TXT_NX1				 "N"						 ; "N"
+#DEFINE	TXT_NX2				 "x"						 ; "x"
                                                                          
 #ENDIF                                                                   
 ;=============================================================================