diff code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 75:35d947d7a6e7

1.73beta started, small fixes
author heinrichsweikamp
date Sun, 05 Dec 2010 21:40:58 +0100
parents a1ccb92b59cd
children cc657f9915d8
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Mon Nov 15 15:19:24 2010 +0100
+++ b/code_part1/OSTC_code_asm_part1/pled_outputs.asm	Sun Dec 05 21:40:58 2010 +0100
@@ -385,7 +385,7 @@
 
 PLED_divemode_mask:					; Displays mask in Dive-Mode
 	call		PLED_divemask_color	; Set Color for Divemode mask
-	DISPLAYTEXTH	.267		; Max Depth
+	DISPLAYTEXTH	.267		; Max.
 	DISPLAYTEXT		.86			; Divetime
 	DISPLAYTEXT		.87			; Depth
 	call	PLED_standard_color
@@ -938,7 +938,7 @@
 	movff	temperature+1,last_temperature+1
 
 	WIN_TOP		.216
-	WIN_LEFT	.65
+	WIN_LEFT	.50
 	WIN_FONT 	FT_SMALL
 	WIN_INVERT	.0					; Init new Wordprocessor
 	call	PLED_standard_color
@@ -1017,7 +1017,7 @@
 
 PLED_active_gas_clear:					; clears active gas!
 	WIN_TOP		.192
-	WIN_LEFT	.65
+	WIN_LEFT	.50
 	movlw	d'5'
 	movwf	temp1
 	bra		PLED_display_clear_common_y1; also returns!
@@ -1054,7 +1054,7 @@
 	ostc_debug	's'		; Sends debug-information to screen if debugmode active
 ; gas
 	WIN_TOP		.192
-	WIN_LEFT	.65
+	WIN_LEFT	.50
 	WIN_FONT 	FT_SMALL
 	call	PLED_standard_color
 
@@ -2130,21 +2130,22 @@
 	return
 
 PLED_max_pressure:
-	btfsc	multi_gf_display			; Is the Multi-GF Table displayed?
-	return								; Yes, No update and return!
-
 	ostc_debug	'p'		; Sends debug-information to screen if debugmode active
-
+	movff	max_pressure+0,lo
+	movff	max_pressure+1,hi
+	call	adjust_depth_with_salinity			; computes salinity setting into lo:hi [mBar]
+
+	movlw	.039
+	cpfslt	hi
+		bra		maxdepth_greater_99_84mtr
+
+; Display normal "xx.y"
+	lfsr	FSR2,letter
+	call	PLED_standard_color
 	WIN_TOP		.184
 	WIN_LEFT	.0
 	WIN_FONT 	FT_MEDIUM
 	WIN_INVERT	.0					; Init new Wordprocessor
-	call	PLED_standard_color
-
-	lfsr	FSR2,letter
-	movff	max_pressure+0,lo
-	movff	max_pressure+1,hi
-	call	adjust_depth_with_salinity			; computes salinity setting into lo:hi [mBar]
 	bsf		leftbind
 	bsf		ignore_digit5		; do not display 1cm depth
 	output_16dp	d'3'
@@ -2154,6 +2155,43 @@
 	WIN_FONT 	FT_SMALL
 	return
 
+maxdepth_greater_99_84mtr:			; Display only in full meters
+	btfss	maxdepth_greater_100m	; Is max.depth>100m already?
+	call	PLED_clear_maxdepth		; No, clear maxdepth area and set flag
+	; max Depth is already in hi:lo
+	; Show max depth in Full meters
+	; That means ignore figure 4 and 5
+	lfsr	FSR2,letter
+	call	PLED_standard_color
+	WIN_TOP		.184
+	WIN_LEFT	.0
+	WIN_FONT 	FT_MEDIUM
+	WIN_INVERT	.0					; Init new Wordprocessor
+
+	bsf		ignore_digit4
+	bsf		leftbind
+	output_16
+	bcf		leftbind
+	call	word_processor
+	bcf		ignore_digit4
+	WIN_FONT 	FT_SMALL
+	return
+
+PLED_clear_maxdepth:
+	movlw	.0
+	movff	WREG,box_temp+0		; Data
+	movlw	.184
+	movff	WREG,box_temp+1		; row top (0-239)
+	movlw	.215
+	movff	WREG,box_temp+2		; row bottom (0-239)
+	movlw	.0
+	movff	WREG,box_temp+3		; column left (0-159)
+	movlw	.41
+	movff	WREG,box_temp+4		; column right (0-159)
+	call	PLED_box
+	bsf		maxdepth_greater_100m	; Set Flag
+	return
+
 PLED_divemins:
 	btfsc	menubit					; Divemode menu active?
 	return							; Yes, do not update divetime
@@ -3211,7 +3249,7 @@
 	ostc_debug	'j'		; Sends debug-information to screen if debugmode active
 	
 	WIN_TOP		.168
-	WIN_LEFT 	.65
+	WIN_LEFT 	.50
 	WIN_FONT 	FT_SMALL
 	WIN_INVERT	.0					; Init new Wordprocessor