changeset 528:67ab3c028bc2

Show change gas depth below gaslist (in divemode)
author heinrichsweikamp
date Tue, 13 Dec 2011 21:00:40 +0100
parents 31db81de1d4f
children e2acb601504c
files code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/divemode_menu.asm code_part1/OSTC_code_asm_part1/pled_outputs.asm code_part1/OSTC_code_c_part2/p2_deco.o
diffstat 4 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/changelog.txt	Mon Dec 12 18:21:21 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/changelog.txt	Tue Dec 13 21:00:40 2011 +0100
@@ -1,3 +1,7 @@
+New in 2.08 beta:
+BETA Version - Do NOT use for diving!
+NEW: Show change gas depth below gaslist (in divemode)
+
 New in 2.07 beta:
 BETA Version - Do NOT use for diving!
 NEW: Added GF surface display (when > CF08).
--- a/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Mon Dec 12 18:21:21 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/divemode_menu.asm	Tue Dec 13 21:00:40 2011 +0100
@@ -156,6 +156,8 @@
 
 test_switches_divemode_menu1a:
 	call	PLED_divemenu_cursor		; update cursor
+	btfsc	display_set_gas				; In Gaslist or Setpoint list menu?
+	call	PLED_show_change_depth		; Yes, show change depth for gas #menupos
 	return
 
 test_switches_divemode_menu3:
@@ -595,6 +597,7 @@
 	movlw	d'1'
 	movwf	menupos						; reset cursor
 	call	PLED_divemenu_cursor		; update cursor
+	call	PLED_show_change_depth		; And show the first change depth
 	return
 
 divemenu_set_setpoint:
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Mon Dec 12 18:21:21 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Tue Dec 13 21:00:40 2011 +0100
@@ -2845,6 +2845,39 @@
 
 	return					;  return 
 
+PLED_show_change_depth:		; Yes, show change depth for gas #menupos
+	btfsc	display_set_setpoint	; In Setpoint list?
+	return							; Yes, return.
+	movlw	color_yellow			; Blink in yellow
+    call	PLED_set_color
+	WIN_LEFT	.95
+	WIN_TOP		.150
+	WIN_FONT	FT_SMALL
+
+	movlw	.6
+	cpfslt	menupos							; <6?
+	bra		PLED_show_change_depth_clear	; Yes!
+
+	bsf		leftbind
+	STRCPY  TXT_GAS1
+	movff	menupos,lo
+	output_8					; Show gas number
+    STRCAT      " in "
+	decf	menupos,W
+	addlw	d'28'				; offset in memory
+	movwf	EEADR
+	call	read_eeprom			; Low-value
+	movff	EEDATA,lo
+	output_8					; Show gas number
+    STRCAT_PRINT  "m "
+	bcf		leftbind
+	call	PLED_standard_color
+	return
+
+PLED_show_change_depth_clear:
+	STRCPY_PRINT  "         "
+	return
+
 
 PLED_gas_list:
 	ostc_debug	'm'		; Sends debug-information to screen if debugmode active
Binary file code_part1/OSTC_code_c_part2/p2_deco.o has changed