changeset 578:2b8ef780cfa8

work in progress...
author heinrichsweikamp
date Sun, 18 Feb 2018 21:04:54 +0100
parents bfb87b4cf2ca
children e6d5a1f02daf
files src/divemenu_tree.asm src/hwos.inc
diffstat 2 files changed, 18 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/divemenu_tree.asm	Sun Feb 18 19:18:46 2018 +0100
+++ b/src/divemenu_tree.asm	Sun Feb 18 21:04:54 2018 +0100
@@ -181,7 +181,6 @@
 do_divemode_gaslist:					; entry point for switching: OC -> gases, loop -> diluents
 	btfsc	is_bailout              	; in bailout mode?
 	bcf		ccr_diluent_setup       	; yes - for safety reasons, redirect to OC (bailout) gases
-do_divemode_gaslist_com:    
 	bsf		short_gas_decriptions
 	movlw	.1
 	movwf	menupos						; Set to first option in divemode menu
@@ -252,29 +251,33 @@
 	call	restart_deco_engine_wo_ceiling
     movlw   .5
     btfsc   ccr_diluent_setup			; diluents?
-    addwf   menupos,F					; yes 1-5 -> 6-10
-    decf    menupos,W					; -> 0-4 for gases / 5-9 for diluents
+    addwf   menupos,F				; yes 1-5 -> 6-10
+    decf    menupos,W				; -> 0-4 for gases / 5-9 for diluents
     lfsr    FSR1,opt_gas_type+0
     movff   PLUSW1,lo
-    tstfsz  lo							; Already disabled?
+    tstfsz  lo					; Already disabled?
     bra     do_toggle_active2			; No, disable now!
-    lfsr    FSR1,opt_gas_type_backup+0	; copy opt_gas_type_backup+W back to opt_gas_type+W
+    lfsr    FSR1,opt_gas_type_backup+0		; copy opt_gas_type_backup+W back to opt_gas_type+W
     movff   PLUSW1,lo
     lfsr    FSR1,opt_gas_type+0
     movff   lo,PLUSW1
+;    btfsc   ccr_diluent_setup			; diluents?
+;    bra	    do_toggle_active3			; Yes, ignore restoring change depth (Work-around for potential issue) mH
     lfsr    FSR1,opt_OC_bail_gas_change_backup+0 ; copy opt_OC_bail_gas_change_backup+W back to opt_OC_bail_gas_change+W
     movff   PLUSW1,lo
-	lfsr    FSR1,opt_OC_bail_gas_change+0
+    lfsr    FSR1,opt_OC_bail_gas_change+0
     movff   lo,PLUSW1
-	bra		do_toggle_active3
+    bra	    do_toggle_active3
 do_toggle_active2:
-    clrf    PLUSW1						; 0=Disabled, 1=First, 2=Travel, 3=Deco
+;    btfsc   ccr_diluent_setup			; diluents?
+;    bra	    do_toggle_active3			; Yes, ignore restoring change depth (Work-around for potential issue) mH
+    clrf    PLUSW1				; 0=Disabled, 1=First, 2=Travel, 3=Deco
     lfsr    FSR1,opt_OC_bail_gas_change+0
-    clrf    PLUSW1						; also delete change depth here to have the menu updated immediately
+    clrf    PLUSW1				; also delete change depth here to have the menu updated immediately
 do_toggle_active3:
     movlw   .5
     btfsc   ccr_diluent_setup			; use OC gases?
-    subwf   menupos,F					; Back to 1-5 
+    subwf   menupos,F				; Back to 1-5 
     bra     do_lost_gas_loop			; Return to list and show updated result
 
 
--- a/src/hwos.inc	Sun Feb 18 19:18:46 2018 +0100
+++ b/src/hwos.inc	Sun Feb 18 21:04:54 2018 +0100
@@ -15,7 +15,7 @@
 
 ;#DEFINE __DEBUG
 
-#DEFINE french_italian	    	; If defined, use french and italian instead of english and german	
+;#DEFINE french_italian	    	; If defined, use french and italian instead of english and german	
 	
 #include <p18f87k22.inc>
 #include <ports.inc>                        ; Portmap
@@ -643,7 +643,7 @@
 opt_name                res opt_name_length
 opt_language            res 1   ; Current language. 0=EN, 1=DE, 2=FR, 3=SP
 opt_units               res 1   ; 0:m/°C, 1:ft/°F
-opt_dateformat			res	1	; =0:MMDDYY, =1:DDMMYY, =2:YYMMDD
+opt_dateformat		res 1	; =0:MMDDYY, =1:DDMMYY, =2:YYMMDD
 opt_last_stop           res 1   ; =3:3m, =4:4m, =5:5m, =6:6m
 opt_aGF_high            res 1   ; Alternative GF HIGH
 opt_aGF_low             res 1   ; Alternative GF LOW
@@ -656,9 +656,9 @@
 opt_pressure_adjust     res 1   ; SIGNED int (two's complement), -20/+20mbar max.
 opt_enable_safetystop   res 1   ; =1: A safety stop is shown
 opt_calibration_O2_ratio    res 1   ; %O2 of calibration gas
-opt_x_s1                res	2	; calibration factor (Not stored in EEPROM)
-opt_x_s2                res	2	; calibration factor (Not stored in EEPROM)
-opt_x_s3                res	2	; calibration factor (Not stored in EEPROM)
+opt_x_s1                res 2	; calibration factor (Not stored in EEPROM)
+opt_x_s2                res 2	; calibration factor (Not stored in EEPROM)
+opt_x_s3                res 2	; calibration factor (Not stored in EEPROM)
 opt_sensor_fallback     res 1   ; NOT USED ANY MORE, KEPT FOR COMPATIBILITY WITH EEPROM IMAGE
 opt_flip_screen         res 1   ; =1: Flip the screen
 opt_cR_button_left      res 1   ; Left button sensitivity (cR hardware)