changeset 352:544a96faa9f3 64kByte Logbook

New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
author Heinrichsweikamp
date Mon, 06 Jun 2011 18:50:26 +0200
parents 5c186a72cb5d
children 562f1bc79f3c
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/divemode_menu.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_reset.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_asm_part1/simulator.asm code_part1/OSTC_code_asm_part1/spanish_text.asm
diffstat 10 files changed, 37 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Mon Jun 06 18:50:26 2011 +0200
@@ -1,6 +1,8 @@
 New in 1.91 beta:
 BETA Version - Do NOT use for diving!
 BUGFIX: Ignore depths>130m in PC simulation
+CHANGE: CF02 now allows delay of more then 240seconds
+NEW: "Quit Sim" in divemode simulator menu for exiting the simulation
 
 New in 1.90 Stable:
 Stable release
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -1424,13 +1424,16 @@
 	
 	bcf		divemode
 	incf	timeout_counter,F
-	GETCUSTOM8	d'2'					; diveloop_timeout
-	addlw	d'2'						; adds two seconds in case timout=zero!
-	btfsc	STATUS,C					; > 255?
-	movlw	d'255'						; Set to 255...
-	decf	WREG,F						; Limit to 254
-	cpfsgt	timeout_counter
-	bsf		divemode
+	movlw	d'0'
+	addwfc	timeout_counter2,F			; timeout is 15bits
+	GETCUSTOM15	d'2'					; diveloop_timeout
+	movff	lo,sub_a+0
+	movff	hi,sub_a+1
+	movff	timeout_counter, sub_b+0
+	movff	timeout_counter2, sub_b+1
+	call	sub16						;  sub_c = sub_a - sub_b
+	btfss	neg_flag					; Result negative?
+	bsf		divemode					; No, set flag
 	return
 
 timeout_divemode2:
@@ -1720,8 +1723,8 @@
 	clrf	divesecs
 	clrf	samplesecs
 	clrf	apnoe_timeout_counter		; timeout in minutes
-	clrf 	timeout_counter				; takes care of the timeout
-	clrf 	timeout_counter2			; Here: counts to six, then store deco data and temperature
+	clrf 	timeout_counter				; takes care of the timeout (Low byte)
+	clrf 	timeout_counter2			; takes care of the timeout (High byte)
 	clrf	AlarmType					; Clear all alarms
 	bcf		event_occured				; clear flag
 	bcf		setpoint_changed			; clear flag
--- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -131,6 +131,8 @@
 	movlw	d'7'						; Number of entries for this menu+1 = 7
 	btfsc	display_set_xgas			; Are we in the Gas6 menu?
 	movlw	d'7'						; Number of entries for this menu+1 = 7
+	btfsc	display_set_simulator		; Are we in the simulator menu?
+	movlw	d'7'						; Number of entries for this menu+1 = 7
 	cpfseq	menupos						; =limit?
 	bra		test_switches_divemode_menu1; No!
 	movlw	d'1'						; Yes, reset to position 1!
@@ -348,6 +350,8 @@
 	bra		divemode_menu_simulator_p10	; Adjust +10m
 	dcfsnz	menupos,F
 	bra		divemode_menu_simulator_m10	; Adjust -10m
+	dcfsnz	menupos,F
+	bra		divemode_menu_simulator_quit; Adjust to zero m
 	bra		timeout_divemenu2			; quit underwater menu!
 
 divemode_menu_simulator_common:
@@ -366,7 +370,6 @@
 	movlw	HIGH	d'14000'
 	movwf	sim_pressure+1
 	return
-
 divemode_menu_simulator_common2:
 	movlw	LOW		d'1000'             ; Compare to 1bar == 0m == 1000 mbar.
 	subwf   sim_pressure+0,W
@@ -401,6 +404,13 @@
 	movwf	menupos						; reset cursor
 	bra		divemode_menu_simulator_common
 
+divemode_menu_simulator_quit:
+	movlw	LOW		d'1000'
+	movwf	sim_pressure+0
+	movlw	HIGH	d'1000'
+	movwf	sim_pressure+1
+	bra		timeout_divemenu2			; quit menu
+
 divemode_menu_simulator_p1:
 	movlw	d'100'
 	addwf	sim_pressure+0,F
