changeset 199:f5e9db793dd3

Minor missing translations + MOD/END/EAD in translation table. + ON/OFF (French). + Desat in logbook. + Set date/time menu positionning. + Simulator menu positionning.
author JeanDo
date Mon, 14 Feb 2011 17:23:08 +0100
parents 1d98f30ed44e
children 0a3ca358c684
files code_part1/OSTC_code_asm_part1/altimeter.asm 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/menu_gassetup.asm code_part1/OSTC_code_asm_part1/menu_logbook.asm code_part1/OSTC_code_asm_part1/menu_settime.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/spanish_text.asm code_part1/OSTC_code_c_part2/p2_deco.o
diffstat 10 files changed, 97 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/altimeter.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/altimeter.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -259,11 +259,12 @@
         GETCUSTOM8  .49
         btfss       WREG,0
         bra         alt_menu_1
-        STRCAT_PRINT "ON "
+        OUTPUTTEXT  .130                ; ON
         bra         alt_menu_2
 alt_menu_1:
-        STRCAT_PRINT "OFF"
+        OUTPUTTEXT  .131                ; OFF
 alt_menu_2:
+        call word_processor
         
         DISPLAYTEXTH .291               ; Action reset
         DISPLAYTEXTH .292               ; Action add
--- a/code_part1/OSTC_code_asm_part1/english_text.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/english_text.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -379,4 +379,8 @@
 ;
 	TCODE    .20,   .125,    "Show raw data"             ;295 Show raw data
 	TCODE    .50,    .2,     "Raw Data:"                 ;296 Raw Data:
+; Gas-setup addons:
+    TCODE    .0,    .0,      "MOD:"                      ; 297 MOD:                 (max operating depth of a gas).
+    TCODE    .0,    .0,      "END:"                      ; 298 END:                 (equivalent nitrogen depth of a gas).
+    TCODE    .0,    .0,      "EAD:"                      ; 299 EAD:                 (equivalent air depth of a gas).
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/french_text.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/french_text.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -81,7 +81,7 @@
     TCODE    .20,  .35,      "Annuler RaZ"               ;021 Cancel Reset
     TCODE    .32,  .65,      "Heure:"                    ;022 Time:
     TCODE    .32,  .95,      "Date :"                    ;023 Date:
-    TCODE    .32,  .155,     "Rég. Heures"               ;024 Set Hours
+    TCODE    .32,  .155,     "Réglage Heures"            ;024 Set Hours     (see also 090..094)
     TCODE    .6,   .0,       "Initialisation..."         ;025 Reset...
     TCODE    .17,  .2,       "Carnet de plongées"        ;026 Logbook
     TCODE    .14,  .2,       "Config Fonctions I"        ;027 Custom Functions I
@@ -158,7 +158,7 @@
     TCODE    .0,    .0,      "Mois   "                   ;091 Month  
     TCODE    .0,    .0,      "Jour   "                   ;092 Day    
     TCODE    .0,    .0,      "Année  "                   ;093 Year   
-    TCODE    .0,    .0,      "Rég."                      ;094 Set 
+    TCODE    .0,    .0,      "Réglage "                  ;094 Set 
     TCODE    .0,    .0,      "#Gaz "                     ;095 Gas# 
     TCODE    .0,    .0,      "Oui"                       ;096 Yes
     TCODE    .0,    .0,      "Valeur:"                   ;097 Current:
@@ -194,8 +194,8 @@
     TCODE    .100,  .0,      "Sortie"                    ;127 Exit
     TCODE    .100,  .25,     "Suppr."                    ;128 Delete
     TCODE    .20,   .65,     "Débug:"                    ;129 Debug:
-    TCODE    .65,   .65,     "ON "                       ;130 ON 
-    TCODE    .65,   .65,     "OFF"                       ;131 OFF
+    TCODE    .65,   .65,     "OUI"                       ;130 ON 
+    TCODE    .65,   .65,     "NON"                       ;131 OFF
     TCODE    .100,  .50,     "Suppr.tout"                ;132 Del. all
     TCODE    .10,   .0,      "Réinitialisation"          ;133 Unexpected reset from
     TCODE    .10,   .25,     "inattendue! Merci de"      ;134 Divemode! Please help
@@ -380,4 +380,8 @@
 ;
 	TCODE    .20,   .125,    "Aff. donn. brutes"         ;295 Show raw data
 	TCODE    .50,    .2,     "Données brutes:"           ;296 Raw Data:
