changeset 817:e49a35ab7394

auto-SP work, auto-SP data stored in EEADR 116-119
author heinrichsweikamp
date Sat, 06 Jun 2015 14:46:27 +0200
parents df8cd5ffd993
children 3d9f56e0d18c
files code_part1/OSTC_code_asm_part1/definitions.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/italian_text.asm code_part1/OSTC_code_asm_part1/menu_ppO2.asm code_part1/OSTC_code_asm_part1/menu_reset.asm code_part1/OSTC_code_asm_part1/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/start.asm docu/ostc_interface_description.odt
diffstat 12 files changed, 122 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/definitions.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/definitions.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -24,7 +24,7 @@
 #DEFINE	softwareversion_x		d'3'		; Software version  XX.YY
 #DEFINE	softwareversion_y		d'04'		; Software version  XX.YY
 
-#DEFINE softwareversion_beta 	1 			; (and 0 for release)
+#DEFINE softwareversion_beta 	0 			; (and 0 for release)
 
 #DEFINE	max_custom_number		d'73'		; Number of last used custom function
 
--- a/code_part1/OSTC_code_asm_part1/english_text.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/english_text.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -323,7 +323,7 @@
     TCODE    .0,    .2,      "Sim. Results:"             ;188 Sim. Results:
     TCODE    .90,   .25,     "Surface"                   ;189 Surface
     TCODE    .0,    .0,      "ppO2 +"                    ;190 ppO2 +
-    TCODE    .0,    .0,      "ppO2 -"                    ;191 ppO2 -
+    TCODE    .0,    .0,      ""                          ;191 unused
     TCODE    .0,    .0,      "Dil."                      ;192 Dil.			       (Rebreather diluent)
 
 ; 32 custom function descriptors III (FIXED LENGTH = 15 chars).
@@ -526,5 +526,8 @@
     TCODE    .0,    .185,    "and CF61-CF63 for"     	;361 and CF61-CF63 for
     TCODE    .0,    .215,    "pSCR features."    		;362 pSCR features.
 ;
+; Setpoint Mode
+    TCODE    .80,  .95,     "Manual"	    	        ;363 Manual      Same length as #364
+    TCODE    .80,  .95,     "Auto  " 	                ;364 Auto        Same length as #363
 
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/french_text.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/french_text.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -325,7 +325,7 @@
     TCODE    .0,    .2,      "Résultat Sim:"             ;188 Sim. Results:
     TCODE    .90,   .25,     "Surface"                   ;189 Surface
     TCODE    .0,    .0,      "ppO2 +"                    ;190 ppO2 +
-    TCODE    .0,    .0,      "ppO2 -"                    ;191 ppO2 -
+    TCODE    .0,    .0,      ""                          ;191 unused
     TCODE    .0,    .0,      "Dil."                      ;192 Dil.			       (Rebreather diluant)
 
 ; 32 custom function descriptors III (FIXED LENGTH = 15 chars).
@@ -528,5 +528,8 @@
     TCODE    .0,    .185,    "et CF61-CF63 pour"     	 ;361 and CF61-CF63 for
     TCODE    .0,    .215,    "fonctions pSCR."    		 ;362 pSCR features.
 ;
+; Setpoint Mode
+    TCODE    .60,  .95,     "Manual"	    	        ;363 Manual      Same length as #364
+    TCODE    .60,  .95,     "Auto  " 	                ;364 Auto        Same length as #363
 
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/german_text.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/german_text.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -324,7 +324,7 @@
     TCODE    .0,    .2,      "Sim. Daten:"               ;188 Sim. Results:
     TCODE    .90,   .25,     "Oberfl."                   ;189 Surface
     TCODE    .0,    .0,      "ppO2 +"                    ;190 ppO2 +
-    TCODE    .0,    .0,      "ppO2 -"                    ;191 ppO2 -
+    TCODE    .0,    .0,      ""                          ;191 unused
     TCODE    .0,    .0,      "Dil."                      ;192 Dil.			       (Rebreather diluent)
 
 ; 32 custom function descriptors III (FIXED LENGTH = 15 chars).
@@ -370,7 +370,7 @@
     TCODE    .5,    .2,      "Dil. Setup - Gasliste" 	 ;231 Dil. Setup - Gaslist
     TCODE    .100,  .100,	 "Diluent"                   ;232 Diluent
     TCODE    .93,   .170,    "  Ceiling"                 ;233 Ceiling (9Chars, right alligned)