--- a/code_part1/OSTC_code_asm_part1/english_text.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/english_text.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -96,7 +96,7 @@
 ; 32 custom function descriptors I (FIXED LENGTH = 15 chars).
     TCODE    .40,  .35,      "Start Dive  [m]"           ;036 Start Dive  [m]	(depth to switch to dive mode)
     TCODE    .40,  .35,      "End Dive    [m]"           ;037 End Dive    [m]	(depth to switch back to surface mode)
-    TCODE    .40,  .35,      "End Delay [min]"           ;038 End Delay [min]  	(duration dive screen stays after end of dive)
+    TCODE    .40,  .35,      "End Delay [sec]"           ;038 End Delay [sec]  	(duration dive screen stays after end of dive)
     TCODE    .40,  .35,      "Power Off [min]"           ;039 Power Off [min]
     TCODE    .40,  .35,      "Pre-menu  [min]"           ;040 Pre-menu  [min]	(Delais to keep surface-mode menus displayed)
     TCODE    .40,  .35,      "velocity[m/min]"           ;041 velocity[m/min]
@@ -391,4 +391,5 @@
 	TCODE	 .50,	.130,	 "Aborted!"					 ;304 Aborted
 ;@5 variant
     TCODE    .0,    .0,      "Future TTS"                ;305 Future TTS            (=10 chars. Title for @5 customview).
+    TCODE    .100,  .125,    "Quit Sim"                  ;306 Quit Sim (=8char max. Quit Simulator mode)
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/french_text.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/french_text.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -97,7 +97,7 @@
 ; 32 custom function descriptors I (FIXED LENGTH = 15 chars).
     TCODE    .40,  .35,      "Début Plong.[m]"           ;036 Start Dive  [m]	(depth to switch to dive mode)
     TCODE    .40,  .35,      "Fin Plongée [m]"           ;037 End Dive    [m]	(depth to switch back to surface mode)
-    TCODE    .40,  .35,      "Délai Fin [min]"           ;038 End Delay [min]  	(duration dive screen stays after end of dive)
+    TCODE    .40,  .35,      "Délai Fin [sec]"           ;038 End Delay [sec]  	(duration dive screen stays after end of dive)
     TCODE    .40,  .35,      "Eteindre  [min]"           ;039 Power Off [min]
     TCODE    .40,  .35,      "Pré-menu  [min]"           ;040 Pre-menu  [min]	(Delais to keep surface-mode menus displayed)
     TCODE    .40,  .35,      "Vitesse [m/min]"           ;041 velocity[m/min]
@@ -392,4 +392,5 @@
 	TCODE	 .50,	.130,	 "Aborted!"					 ;304 Aborted
 ;@5 variant
     TCODE    .0,    .0,      "DTR Réchap"                ;305 Future TTS            (=10 chars. Title for @5 customview).
+    TCODE    .100,  .125,    "Quit Sim"                  ;306 Quit Sim 				(=8char max. Quit Simulator mode)
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/german_text.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/german_text.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -97,7 +97,7 @@
 ; 32 custom function descriptors I (FIXED LENGTH = 15 chars).
     TCODE    .40,  .35,      "TG Start    [m]"           ;036 Start Dive  [m]	(depth to switch to dive mode)
     TCODE    .40,  .35,      "TG Ende     [m]"           ;037 End Dive    [m]	(depth to switch back to surface mode)
-    TCODE    .40,  .35,      "TGNachlauf[min]"           ;038 End Delay [min]  	(duration dive screen stays after end of dive)
+    TCODE    .40,  .35,      "TGNachlauf[sek]"           ;038 End Delay [sec]  	(duration dive screen stays after end of dive)
     TCODE    .40,  .35,      "Standby   [min]"           ;039 Power Off [min]
     TCODE    .40,  .35,      "Pre-Menü  [min]"           ;040 Pre-menu  [min]	(Delais to keep surface-mode menus displayed)
     TCODE    .40,  .35,      "Geschw. [m/min]"           ;041 velocity[m/min]