+; Gas-setup addons:
+    TCODE    .0,    .0,      "PMU:"                      ; 297 MOD:                 (max operating depth of a gas).
+    TCODE    .0,    .0,      "PEN:"                      ; 298 END:                 (equivalent nitrogen depth of a gas).
+    TCODE    .0,    .0,      "PEA:"                      ; 299 EAD:                 (equivalent air depth of a gas).
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/german_text.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/german_text.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -379,4 +379,8 @@
 ;
 	TCODE    .20,   .125,    "Show raw data"             ;295 Show raw data
 	TCODE    .50,    .2,     "Raw Data:"                 ;296 Raw Data:
+; Gas-setup addons:
+    TCODE    .0,    .0,      "MOD:"                      ; 297 MOD:                 (max operating depth of a gas).
+    TCODE    .0,    .0,      "END:"                      ; 298 END:                 (equivalent nitrogen depth of a gas).
+    TCODE    .0,    .0,      "EAD:"                      ; 299 EAD:                 (equivalent air depth of a gas).
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/menu_gassetup.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/menu_gassetup.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -299,102 +299,110 @@
 
 	rcall	gassetup_title_bar2			; Displays the title bar with the current Gas info
 
-	WIN_TOP		.65
 	WIN_LEFT	.20
-	
+	WIN_TOP		.65	
 	STRCPY  "O2: "
 
 	movf	divemins+0,W
 	addlw	0x06
 	movwf	EEADR
-	call	read_eeprom		; O2 value
+	call	read_eeprom                 ; O2 value
 	movff	EEDATA,lo
 	output_8
-	STRCAT  "% (MOD:"
+	STRCAT_PRINT "% "
 
 ; Show MOD in m
-	GETCUSTOM8 .18				; ppO2 warnvalue in WREG
+	WIN_LEFT	.90
+    lfsr    FSR2, letter
+	OUTPUTTEXTH .297                    ; MOD:
+
+	GETCUSTOM8 .18                      ; ppO2 warnvalue in WREG
 	mullw	d'10'
 	movff	PRODL,xA+0
-	movff	PRODH,xA+1			; ppO2 in [0.01Bar] * 10
+	movff	PRODH,xA+1                  ; ppO2 in [0.01Bar] * 10
 
 	movf	divemins+0,W
 	addlw	0x06
 	movwf	EEADR
-	call	read_eeprom			; O2 value
+	call	read_eeprom                 ; O2 value
 	movff	EEDATA,xB+0
 	clrf	xB+1
-	call	div16x16			;xA/xB=xC with xA as remainder
+	call	div16x16                    ; xA/xB=xC with xA as remainder
 	movlw	d'10'
-	subwf	xC+0,F				; Subtract 10m...
+	subwf	xC+0,F                      ; Subtract 10m...
 	movff	xC+0,lo
 	movlw	d'0'
 	subwfb	xC+1,F
 	movff	xC+1,hi
 	output_16
-	STRCAT_PRINT  "m)  "
+	STRCAT_PRINT  "m  "
 
+	WIN_LEFT	.20
 	WIN_TOP		.95
 	STRCPY  "He: "
 	movf	divemins+0,W
 	addlw	0x07
 	movwf	EEADR
-	call	read_eeprom		; He value
+	call	read_eeprom                 ; He value
 	movff	EEDATA,lo
 	output_8
-	STRCAT  "% (END:"
+	STRCAT_PRINT "% "
 
 ; Show END in m
-	GETCUSTOM8 .18				; ppO2 warnvalue in WREG
+    lfsr    FSR2, letter
+	WIN_LEFT	.90
+	OUTPUTTEXTH .298                    ; END:
+	GETCUSTOM8 .18				        ; ppO2 warnvalue in WREG
 	mullw	d'10'
 	movff	PRODL,xA+0
-	movff	PRODH,xA+1			; ppO2 in [0.01Bar] * 10
+	movff	PRODH,xA+1		            ; ppO2 in [0.01Bar] * 10
 	movf	divemins+0,W
 	addlw	0x06
 	movwf	EEADR
-	call	read_eeprom			; O2 value
+	call	read_eeprom                 ; O2 value
 	movff	EEDATA,xB+0
 	clrf	xB+1
-	call	div16x16			;xA/xB=xC with xA as remainder
+	call	div16x16                    ; xA/xB=xC with xA as remainder
 	movlw	d'10'
-	subwf	xC+0,F				; Subtract 10m...
+	subwf	xC+0,F                      ; Subtract 10m...
 	movff	xC+0,lo
 	movlw	d'0'
 	subwfb	xC+1,F