-    TCODE    .20,   .95,     "SP Mode:  "                ;234 SP Mode: (10 chars)
+    TCODE    .20,   .95,     "SP Modus: "                ;234 SP Mode: (10 chars)
 
     TCODE    .10,   .2,      "Dekomodell verändert!"     ;235 Decomode changed!
     TCODE    .85,   .125,    "L16-GF CC"                 ;236 L16-GF CC
@@ -526,5 +526,9 @@
     TCODE    .0,    .185,    "und CF61-CF63 für"     	;361 and CF61-CF63 for
     TCODE    .0,    .215,    "pSCR Parameter."    		;362 pSCR features.
 ;
+; Setpoint Mode
+    TCODE    .90,  .95,     "Manuell"	    	        ;363 Manual      Same length as #364
+    TCODE    .90,  .95,     "Auto   " 	                ;364 Auto        Same length as #363
+
 
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/italian_text.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/italian_text.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -323,7 +323,7 @@
     TCODE    .0,    .2,      "Risul. simul:"             ;188 Sim. Results:
     TCODE    .90,   .25,     "Superficie"                ;189 Surface
     TCODE    .0,    .0,      "PpO2 +"                    ;190 ppO2 +
-    TCODE    .0,    .0,      "PpO2 -"                    ;191 ppO2 -
+    TCODE    .0,    .0,      ""                          ;191 unused
     TCODE    .0,    .0,      "Dil."                      ;192 Dil.			       (Rebreather diluent)
 
 ; 32 custom function descriptors III (FIXED LENGTH = 15 chars).
@@ -526,5 +526,8 @@
     TCODE    .0,    .185,    "e CF61-CF63 per la"     	 ;361 and CF61-CF63 for
     TCODE    .0,    .215,    "modalitá pSCR."    	 ;362 pSCR features.
 ;
+; Setpoint Mode
+    TCODE    .60,  .95,     "Manual"	    	        ;363 Manual      Same length as #364
+    TCODE    .60,  .95,     "Auto  " 	                ;364 Auto        Same length as #363
 
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/menu_ppO2.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_ppO2.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -125,10 +125,10 @@
     read_int_eeprom .116        ; SP Mode
     tstfsz  EEDATA              ; =0?
 	bra		show_sp_mode2       ; No
-	DISPLAYTEXTH	.312		; =0: Manual
+	DISPLAYTEXTH	.363		; =0: Manual
 	return
 show_sp_mode2:
-	DISPLAYTEXTH	.313		; =1: Auto
+	DISPLAYTEXTH	.364		; =1: Auto
 	return
 
 
@@ -867,31 +867,46 @@
 	clrf	hi
 	bsf		leftbind
 	output_16dp	d'3'
+	STRCAT  TXT_BAR4
+	movf	decodata+0,W
+	addlw	d'117'				; offset in eeprom
+    movwf	EEADR
+	call	read_eeprom		; Change depth
+	movff	EEDATA,lo
+    output_8
 	bcf		leftbind
-	STRCAT_PRINT TXT_BAR4
+    STRCAT_PRINT    "m "
 
 	WIN_LEFT 	.20
 	WIN_TOP		.95
-
 	lfsr	FSR2,letter
 	OUTPUTTEXT	d'190'			; ppO2 +
 	call	word_processor		
 
 	WIN_LEFT 	.20
 	WIN_TOP		.125
-
 	lfsr	FSR2,letter
-	OUTPUTTEXT	d'191'			; ppO2 -
+	OUTPUTTEXT	d'250'			; +1 m
 	call	word_processor		
 
 	WIN_LEFT 	.20
 	WIN_TOP		.155
+	lfsr	FSR2,letter
+	OUTPUTTEXT	.251			; -1 m
+    call	word_processor
 
+	WIN_LEFT 	.20
+	WIN_TOP		.185
 	lfsr	FSR2,letter
 	OUTPUTTEXT	.89			; "Default: "
-	STRCAT_PRINT "1.00"
+	STRCAT_PRINT "1.00 / 0m"
 
