changeset 686:8ffbd5cb4b42

Hard-coded min. Values for CF00 and CF01 Set cursor to "Exit" when leaving sub-menus
author heinrichsweikamp
date Sat, 26 Jan 2013 14:36:26 +0100
parents aebb6d039249
children a8a36c85e031
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/menu.asm
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Sat Jan 26 14:11:07 2013 +0100
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Sat Jan 26 14:36:26 2013 +0100
@@ -5,6 +5,8 @@
 CHANGE: Use 4Bytes in EEPROM for diluents (Same as OC gases)
 NEW: Show active gas indicator below first gas in surfacemode
 UPDATE: OSTC interface description file
+NEW: Hard-coded min. Values for CF00 and CF01
+CHANGE: Set cursor to "Exit" when leaving sub-menus
 
 New in 2.59:
 BETA Version - Do NOT use for diving!
--- a/code_part1/OSTC_code_asm_part1/divemode.asm	Sat Jan 26 14:11:07 2013 +0100
+++ b/code_part1/OSTC_code_asm_part1/divemode.asm	Sat Jan 26 14:36:26 2013 +0100
@@ -1773,12 +1773,22 @@
 	; in Divemode, check threshold from CF01
 	GETCUSTOM8	.1					; loads dive_threshold in WREG
 	movwf	sub_a+0					; dive_treshold is in cm
+
+    movlw   .20
+    cpfsgt  sub_a+0
+    movwf   sub_a+0                 ; Make sure to have at least 20cm threshold
+
 	clrf	sub_a+1
 	bra		set_dive_modes1			; Done.
 
 set_dive_modes0:
 	GETCUSTOM8	.0					; loads dive_threshold in WREG
 	movwf	sub_a+0					; dive_treshold is in cm
+
+    movlw   .20
+    cpfsgt  sub_a+0
+    movwf   sub_a+0                 ; Make sure to have at least 20cm threshold
+
 	clrf	sub_a+1
 	bra		set_dive_modes1			; Done.
 
--- a/code_part1/OSTC_code_asm_part1/menu.asm	Sat Jan 26 14:11:07 2013 +0100
+++ b/code_part1/OSTC_code_asm_part1/menu.asm	Sat Jan 26 14:36:26 2013 +0100
@@ -146,7 +146,7 @@
 	goto	menu_simulator
 	dcfsnz	menupos,F
 	goto	altimeter_menu
-	movlw	d'5'
+	movlw	d'6'
 	movwf	menupos
 	bra		menu2						; exit...
 
@@ -340,7 +340,7 @@
 	bra		toggle_salinity
 	dcfsnz	menupos,F
 	bra		toggle_brightness		; toggle between ECO and HIGH
-	movlw	d'5'					; set cursor to "More again"
+	movlw	d'6'					; set cursor to "More again"
 	movwf	menupos
 	bra		setup_menu2						; exit...