changeset 734:65822fa08333

use "first Gas" as first bailout
author heinrichsweikamp
date Sun, 23 Jun 2013 20:20:31 +0200
parents b064dd9c9899
children 72c9c3b97a0d
files code_part1/OSTC_code_asm_part1/divemode_menu.asm code_part1/OSTC_code_asm_part1/outputs.asm
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Wed Jun 19 11:21:09 2013 +0200
+++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Sun Jun 23 20:20:31 2013 +0200
@@ -665,18 +665,26 @@
 	btfss	FLAG_const_ppO2_mode		; are we in ppO2 mode?
 	bra		divemenu_set_gas2a			; no, choose gas
 	; Yes, so select SP 1-3
-	bcf		is_bailout					;=1: CC mode, but bailout active!		
-	call	DISP_show_ppO2_clear		; Clear ppO2 value
 	
 divemenu_set_gas1:
 	movlw	d'1'				
 	cpfseq	menupos						; At the "Bailout" position?		
 	bra		divemenu_set_gas1b			; No, select SetPoint 1-3 or Diluent
-	bsf		select_bailoutgas			; Set Flag
+
+    bsf		select_bailoutgas			; Set Flag
 	bcf		display_set_setpoint		; Clear Flag
+    btfsc   is_bailout                  ; Already in bailout?
+	bra		divemenu_set_gas_2			; Yes.
+    
+    ;Setup first gas as better gas
+    bsf     better_gas_available
+    read_int_eeprom .33                 ; 1-5
+    movff   EEDATA,better_gas_number
 	bra		divemenu_set_gas_2			; Configure the extra gas / Select Bailout
 
 divemenu_set_gas1b:
+	bcf		is_bailout					;=1: CC mode, but bailout active!
+	call	DISP_show_ppO2_clear		; Clear ppO2 value
 	movlw	d'5'
 	cpfseq	menupos						; At the "Diluent" position?
 	bra		divemenu_set_gas1c			; No, select SetPoint 1-3
--- a/code_part1/OSTC_code_asm_part1/outputs.asm	Wed Jun 19 11:21:09 2013 +0200
+++ b/code_part1/OSTC_code_asm_part1/outputs.asm	Sun Jun 23 20:20:31 2013 +0200
@@ -3105,6 +3105,7 @@
 	cpfseq	hi				; All gases shown?
 	bra		DISP_gas_list_loop	; No
 
+    WIN_INVERT	.0
 	DISPLAYTEXT		d'122'		; More
 	return					;  return (OC mode)