-	DISPLAYTEXT	.11			; Exit
+	WIN_LEFT 	.20
+	WIN_TOP		.215
+    lfsr	FSR2,letter
+	OUTPUTTEXT   .11		; Exit
+    call	word_processor
+
 	call	wait_switches		; Waits until switches are released, resets flag if button stays pressed!
 	call	menu_pre_loop_common		; Clear some menu flags, timeout and switches
 	call	DISP_menu_cursor
@@ -924,8 +939,8 @@
 	incf	menupos,F			; Skip pos. 2
 
 menu_const_ppO22a:
-	movlw	d'7'
-	cpfseq	menupos			; =7?
+	movlw	d'8'
+	cpfseq	menupos			; =8?
 	bra		menu_const_ppO23	; No
 	movlw	d'1'
 	movwf	menupos
@@ -943,13 +958,51 @@
 	dcfsnz	menupos,F
 	bra		change_ppo2_plus
 	dcfsnz	menupos,F
-	bra		change_ppo2_minus
+	bra		change_ppo2_depth_plus
+	dcfsnz	menupos,F
+	bra		change_ppo2_depth_minus
 	dcfsnz	menupos,F
 	bra		change_ppo2_reset
 	movlw	d'2'
 	movwf	menupos
     goto    menu_const_ppO2_return
 
+change_ppo2_depth_plus:
+	movf	decodata+0,W
+	addlw	d'117'				; offset in eeprom
+    movwf	EEADR
+	call	read_eeprom		; Change depth
+	movff	EEDATA,lo
+    incf    lo,F
+	movlw	d'99'
+	cpfsgt	lo
+	bra		change_ppo2_depth_plus2
+    clrf    lo
+change_ppo2_depth_plus2:
+	movff	lo,EEDATA			; write result
+	call	write_eeprom		; save result in EEPROM
+	movlw	d'4'
+	movwf	menupos
+	bra		menu_const_ppO21
+
+change_ppo2_depth_minus:
+	movf	decodata+0,W
+	addlw	d'117'				; offset in eeprom
+    movwf	EEADR
+	call	read_eeprom		; Change depth
+	movff	EEDATA,lo
+    decf    lo,F
+	movlw	d'100'
+	cpfsgt	lo
+	bra		change_ppo2_depth_minus2
+    clrf    lo
+change_ppo2_depth_minus2:
+	movff	lo,EEDATA			; write result
+	call	write_eeprom		; save result in EEPROM
+	movlw	d'5'
+	movwf	menupos
+	bra		menu_const_ppO21
+
 change_ppo2_plus:
 	movf	decodata+0,W		; read current value 
 	addlw	d'36'				; offset in memory
@@ -957,11 +1010,12 @@
 	call	read_eeprom			; Low-value
 	movff	EEDATA,lo
 	
-	incf	lo,F				; increase depth
-	movlw	d'201'
-	cpfseq	lo
+    movlw   .10
+    addwf   lo,F                ; increase ppO2
+	movlw	d'200'
+	cpfsgt	lo
 	bra		change_ppo2_plus2
-	movlw	d'200'
+	movlw	d'30'
 	movwf	lo
 change_ppo2_plus2:
 	movff	lo,EEDATA			; write result
@@ -970,36 +1024,21 @@
 	movwf	menupos
 	bra		menu_const_ppO21
 
-change_ppo2_minus:
-	movf	decodata+0,W		; read current value 
-	addlw	d'36'				; offset in memory
-	movwf	EEADR
-	call	read_eeprom			; Low-value
-	movff	EEDATA,lo
-	
-	decf	lo,F				; decrease depth
-	movlw	d'29'
-	cpfseq	lo
-	bra	change_ppo2_minus2
-	movlw	d'30'
-	movwf	lo
-
-change_ppo2_minus2:
-	movff	lo,EEDATA			; write result
-	call	write_eeprom		; save result in EEPROM
-
-	movlw	d'4'
-	movwf	menupos
-	bra		menu_const_ppO21
-
-change_ppo2_reset:				; reset to 1.00Bar
+change_ppo2_reset:				; reset to 1.00bar and 0m depth
 	movf	decodata+0,W		; read current value 
 	addlw	d'36'				; offset in memory
 	movwf	EEADR
 	movlw	d'100'
 	movwf	EEDATA
 	call	write_eeprom		; save result in EEPROM