@@ -392,4 +392,5 @@
 	TCODE	 .40,	.130,	 "Abgebrochen!"				 ;304 Aborted
 ;@5 variant
     TCODE    .0,    .0,      "TTS @+Min."                ;305 Future TTS            (=10 chars. Title for @5 customview).
+    TCODE    .100,  .125,    "Ende Sim"                  ;306 Quit Sim (=8char max. Quit Simulator mode)
 ;=============================================================================
--- a/code_part1/OSTC_code_asm_part1/menu_reset.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/menu_reset.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -104,7 +104,7 @@
     ;                          DEFAULT   MIN     MAX
 	CF_DEFAULT    CF_CENTI,	    d'100', d'50',  d'250'  ; dive_threshold	        100cm
 	CF_DEFAULT    CF_CENTI,	    d'30',  d'10',  d'100'  ; surf_threshold        	30cm
-	CF_DEFAULT    CF_SEC,	    d'240', d'30',  d'240'  ; diveloop_timeout      	240s
+	CF_DEFAULT    CF_INT15,	    d'240', d'0',   d'600'  ; diveloop_timeout      	240s
 	CF_DEFAULT    CF_SEC,	    d'120', d'30',  d'240'  ; surfloop_timeout	        120s
 	CF_DEFAULT    CF_SEC,	    d'5',   d'1',   d'30'   ; premenu_timeout	        5s
 
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -2345,6 +2345,7 @@
         DISPLAYTEXT	.251			; - 1m
         DISPLAYTEXT	.252			; +10m
         DISPLAYTEXT	.253			; -10m
+		DISPLAYTEXTH .306			; Quit Sim
         return
 
 ;-----------------------------------------------------------------------------
@@ -2674,7 +2675,7 @@
 	cpfseq	hi				; All gases shown?
 	bra		PLED_gas_list_loop	; No
 
-	DISPLAYTEXT		d'122'		; Gas 6..
+	DISPLAYTEXT		d'122'		; More
 	return					;  return (OC mode)
 
 PLED_splist_start:	
--- a/code_part1/OSTC_code_asm_part1/simulator.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/simulator.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -24,7 +24,7 @@
 ; ToDo: 
 
 menu_simulator:
-	movlw	d'1'
+	movlw	d'3'
 	movwf	logbook_temp1		; Bottom time
 	movlw	d'15'
 	movwf	logbook_temp2		; Max. Depth
--- a/code_part1/OSTC_code_asm_part1/spanish_text.asm	Tue May 31 22:09:17 2011 +0200
+++ b/code_part1/OSTC_code_asm_part1/spanish_text.asm	Mon Jun 06 18:50:26 2011 +0200
@@ -96,7 +96,7 @@
 ; 32 custom function descriptors I (FIXED LENGTH = 15 chars).
     TCODE    .40,  .35,      "Buceo Inic. [m]"           ;036 Start Dive  [m]	(depth to switch to dive mode)
     TCODE    .40,  .35,      "Buceo Fin.  [m]"           ;037 End Dive    [m]	(depth to switch back to surface mode)
-    TCODE    .40,  .35,      "Retras Fin[min]"           ;038 End Delay [min]  	(duration dive screen stays after end of dive)
+    TCODE    .40,  .35,      "Retras Fin[sec]"           ;038 End Delay [sec]  	(duration dive screen stays after end of dive)
     TCODE    .40,  .35,      "Apagado   [min]"           ;039 Power Off [min]
     TCODE    .40,  .35,      "Pre-menú  [min]"           ;040 Pre-menu  [min]	(Delais to keep surface-mode menus displayed)
     TCODE    .40,  .35,      "Vel.    [m/min]"           ;041 velocity[m/min]
@@ -391,4 +391,5 @@
 	TCODE	 .50,	.130,	 "¡Aborta!"					 ;304 Aborted
 ;@5 variant
     TCODE    .0,    .0,      "Futuro TTS"                ;305 Future TTS            (=10 chars. Title for @5 customview).
+    TCODE    .100,  .125,    "Quit Sim"                  ;306 Quit Sim (=8char max. Quit Simulator mode)
 ;=============================================================================