-	movff	xC+1,hi				; lo:hi holding MOD in meters
+	movff	xC+1,hi                     ; lo:hi holding MOD in meters
 	movlw	d'10'
 	addwf	lo,F
 	movlw	d'0'
-	addwfc	hi,F				; lo:hi holding MOD+10m
+	addwfc	hi,F                        ; lo:hi holding MOD+10m
 
 	movf	divemins+0,W
 	addlw	0x07
 	movwf	EEADR
-	call	read_eeprom		; He value in % -> EEDATA
+	call	read_eeprom                 ; He value in % -> EEDATA
 	movlw	d'100'
 	movwf	xA+0
-	movf	EEDATA,W		; He value in % -> EEDATA
-	subwf	xA+0,F			; xA+0 = 100 - He Value in %
+	movf	EEDATA,W                    ; He value in % -> EEDATA
+	subwf	xA+0,F                      ; xA+0 = 100 - He Value in %
 	clrf	xA+1
 	movff	lo,xB+0
-	movff	hi,xB+1			; Copy MOD+10
-	call	mult16x16		;xA*xB=xC
+	movff	hi,xB+1                     ; Copy MOD+10
+	call	mult16x16                   ; xA*xB=xC
 	movff	xC+0,xA+0
 	movff	xC+1,xA+1
 	movlw	d'100'
 	movwf	xB+0
 	clrf	xB+1
-	call	div16x16		;xA/xB=xC with xA as remainder 	
+	call	div16x16                    ; xA/xB=xC with xA as remainder 	
 	;	xC:2 = ((MOD+10) * 100 - HE Value in %) / 100
 	movlw	d'10'
-	subwf	xC+0,F				; Subtract 10m...
+	subwf	xC+0,F				        ; Subtract 10m...
 	movff	xC+0,lo
 	movlw	d'0'
 	subwfb	xC+1,F
 	movff	xC+1,hi
 	output_16
-	STRCAT_PRINT  "m)  "
+	STRCAT_PRINT  "m  "
 
+    WIN_LEFT    .20
 	WIN_TOP		.125
 	STRCPY  "+/-: "
 	movlw	'+'
@@ -405,18 +413,18 @@
 
 	WIN_TOP		.155
 	lfsr	FSR2,letter
-	OUTPUTTEXT	.89			; Default: 
+	OUTPUTTEXT	.89			            ; Default: 
 	movf	divemins+0,W
 	addlw	0x04
 	movwf	EEADR
-	call	read_eeprom		; Default O2 value
+	call	read_eeprom		            ; Default O2 value
 	movff	EEDATA,lo
 	output_8
 	PUTC	'/'
 	movf	divemins+0,W
 	addlw	0x05
 	movwf	EEADR
-	call	read_eeprom		; Default He value
+	call	read_eeprom		            ; Default He value
 	movff	EEDATA,lo
 	output_8
 	STRCAT_PRINT  "  "
--- a/code_part1/OSTC_code_asm_part1/menu_logbook.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/menu_logbook.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -397,7 +397,9 @@
 	movff		SSPBUF,hi
 	bsf		leftbind
 	output_16							; Air pressure before dive
-	STRCAT      "mbar Desat "
+	STRCAT      "mbar "
+	OUTPUTTEXT  .014                    ; Desat
+	PUTC        ' '
 
 	call		I2CREAD2	
 	movff		SSPBUF,lo
--- a/code_part1/OSTC_code_asm_part1/menu_settime.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/menu_settime.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -80,9 +80,11 @@
 	bra	settime_loop
 
 set_time_refresh:
-	WIN_LEFT	.70
+	WIN_LEFT	.32
 	WIN_TOP		.65
 	lfsr	FSR2,letter
+	OUTPUTTEXT  .22                     ; "Hours:" (actual length depends on translation)
+
 	movff	hours,lo
 	output_99x
 	PUTC	':'
@@ -91,9 +93,11 @@
 	STRCAT_PRINT "  "
 
 set_date_refresh:
-	WIN_LEFT	.70
+	WIN_LEFT	.32
 	WIN_TOP		.95
 	lfsr	FSR2,letter
+	OUTPUTTEXT  .23                     ; "Date: " (actual length depends on translation)
+
 	movff	month,convert_value_temp+0
 	movff	day,convert_value_temp+1
 	movff	year,convert_value_temp+2
@@ -127,15 +131,15 @@
 	movlw	.30
 	dcfsnz	lo,F
 	movlw	.31