-	movlw	d'5'
+
+	movf	decodata+0,W
+	addlw	d'117'				; offset in eeprom
+    movwf	EEADR
+    clrf    EEDATA              ; 0m default
+    call	write_eeprom		; save result in EEPROM
+
+	movlw	d'6'
 	movwf	menupos
 	bra	menu_const_ppO21
 
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -407,6 +407,13 @@
 	movlw	d'120'
 	movwf	EEDATA
 	write_int_eeprom	d'38'		; reset mix3 to ppO2=1.20bar
+    ; Change depths to zero
+    clrf    EEDATA
+    write_int_eeprom	d'117'
+    write_int_eeprom	d'118'
+    write_int_eeprom	d'119'
+    ; SP Mode (Manual)
+    write_int_eeprom	d'116'
 
 	clrf	nofly_time+0			; Clear nofly time
 	clrf	nofly_time+1			; Clear nofly time
--- a/code_part1/OSTC_code_asm_part1/outputs.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/outputs.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -1217,6 +1217,8 @@
 	movlw	d'155'
 	dcfsnz	temp1,F
 	movlw	d'185'
+	dcfsnz	temp1,F
+	movlw	d'215'
 	
 	movff	WREG,win_top
 	STRCPY_PRINT "\xB7"
--- a/code_part1/OSTC_code_asm_part1/russian_text.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/russian_text.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -326,7 +326,7 @@
     TCODE    .0,    .2,      "Ðåçóëüòàòû:"               ;188 Sim. Results:
     TCODE    .90,   .25,     "Íàäâîäíûé"                 ;189 Surface
     TCODE    .0,    .0,      "ppO2 +"                    ;190 ppO2 +
-    TCODE    .0,    .0,      "ppO2 -"                    ;191 ppO2 -
+    TCODE    .0,    .0,      ""                          ;191 unused
     TCODE    .0,    .0,      "Äèë."                      ;192 Dil.			       (Rebreather diluent)
 
 ; 32 custom function descriptors III (FIXED LENGTH = 15 chars).
@@ -528,5 +528,8 @@
     TCODE    .0,    .215,    "ïàðàìåòðîâ pSCR.   " 		;362 pSCR features.
 
 ;
+; Setpoint Mode
+    TCODE    .60,  .95,     "Manual"	    	        ;363 Manual      Same length as #364
+    TCODE    .60,  .95,     "Auto  " 	                ;364 Auto        Same length as #363
 
 ;=============================================================================
\ No newline at end of file
--- a/code_part1/OSTC_code_asm_part1/spanish_text.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/spanish_text.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -322,7 +322,7 @@
     TCODE    .0,    .2,      "Result. Sim.:"             ;188 Sim. Results:
     TCODE    .90,   .25,     "Superf."                   ;189 Surface
     TCODE    .0,    .0,      "ppO2 +"                    ;190 ppO2 +
-    TCODE    .0,    .0,      "ppO2 -"                    ;191 ppO2 -
+    TCODE    .0,    .0,      ""                          ;191 unused
     TCODE    .0,    .0,      "Dil."                      ;192 Dil.			       (Rebreather diluent)
 
 ; 32 custom function descriptors III (FIXED LENGTH = 15 chars).
@@ -525,5 +525,8 @@
     TCODE    .0,    .215,    "Características pSCR"    	 ;362 pSCR features.
 
 ;
+; Setpoint Mode
+    TCODE    .60,  .95,     "Manuell"	    	        ;363 Manual      Same length as #364
+    TCODE    .60,  .95,     "Auto   " 	                ;364 Auto        Same length as #363
 
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/start.asm	Sat May 16 14:48:26 2015 +0200
+++ b/code_part1/OSTC_code_asm_part1/start.asm	Sat Jun 06 14:46:27 2015 +0200
@@ -162,7 +162,14 @@
 	call	write_eeprom			; write byte
 	clrf	EEADRH					; Reset EEADRH
 
-    call    reset_all_cf_bank2      ; Reset CF64-93 with this update....
+    ; Reset Setpoint depths
+    clrf    EEDATA
+    write_int_eeprom	d'117'
+    write_int_eeprom	d'118'
+    write_int_eeprom	d'119'
+    ; SP Mode (Manual)
+    write_int_eeprom	d'116'
+;    call    reset_all_cf_bank2      ; Reset CF64-93 with this update....
 
 restart:
     ; check for time/date vault
Binary file docu/ostc_interface_description.odt has changed