-	cpfsgt	day						; day ok?
-	bra	set_time_done2			; OK
-	movlw	.1						; not OK, set to 1st
+	cpfsgt	day                         ; day ok?
+	bra	set_time_done2                  ; OK
+	movlw	.1                          ; not OK, set to 1st
 	movwf	day
 
 set_time_done2:
 	WIN_LEFT	.32
 	WIN_TOP		.155
-	movlw	d'8'
+	movlw	(.160-.32)/7                ; full line length, for various translations.
 	movwf	temp1
 	call	PLED_display_clear_common_y1
 	
@@ -151,9 +155,11 @@
 
 	call	set_date_refresh
 
-	WIN_LEFT	.70
+	WIN_LEFT	.32
 	WIN_TOP		.65
 	lfsr	FSR2,letter
+	OUTPUTTEXT  .22                     ; "Hours:" (actual length depends on translation)
+
 	movff	hours,lo
 	output_99x
 	PUTC	':'
@@ -191,23 +197,23 @@
 	WIN_TOP		.155
     call    PLED_standard_color    
 	lfsr	FSR2,letter
-	OUTPUTTEXT	.94			; Set
+	OUTPUTTEXT	.94			    ; Set
 
 	movff	menupos2,menupos3
 	decfsz	menupos3,F
-	bra	set_time_next_or_exit2
+	bra	    set_time_next_or_exit2
 	OUTPUTTEXT	.90				; Minutes
-	bra	set_time_next_or_exit5
+	bra	    set_time_next_or_exit5
 set_time_next_or_exit2:	
 	decfsz	menupos3,F
-	bra	set_time_next_or_exit3
+	bra	    set_time_next_or_exit3
 	OUTPUTTEXT	.91				; Month
-	bra	set_time_next_or_exit5
+	bra	    set_time_next_or_exit5
 set_time_next_or_exit3:	
 	decfsz	menupos3,F
-	bra	set_time_next_or_exit4
+	bra	    set_time_next_or_exit4
 	OUTPUTTEXT	.92				; Day
-	bra	set_time_next_or_exit5
+	bra	    set_time_next_or_exit5
 set_time_next_or_exit4:	
 	OUTPUTTEXT	.93				; Year
 
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -505,23 +505,29 @@
 	call	PLED_standard_color
 	return
 
+;=============================================================================
+; Update simulator menu with time/depth
+; Note: because translations might change a bit the string length, we reprint
+;       that part of the mask to be sure the numbers fit in the right places.
 PLED_simulator_data:
+	WIN_LEFT	.20
 	WIN_TOP		.65
-	WIN_LEFT	.112                    ; +7 for spanish.
 	WIN_FONT 	FT_SMALL
 	call	PLED_standard_color
 	lfsr	FSR2,letter
-	movff	logbook_temp1,lo
+	OUTPUTTEXTH .277                    ; Bottom Time:
+	
+	movff	logbook_temp1,lo            
 	bsf		leftbind
 	output_8
 	bcf		leftbind
 	STRCAT_PRINT  "min "
 
+	WIN_LEFT	.20
 	WIN_TOP		.95
-	WIN_LEFT	.100
-	WIN_FONT 	FT_SMALL
-	call	PLED_standard_color
 	lfsr	FSR2,letter
+	OUTPUTTEXTH .278                    ; Max. Depth:
+
 	movff	logbook_temp2,lo
 	bsf		leftbind
 	output_8
@@ -529,6 +535,8 @@
 	STRCAT_PRINT  "m "
 	return
 
+;=============================================================================
+
 PLED_display_velocity:
 ;	btfsc	multi_gf_display			; Is the Multi-GF Table displayed?
 ;	return							; Yes, No update and return!
--- a/code_part1/OSTC_code_asm_part1/spanish_text.asm	Sun Feb 13 19:46:42 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/spanish_text.asm	Mon Feb 14 17:23:08 2011 +0100
@@ -379,4 +379,8 @@
 ;
 	TCODE    .20,   .125,    "Show raw data"             ;295 Show raw data
 	TCODE    .50,    .2,     "Raw Data:"                 ;296 Raw Data:
+; Gas-setup addons:
+    TCODE    .0,    .0,      "MOD:"                      ; 297 MOD:                 (max operating depth of a gas).
+    TCODE    .0,    .0,      "END:"                      ; 298 END:                 (equivalent nitrogen depth of a gas).
+    TCODE    .0,    .0,      "EAD:"                      ; 299 EAD:                 (equivalent air depth of a gas).
 ;=============================================================================
Binary file code_part1/OSTC_code_c_part2/p2_deco.o has changed