annotate code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 70:8d8e753d72e3

1.72beta - small output fix in non-GF modes
author heinrichsweikamp
date Wed, 20 Oct 2010 19:43:11 +0200
parents df2d3b28947f
children 6beb680a6130
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2 ; OSTC - diving computer code
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
5 ; This program is free software: you can redistribute it and/or modify
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
6 ; it under the terms of the GNU General Public License as published by
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
7 ; the Free Software Foundation, either version 3 of the License, or
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
8 ; (at your option) any later version.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
9
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
10 ; This program is distributed in the hope that it will be useful,
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
13 ; GNU General Public License for more details.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
14
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
15 ; You should have received a copy of the GNU General Public License
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
17
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
18
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
19 ; routines for display outputs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21 ; written: 15/01/05
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
22 ; last updated: 06/06/08
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
23 ; known bugs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
24 ; ToDo: More comments
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
25
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
26 PLED_divemask_color:
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
27 GETCUSTOM8 d'36' ; Divemask output color
29
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
28 bra PLED_standard_color_0
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
29
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
30 PLED_warnings_color:
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
31 GETCUSTOM8 d'37' ; Warnings output color
29
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
32 bra PLED_standard_color_0
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
33
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
34 PLED_standard_color:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
35 GETCUSTOM8 d'35' ; Standard output color
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
36 PLED_standard_color_0: ; Common entry point
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
37 movwf oled1_temp ; copy
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
38 movlw d'0'
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
39 cpfseq oled1_temp
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
40 bra PLED_standard_color_1
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
41 bra PLED_standard_color2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
42 PLED_standard_color_1:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
43 movlw d'4'
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
44 cpfseq oled1_temp
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
45 bra PLED_standard_color_2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
46 bra PLED_standard_color2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
47 PLED_standard_color_2:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
48 movlw d'8'
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
49 cpfseq oled1_temp
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
50 bra PLED_standard_color_3
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
51 bra PLED_standard_color2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
52 PLED_standard_color_3:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
53 movlw d'192'
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
54 cpfseq oled1_temp
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
55 bra PLED_standard_color_4
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
56 bra PLED_standard_color2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
57 PLED_standard_color_4:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
58 movlw d'196'
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
59 cpfseq oled1_temp
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
60 bra PLED_standard_color_5
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
61 bra PLED_standard_color2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
62 PLED_standard_color_5:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
63 movlw d'200'
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
64 cpfseq oled1_temp
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
65 bra PLED_standard_color_6
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
66 bra PLED_standard_color2
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
67 PLED_standard_color_6:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
68 movf oled1_temp,W ; Color should be OK...
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
69 call PLED_set_color
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
70 return
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
71 PLED_standard_color2:
c6cab044a338 1.61beta rc2
heinrichsweikamp
parents: 27
diff changeset
72 movlw color_standard1 ; Reset Color
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
73 call PLED_set_color
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
74 return
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
75
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
76 PLED_color_code macro color_code_temp
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
77 movlw color_code_temp
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
78 call PLED_color_code1
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
79 endm
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
80
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
81 PLED_color_code1: ; Color-codes the output, if required
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
82 movwf debug_temp
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
83 dcfsnz debug_temp,F
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
84 bra PLED_color_code_depth ; CF43 [mBar], 16Bit
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
85 dcfsnz debug_temp,F
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
86 bra PLED_color_code_cns ; CF44 [%]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
87 dcfsnz debug_temp,F
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
88 bra PLED_color_code_gf ; CF45 [%]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
89 dcfsnz debug_temp,F
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
90 bra PLED_color_code_ppo2 ; CF46 [cBar]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
91 dcfsnz debug_temp,F
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
92 bra PLED_color_code_velocity ; CF47 [m/min]
69
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
93 dcfsnz debug_temp,F
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
94 bra PLED_color_code_ceiling ; Show warning if CF41=1 and current depth>shown ceiling
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
95
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
96 PLED_color_code_ceiling:
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
97 GETCUSTOM8 d'40' ; =1: Warn at all?
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
98 movwf lo
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
99 movlw d'1'
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
100 cpfseq lo ; =1?
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
101 bra PLED_color_code_ceiling1 ; No, Set to default color
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
102
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
103 movff char_O_array_decodepth+0,lo ; Ceiling in m
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
104 decf lo,F ; -1
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
105 movff rel_pressure+1,xA+1
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
106 movff rel_pressure+0,xA+0
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
107 movlw LOW d'100'
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
108 movwf xB+0
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
109 clrf xB+1 ; Devide/100 -> xC+0 = Depth in m
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
110 call div16x16 ; xA/xB=xC with xA as remainder
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
111 movf xC+0,W ; Depth in m
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
112 subwf lo,W
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
113 btfsc STATUS,C
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
114 bra PLED_color_code_ceiling2 ; Set to warning color
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
115 PLED_color_code_ceiling1:
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
116 call PLED_standard_color
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
117 return
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
118 PLED_color_code_ceiling2:
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
119 call PLED_warnings_color
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
120 return
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
121
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
122 PLED_color_code_depth:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
123 movff hi,hi_temp
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
124 movff lo,lo_temp
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
125 movff rel_pressure+1,hi
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
126 movff rel_pressure+0,lo
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
127 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
128 movff lo,sub_a+0
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
129 movff hi,sub_a+1
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
130 GETCUSTOM15 d'43' ; Depth warn [mBar]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
131 movff lo,sub_b+0
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
132 movff hi,sub_b+1
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
133 call sub16 ; sub_c = sub_a - sub_b
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
134 btfss neg_flag
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
135 bra PLED_color_code_depth2; Set to warning color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
136 call PLED_standard_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
137 movff hi_temp,hi
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
138 movff lo_temp,lo ; Restore hi, lo
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
139 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
140 PLED_color_code_depth2:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
141 call PLED_warnings_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
142 movff hi_temp,hi
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
143 movff lo_temp,lo ; Restore hi, lo
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
144 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
145
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
146 PLED_color_code_cns:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
147 movff char_O_CNS_fraction,lo
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
148 GETCUSTOM8 d'44' ; CNS Warn [%]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
149 subwf lo,W
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
150 btfsc STATUS,C
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
151 bra PLED_color_code_cns2 ; Set to warning color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
152 call PLED_standard_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
153 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
154 PLED_color_code_cns2:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
155 call PLED_warnings_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
156 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
157
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
158 PLED_color_code_gf:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
159 movff char_O_gradient_factor,lo ; gradient factor
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
160 GETCUSTOM8 d'45' ; GF Warn [%]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
161 subwf lo,W
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
162 btfsc STATUS,C
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
163 bra PLED_color_code_gf2 ; Set to warning color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
164 call PLED_standard_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
165 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
166 PLED_color_code_gf2:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
167 call PLED_warnings_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
168 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
169
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
170 PLED_color_code_ppo2:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
171 movff xC+0,sub_a+0
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
172 movff xC+1,sub_a+1
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
173 GETCUSTOM8 d'46' ; ppO2 warn [cBar]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
174 mullw d'100'
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
175 movff PRODL,sub_b+0
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
176 movff PRODH,sub_b+1
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
177 call sub16 ; sub_c = sub_a - sub_b
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
178 btfss neg_flag
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
179 bra PLED_color_code_ppo22; Set to warning color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
180 call PLED_standard_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
181 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
182 PLED_color_code_ppo22:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
183 call PLED_warnings_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
184 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
185
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
186 PLED_color_code_velocity:
47
56aea9fcdd8f 1.65beta release
heinrichsweikamp
parents: 45
diff changeset
187 btfss neg_flag ; Ignore for ascend!
56aea9fcdd8f 1.65beta release
heinrichsweikamp
parents: 45
diff changeset
188 bra PLED_color_code_velocity1 ; Skip check!
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
189 movff divA+0,lo
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
190 GETCUSTOM8 d'47' ; Velocity warn [m/min]
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
191 subwf lo,W
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
192 btfsc STATUS,C
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
193 bra PLED_color_code_velocity2 ; Set to warning color
47
56aea9fcdd8f 1.65beta release
heinrichsweikamp
parents: 45
diff changeset
194 PLED_color_code_velocity1:
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
195 call PLED_standard_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
196 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
197 PLED_color_code_velocity2:
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
198 call PLED_warnings_color
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
199 return
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
200
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
201 ostc_debug macro debug_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202 movlw debug_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
203 call ostc_debug1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
204 endm
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
206 ostc_debug1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 movwf debug_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
208
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
209 movff debug_char+4,debug_char+5 ; Save for background debugger
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 movff debug_char+3,debug_char+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
211 movff debug_char+2,debug_char+3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 movff debug_char+1,debug_char+2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213 movff debug_char+0,debug_char+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
214 movff debug_temp,debug_char+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
215
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
216 btfss debug_mode ; Are we in debugmode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217 return ; No, return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
218
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219 WIN_TOP .200
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
222 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
223 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
225 movf debug_char+0,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
226 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 movf debug_char+1,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
228 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229 movf debug_char+2,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
230 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
231 movf debug_char+3,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
232 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
233 movf debug_char+4,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 movf debug_char+5,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
236 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
239 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
240 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 PLED_resetdebugger:
21
73014f788032 1.60 stable rc1
heinrichsweikamp
parents: 19
diff changeset
244 bcf LED_blue
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 call PLED_boot ; PLED boot
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246 call PLED_ClearScreen ; clean up OLED
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
247 call PLED_standard_color
47
56aea9fcdd8f 1.65beta release
heinrichsweikamp
parents: 45
diff changeset
248 WIN_INVERT .0 ; Init new Wordprocessor
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
249
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
250 DISPLAYTEXT .133
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
251 DISPLAYTEXT .134
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
252 DISPLAYTEXT .135
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
253 DISPLAYTEXT .136 ; Display Debug intro
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
254
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
255 WIN_TOP .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
256 WIN_LEFT .10
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
257 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
258 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
259 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
260 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
261 movf debug_char+0,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
262 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
263 movf debug_char+1,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
264 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
265 movf debug_char+2,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
266 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
267 movf debug_char+3,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
268 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
269 movf debug_char+4,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
270 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
271 movf debug_char+5,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
272 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
273 movlw '.'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
274 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
275 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
276 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
277 movff flag1,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
278 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
279 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
280 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
281 movff flag2,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
282 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
283 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
284
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
285 WIN_TOP .125
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
286 WIN_LEFT .10
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
287 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
288 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
289 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
290
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
291 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
292 movff flag3,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
293 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
294 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
295 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
296 movff flag4,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
297 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
298 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
299 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
300 movff flag5,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
301 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
302 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
303 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
304 movff flag6,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
305 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
306 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
307 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
308 movff flag7,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
309 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
310 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
311
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
312 WIN_TOP .150
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
313 WIN_LEFT .10
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
314 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
315 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
316 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
317
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
318 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
319 movff flag8,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
320 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
321 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
322 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
323 movff flag9,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
324 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
325 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
326 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
327 movff flag10,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
328 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
329 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
330 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
331 movff flag11,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
332 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
333 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
334 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
335 movff flag12,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
336 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
337 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
338
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
339 PLED_resetdebugger_loop:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
340 btfss switch_left
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
341 bra PLED_resetdebugger_loop ; Loop
21
73014f788032 1.60 stable rc1
heinrichsweikamp
parents: 19
diff changeset
342 bcf LED_red
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
343 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
344
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
345 PLED_divemode_mask: ; Displays mask in Dive-Mode
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
346 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
347 DISPLAYTEXTH .267 ; Max Depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
348 DISPLAYTEXT .86 ; Divetime
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
349 DISPLAYTEXT .87 ; Depth
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
350 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
351 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
352
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
353 PLED_clear_decoarea:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
354 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
355 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
356 movlw .60
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
357 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
358 movlw .239
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
359 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
360 movlw .090
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
361 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
362 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
363 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
364 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
365 call PLED_temp_divemode ; redraw temperature
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
366 call PLED_active_gas_divemode ; redraw active Gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
367 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
368
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
369 PLED_display_ndl_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
370 ; Clear Dekostop and Dekosum
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
371 rcall PLED_clear_decoarea
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
372
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
373 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
374 DISPLAYTEXT d'84' ; NoStop
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
375 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
376
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
377 PLED_display_ndl_mask2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
378 ; Clears Gradient Factor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
379 movlw d'8'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
380 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
381 WIN_TOP .145
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
382 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
383 call PLED_display_clear_common_y1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
384 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
385
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
386 PLED_display_ndl:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
387 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
388 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
389
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
390 ostc_debug 'z' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
391
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
392 WIN_TOP .185
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
393 WIN_LEFT .119
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
394 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
395 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
396 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
397
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
398 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
399 movff char_O_nullzeit,lo ; NDL in minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
400 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
401 movlw 0x27 ; "'"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
402 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
403 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
404 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
405 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
406
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
407 PLED_display_deko_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
408 rcall PLED_clear_decoarea
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
409 ; total deco time word
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
410 call PLED_divemask_color ; Set Color for Divemode mask
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 67
diff changeset
411 DISPLAYTEXT d'85' ; TTS
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
412 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
413 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
414
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
415 PLED_display_deko:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
416 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
417 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
418
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
419 btfsc menubit ; Divemode menu active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
420 bra PLED_display_deko1 ; Yes, do not display dekostop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
421
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
422 ostc_debug 'y' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
423 ; deco stop word
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
424 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
425 DISPLAYTEXT d'82' ; DEKOSTOP
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
426 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
427
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
428 WIN_TOP .118
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
429 WIN_LEFT .94
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
430 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
431 WIN_INVERT .0 ; Init new Wordprocessor
69
df2d3b28947f 1.71beta for Mk.2
heinrichsweikamp
parents: 68
diff changeset
432 PLED_color_code warn_ceiling ; Color-code Output
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
433 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
434 movff char_O_array_decodepth+0,lo ; Ceiling in m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
435 output_99
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
436 movlw 'm' ; "m"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
437 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
438 movff char_O_array_decotime,lo ; length of first stop in m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
439 output_99
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
440 movlw 0x27 ; "'"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
441 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
442 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
443 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
444
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
445 PLED_display_deko1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
446 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
447 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
448
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
449 ostc_debug 'x' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
450
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
451 WIN_TOP .185
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
452 WIN_LEFT .119
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
453 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
454 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
455 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
456 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
457 movff char_O_ascenttime,lo ; complete ascend time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
458 movlw d'199' ; limit display of total ascend time to 99mins....
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
459 cpfslt lo ; skip if 199 (WREG) > lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
460 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
461 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
462 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
463 movlw 0x27 ; "'"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
464 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
465 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
466
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
467 movff char_O_gradient_factor,lo ; gradient factor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
468 GETCUSTOM8 d'8' ; threshold for display
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
469 cpfslt lo ; show value?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
470 bra PLED_display_deko2 ; Yes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
471 ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
472 bra PLED_display_ndl_mask2 ; Clear gradient factor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
473
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
474 PLED_display_deko2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
475 ostc_debug 'w' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
476 ;GF
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
477 WIN_TOP .145
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
478 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
479 WIN_FONT FT_SMALL
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
480 PLED_color_code warn_gf ; Color-code Output
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
481 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
482 movlw 'G'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
483 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
484 movlw 'F'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
485 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
486 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
487 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
488 movff char_O_gradient_factor,lo ; gradient factor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
489 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
490 movlw '%'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
491 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
492 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
493 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
494 call word_processor
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
495 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
496 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
497
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
498 PLED_simulator_data:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
499 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
500 WIN_LEFT .105
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
501 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
502 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
503 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
504 movff logbook_temp1,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
505 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
506 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
507 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
508 movlw 'm'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
509 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
510 movlw 'i'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
511 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
512 movlw 'n'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
513 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
514 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
515 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
516 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
517
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
518 WIN_TOP .95
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
519 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
520 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
521 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
522 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
523 movff logbook_temp2,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
524 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
525 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
526 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
527 movlw 'm'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
528 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
529 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
530 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
531 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
532 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
533
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
534 PLED_display_velocity:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
535 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
536 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
537
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
538 ostc_debug 'v' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
539 WIN_TOP .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
540 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
541 WIN_FONT FT_SMALL
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
542 PLED_color_code warn_velocity ; Color code output
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
543 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
544 movlw '-'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
545 btfsc neg_flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
546 movlw '+'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
547 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
548 movff divA+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
549 output_99
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
550 OUTPUTTEXT d'83' ; m/min
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
551 call word_processor
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
552 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
553 bsf pled_velocity_display
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
554 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
555
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
556 PLED_display_velocity_clear:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
557 movlw d'8'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
558 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
559 WIN_TOP .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
560 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
561 bcf pled_velocity_display
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
562 bra PLED_display_clear_common_y1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
563
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
564 PLED_display_wait_clear
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
565 movlw d'6'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
566 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
567 WIN_TOP .2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
568 WIN_LEFT .115
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
569 bra PLED_display_clear_common_y1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
570
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
571 PLED_display_clear_common_y2: ; Clears with y-scale=2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
572 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
573 bra PLED_display_clear_common1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
574
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
575 PLED_display_clear_common_y1: ; Clears with y-scale=1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
576 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
577 PLED_display_clear_common1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
578 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
579 PLED_display_clear_common2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
580 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
581 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
582 decfsz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
583 bra PLED_display_clear_common2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
584 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
585 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
586 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
587
63
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
588 PLED_diveclock:
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
589 GETCUSTOM8 d'39' ; =1: Show clock in Divemode
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
590 movwf lo
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
591 movlw d'1'
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
592 cpfseq lo ; =1?
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
593 return ; No, Done.
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
594
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
595 btfsc menubit ; is the Dive mode menu displayed?
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
596 return ; Yes
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
597
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
598 WIN_TOP .2
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
599 WIN_LEFT .64
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
600 WIN_FONT FT_SMALL
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
601 WIN_INVERT .0 ; Init new Wordprocessor
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
602 call PLED_standard_color
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
603 lfsr FSR2,letter
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
604 movff hours,lo
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
605 output_99x
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
606 movlw ':'
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
607 movwf POSTINC2
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
608 movff mins,lo
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
609 output_99x
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
610 call word_processor
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
611 return
fee7c62b4de1 1.71beta - clock in divemode (CF39)
heinrichsweikamp
parents: 62
diff changeset
612
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
613 PLED_clock:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
614 ostc_debug 'c'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
615
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
616 ;If > 0 display surface_interval:2 and clock changing every 5 seconds
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
617 ;use timeout_counter for this
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
618 WIN_TOP .50
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
619 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
620 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
621 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
622 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
623
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
624 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
625
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
626 movff surface_interval+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
627 tstfsz lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
628 bra PLED_clock0 ; Not Zero, switch between Interval and clock
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
629 movff surface_interval+1,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
630 tstfsz lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
631 bra PLED_clock0 ; Not Zero, switch between Interval and clock
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
632 bra PLED_clock3 ; surface_interval=0, always display clock!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
633
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
634 PLED_clock0:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
635 btfss show_interval ; Show Interval?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
636 bra PLED_clock2 ; No, display clock and reset counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
637
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
638 PLED_clock1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
639 decfsz timeout_counter,F ; =0?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
640 bra PLED_clock1a ; No...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
641 bra PLED_clock3 ; Yes, display clock and reset counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
642
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
643 PLED_clock1a:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
644 bsf show_interval
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
645 movlw d'6'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
646 cpfslt timeout_counter ; f < w? -> timeout_counter>5?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
647 rcall PLED_clock_reload_timer ; No, reload counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
648
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
649 movff surface_interval+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
650 movff surface_interval+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
651 call convert_time ; lo=mins, hi=hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
652
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
653 movf hi,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
654 movff lo,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
655 movwf lo ; exchange lo and hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
656
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
657 movlw 'I'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
658 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
659 movlw 'n'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
660 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
661 movlw 't'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
662 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
663 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
664 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
665 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
666 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
667 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
668 movff hi,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
669 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
670 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
671 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
672 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
673 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
674
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
675 PLED_clock_reload_timer:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
676 bcf show_interval
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
677 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
678 movwf timeout_counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
679 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
680
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
681 PLED_interval_reload_timer:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
682 bsf show_interval
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
683 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
684 movwf timeout_counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
685 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
686
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
687 PLED_clock2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
688 decfsz timeout_counter,F ; =0?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
689 bra PLED_clock3 ; No...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
690 bra PLED_clock1a ; Yes, display interval and reset counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
691
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
692 PLED_clock3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
693 bcf show_interval
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
694 movlw d'6'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
695 cpfslt timeout_counter ; f < w? -> timeout_counter>5?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
696 rcall PLED_interval_reload_timer; No, reload counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
697
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
698 movff hours,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
699 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
700 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
701 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
702 movff mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
703 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
704 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
705 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
706 movff secs,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
707 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
708 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
709 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
710 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
711 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
712
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
713 PLED_logbook_cursor:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
714
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
715 PLED_menu_cursor:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
716 WIN_TOP .35
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
717 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
718 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
719 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
720 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
721
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
722 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
723 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
724 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
725 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
726
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
727 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
728 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
729 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
730 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
731 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
732
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
733 WIN_TOP .95
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
734 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
735 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
736 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
737 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
738
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
739 WIN_TOP .125
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
740 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
741 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
742 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
743 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
744
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
745 WIN_TOP .155
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
746 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
747 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
748 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
749 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
750 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
751
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
752 WIN_TOP .185
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
753 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
754 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
755 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
756 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
757
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
758 movff menupos,temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
759 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
760 movlw d'35'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
761 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
762 movlw d'65'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
763 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
764 movlw d'95'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
765 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
766 movlw d'125'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
767 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
768 movlw d'155'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
769 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
770 movlw d'185'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
771
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
772 movff WREG,win_top
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
773 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
774 movlw 0xB7
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
775 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
776 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
777 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
778
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
779 PLED_menu_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
780 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
781 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
782 DISPLAYTEXT .5 ; Menu:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
783 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
784 DISPLAYTEXT .6 ; Logbook
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
785 DISPLAYTEXT .7 ; Gas Setup
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
786 DISPLAYTEXT .9 ; Reset all
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
787 DISPLAYTEXT .10 ; Setup...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
788 DISPLAYTEXT .142 ; More...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
789 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
790 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
791
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
792 PLED_setup_menu_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
793 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
794 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
795 DISPLAYTEXT .98 ; Setup Menu:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
796 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
797 DISPLAYTEXT .99 ; Custom FunctionsI
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
798 DISPLAYTEXT .153 ; Custom FunctionsII
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
799 DISPLAYTEXTH .276 ; Salinity:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
800 DISPLAYTEXT .100 ; Decotype:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
801 DISPLAYTEXT .142 ; More...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
802 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
803 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
804
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
805 PLED_more_setup_menu_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
806 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
807 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
808 DISPLAYTEXTH .258 ; Setup Menu 2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
809 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
810 DISPLAYTEXTH .257 ; Date format:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
811 DISPLAYTEXT .129 ; Debug:
12
588a969a0cae 1.53 beta rc
heinrichsweikamp
parents: 9
diff changeset
812 DISPLAYTEXT .187 ; Show License
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
813
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
814 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
815 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
816
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
817 PLED_more_menu_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
818 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
819 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
820 DISPLAYTEXT .144 ; Menu 2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
821 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
822 DISPLAYTEXT .8 ; Set Time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
823 DISPLAYTEXT .110 ; Const. ppO2 Setup
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
824 DISPLAYTEXT .113 ; Battery Info
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
825 DISPLAYTEXT .247 ; Simulator
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
826
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
827 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
828 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
829
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
830 PLED_reset_menu_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
831 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
832 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
833 DISPLAYTEXT .28 ; Reset Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
834 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
835 DISPLAYTEXT .21 ; Cancel Reset
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
836 DISPLAYTEXT .245 ; Reset CF,Gases & Deco
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
837 DISPLAYTEXTH .284 ; Reset Logbook
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
838 DISPLAYTEXTH .285 ; Reboot OSTC
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
839 DISPLAYTEXTH .286 ; Reset Decodata
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
840 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
841 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
842
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
843 PLED_simulator_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
844 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
845 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
846 DISPLAYTEXT .248 ; OSTC Simulator
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
847 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
848 DISPLAYTEXT .249 ; Start Dive
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
849 DISPLAYTEXTH .277 ; Bottom Time:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
850 DISPLAYTEXTH .278 ; Max. Depth:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
851 DISPLAYTEXTH .279 ; Calculate Deco
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
852 DISPLAYTEXTH .280 ; Show Decoplan
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
853 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
854 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
855
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
856
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
857
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
858
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
859 PLED_temp_surfmode:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
860 ostc_debug 'e'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
861 movff temperature+0,last_temperature+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
862 movff temperature+1,last_temperature+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
863 WIN_TOP .100
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
864 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
865 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
866 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
867 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
868
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
869 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
870 movlw '-'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
871 btfsc neg_temp ; Show "-"?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
872 movwf POSTINC2 ; Yes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
873 movff temperature+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
874 movff temperature+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
875 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
876 movwf ignore_digits
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
877 bsf leftbind ; left orientated output
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
878 output_16dp d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
879 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
880 movlw '°'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
881 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
882 movlw 'C'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
883 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
884 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
885 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
886 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
887 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
888
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
889 PLED_temp_divemode:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
890 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
891 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
892
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
893 ostc_debug 'u' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
894
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
895 ; temperature
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
896 movff temperature+0,last_temperature+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
897 movff temperature+1,last_temperature+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
898
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
899 WIN_TOP .216
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
900 WIN_LEFT .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
901 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
902 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
903 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
904
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
905 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
906 movlw '-'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
907 btfsc neg_temp ; Show "-"?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
908 movwf POSTINC2 ; Yes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
909 movff temperature+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
910 movff temperature+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
911 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
912 movwf ignore_digits
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
913 bsf leftbind ; left orientated output
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
914 output_16dp d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
915 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
916 movlw '°'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
917 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
918 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
919 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
920 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
921 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
922
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
923 PLED_show_ppO2: ; Show ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
924 ostc_debug 't' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
925 WIN_TOP .120
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
926 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
927 WIN_FONT FT_SMALL
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
928 PLED_color_code warn_ppo2 ; Color-code output
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
929
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
930 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
931 movlw 'p'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
932 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
933 movlw 'p'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
934 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
935 movlw 'O'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
936 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
937 movlw '2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
938 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
939 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
940 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
941 movff xC+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
942 movff xC+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
943 bsf ignore_digit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
944 output_16dp d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
945 bcf ignore_digit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
946 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
947 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
948 call word_processor
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
949 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
950 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
951
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
952 PLED_show_ppO2_clear: ; Clear ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
953 movlw d'10'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
954 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
955 WIN_TOP .120
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
956 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
957 call PLED_display_clear_common_y1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
958 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
959
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
960 PLED_active_gas_clear: ; clears active gas!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
961 WIN_TOP .192
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
962 WIN_LEFT .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
963 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
964 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
965 bra PLED_display_clear_common_y1; also returns!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
966
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
967 PLED_active_gas_divemode: ; Displays current gas (e.g. 40/20) if a) He>0 or b) O2>Custom9
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
968 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
969 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
970
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
971 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
972 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
973
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
974 WIN_INVERT .0 ; Init new Wordprocessor
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
975 call PLED_active_gas_divemode_show ; Show gas (Non-Inverted in all cases)
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
976
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
977 btfss better_gas_available ;=1: A better gas is available and a gas change is advised in divemode
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
978 return ; Done.
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
979
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
980 ; Check if Gas Output should blink when a better gas is available...
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
981 GETCUSTOM8 d'42' ; =1 if gas should blink
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
982 movwf lo
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
983 movlw d'1'
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
984 cpfseq lo ; =1?
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
985 return ; No, Done.
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
986
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
987 btg blinking_better_gas ; Toggle blink bit...
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
988 btfss blinking_better_gas ; blink now?
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
989 return ; No, Done.
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
990 WIN_INVERT .1 ; Init new Wordprocessor
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
991 call PLED_active_gas_divemode_show ; Show gas (Non-Inverted in all cases)
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
992 WIN_INVERT .0 ; Init new Wordprocessor
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
993 return ; Done.
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
994
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
995 PLED_active_gas_divemode_show:
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
996 ostc_debug 's' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
997 ; gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
998 WIN_TOP .192
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
999 WIN_LEFT .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1000 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1001 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1002
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1003 movlw d'100' ; 100% in the tank
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1004 movff char_I_N2_ratio,lo ; minus N2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1005 bsf STATUS,C ; set borrow bit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1006 subfwb lo,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1007 movff char_I_He_ratio,lo ; minus He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1008 bsf STATUS,C ; set borrow bit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1009 subfwb lo,F ; =% O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1010 GETCUSTOM8 d'9' ; get oxygen treshold
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1011 movff char_I_He_ratio,hi ; He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1012 cpfsgt lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1013 bra PLED_active_gas_divemode2 ; Check He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1014 bra PLED_active_gas_divemode3 ; Skip He check, display gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1015
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1016 PLED_active_gas_divemode2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1017 tstfsz hi ; He = 0 %
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1018 bra PLED_active_gas_divemode3 ; display gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1019 ; O2 below treshold, He=0 -> Skip display!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1020 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1021 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1022 bra PLED_display_clear_common_y1 ; also returns!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1023
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1024 PLED_active_gas_divemode3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1025 movlw d'21'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1026 cpfseq lo ; Air? (O2=21%)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1027 bra PLED_active_gas_divemode4 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1028 tstfsz hi ; Air? (He=0%)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1029 bra PLED_active_gas_divemode4 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1030
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1031 ; Yes, display "Air" instead of 21/0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1032 lfsr FSR2,letter
8
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1033 OUTPUTTEXTH d'264' ;"Air "
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1034 movlw ' '
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1035 btfsc better_gas_available ;=1: A better gas is available and a gas change is advised in divemode
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1036 movlw '*'
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1037 movwf POSTINC2
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1038 call word_processor
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1039 return
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1040
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1041 PLED_active_gas_divemode4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1042 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1043 bsf leftbind ; left orientated output
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1044 output_8 ; O2 ratio is still in "lo"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1045 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1046 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1047 movff char_I_He_ratio,lo ; copy He ratio into lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1048 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1049 movlw ' '
8
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1050 btfsc better_gas_available ;=1: A better gas is available and a gas change is advised in divemode
d8b426d71282 1.52 rc2
heinrichsweikamp
parents: 4
diff changeset
1051 movlw '*'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1052 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1053 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1054 call word_processor
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1055 return
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1056
17
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 14
diff changeset
1057
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1058
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1059 PLED_display_decotype_surface:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1060 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1061 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1062 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1063 clrf EEADRH
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1064 read_int_eeprom d'34' ; Read deco data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1065 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1066 bra show_decotype_surface2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1067
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1068 ;ZH-L16
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1069 WIN_TOP .125
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1070 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1071
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1072 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1073 movlw 'O'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1074 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1075 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1076 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1077 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1078 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1079 WIN_TOP .150
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1080 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1081
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1082 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1083 movlw 'C'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1084 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1085 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1086 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1087 show_decotype_surface2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1088 decf EEDATA,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1089 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1090 bra show_decotype_surface3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1091 ; Gauge
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1092 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1093
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1094 show_decotype_surface3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1095 decf EEDATA,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1096 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1097 bra show_decotype_surface4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1098 ; const. ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1099 WIN_TOP .125
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1100 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1101
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1102 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1103 movlw 'C'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1104 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1105 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1106 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1107 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1108 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1109 WIN_TOP .150
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1110 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1111
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1112 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1113 movlw 'C'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1114 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1115 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1116 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1117 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1118 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1119 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1120 show_decotype_surface4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1121 decf EEDATA,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1122 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1123 bra show_decotype_surface5
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1124 ; Apnoe
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1125 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1126 show_decotype_surface5:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1127 decf EEDATA,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1128 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1129 bra show_decotype_surface6
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1130 ; Multi-GF OC
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1131 WIN_TOP .125
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1132 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1133 movlw 'G'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1134 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1135 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1136 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1137 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1138 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1139
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1140 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1141 WIN_TOP .150
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1142 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1143 movlw 'F'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1144 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1145 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1146 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1147 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1148 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1149
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1150 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1151 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1152
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1153 show_decotype_surface6:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1154 ; Multi-GF CC
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1155 WIN_TOP .125
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1156 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1157 movlw 'G'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1158 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1159 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1160 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1161 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1162 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1163
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1164 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1165 WIN_TOP .150
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1166 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1167 movlw 'F'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1168 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1169 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1170 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1171 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1172 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1173
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1174 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1175 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1176
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1177 PLED_pre_dive_screen: ;Display Pre-Dive Screen
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1178 movlw .0
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1179 movff WREG,box_temp+0 ; Data
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1180 movlw .25
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1181 movff WREG,box_temp+1 ; row top (0-239)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1182 movlw .120
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1183 movff WREG,box_temp+2 ; row bottom (0-239)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1184 movlw .82
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1185 movff WREG,box_temp+3 ; column left (0-159)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1186 movlw .159
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1187 movff WREG,box_temp+4 ; column right (0-159)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1188 call PLED_box
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1189
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1190 ; List active gases/Setpoints
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1191
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1192 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1193 bra PLED_pre_dive_screen3 ; Yes, display SetPoint/Sensor result list
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1194
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1195 PLED_pre_dive_screen2:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1196 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1197
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1198 WIN_LEFT .90
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1199 WIN_FONT FT_SMALL
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1200 bsf leftbind
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1201
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1202 movlw d'2'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1203 movwf wait_temp ; here: stores eeprom address for gas list
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1204 movlw d'0'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1205 movwf waitms_temp ; here: stores row for gas list
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1206 clrf hi ; here: Gas counter
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1207
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1208 PLED_pre_dive_screen2_loop:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1209 incf hi,F ; Increase Gas
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1210 movlw d'4'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1211 addwf wait_temp,F ; Increase eeprom address for gas list
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1212
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1213 lfsr FSR2,letter
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1214 movlw 'G'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1215 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1216 movff hi,lo ; copy gas number
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1217 output_8 ; display gas number
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1218 movlw ':'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1219 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1220 movlw ' '
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1221 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1222 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1223 call read_eeprom ; get byte (stored in EEDATA)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1224 movff EEDATA,lo ; copy to lo
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1225 output_8 ; outputs into Postinc2!
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1226 movlw '/'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1227 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1228 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1229 call read_eeprom ; get byte (stored in EEDATA)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1230 movff EEDATA,lo ; copy to lo
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1231 output_8 ; outputs into Postinc2!
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1232
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1233 read_int_eeprom d'27' ; read flag register
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1234 movff hi,lo ; copy gas number
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1235 PLED_pre_dive_screen2_loop1:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1236 rrcf EEDATA ; roll flags into carry
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1237 decfsz lo,F ; max. 5 times...
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1238 bra PLED_pre_dive_screen2_loop1
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1239
14
239cb2cdc0c9 1.53 beta - very small fix
heinrichsweikamp
parents: 13
diff changeset
1240 btfsc STATUS,C ; test carry
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1241 bra PLED_pre_dive_white
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1242
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1243 movlw color_grey
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1244 call PLED_set_color ; grey out inactive gases!
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1245 bra PLED_pre_dive_color_done
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1246
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1247 PLED_pre_dive_white:
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1248 call PLED_standard_color
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1249
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1250 PLED_pre_dive_color_done:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1251 read_int_eeprom d'33' ; Read start gas (1-5)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1252 movf EEDATA,W
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1253 cpfseq hi ; Current Gas the active gas?
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1254 bra PLED_pre_dive_screen2a
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1255 bra PLED_pre_dive_screen2b
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1256
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1257 PLED_pre_dive_screen2a:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1258 movlw d'25'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1259 addwf waitms_temp,F ; Increase row
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1260 WIN_LEFT .90
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1261 movff waitms_temp,win_top ; Set Row
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1262 call word_processor ; No, display gas
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1263
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1264 PLED_pre_dive_screen2b:
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1265 call PLED_standard_color
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1266
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1267 movlw d'5' ; list all four (remaining) gases
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1268 cpfseq hi ; All gases shown?
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1269 bra PLED_pre_dive_screen2_loop ; No
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1270
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1271 return ; No, return (OC mode)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1272
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1273 PLED_pre_dive_screen3:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1274 WIN_LEFT .90
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1275 WIN_FONT FT_SMALL
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1276 bsf leftbind
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1277
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1278 ; list three SP in Gaslist
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1279 movlw d'35' ; 36 = current SP position in EEPROM
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1280 movwf wait_temp ; here: stores eeprom address for gas list
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1281 movlw d'0'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1282 movwf waitms_temp ; here: stores row for gas list
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
1283 clrf temp6 ; here: SP counter
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1284
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1285 PLED_pre_dive_screen3_loop:
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1286 incf wait_temp,F ; EEPROM address
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
1287 incf temp6,F ; Increase SP
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1288
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1289 movlw d'25'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1290 addwf waitms_temp,F ; Increase row
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1291 WIN_LEFT .90
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1292 movff waitms_temp,win_top ; Set Row
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1293
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1294 lfsr FSR2,letter
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1295 movlw 'S'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1296 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1297 movlw 'P'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1298 movwf POSTINC2
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
1299 movff temp6,lo ; copy gas number
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1300 output_8 ; display gas number
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1301 movlw ':'
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1302 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1303 movlw ' '
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1304 movwf POSTINC2
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1305 movff wait_temp, EEADR; SP #hi position
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1306 call read_eeprom ; get byte (stored in EEDATA)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1307 movff EEDATA,lo ; copy to lo
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1308 clrf hi
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1309 output_16dp d'3' ; outputs into Postinc2!
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1310 call word_processor
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1311
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1312 movlw d'3' ; list all three SP
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
1313 cpfseq temp6 ; All gases shown?
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1314 bra PLED_pre_dive_screen3_loop ;no
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1315
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1316 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1317 movff EEDATA,active_gas ; Read start gas (1-5)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1318 decf active_gas,W ; Gas 0-4
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1319 mullw d'4'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1320 movf PRODL,W
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1321 addlw d'7' ; = address for He ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1322 movwf EEADR
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1323 call read_eeprom ; Read He ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1324 movff EEDATA,hi ; And copy into hold register
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1325 decf active_gas,W ; Gas 0-4
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1326 mullw d'4'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1327 movf PRODL,W
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1328 addlw d'6' ; = address for O2 ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1329 movwf EEADR
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1330 call read_eeprom ; Read O2 ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1331 movff EEDATA, lo ; O2 ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1332
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1333 WIN_LEFT .90
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1334 WIN_TOP .100
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1335 lfsr FSR2,letter
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1336 movlw 'D'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1337 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1338 movlw 'i'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1339 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1340 movlw 'l'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1341 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1342 movlw ':'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1343 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1344 output_8 ; O2 Ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1345 movlw '/'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1346 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1347 movff hi,lo
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1348 output_8 ; He Ratio
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1349 call word_processor
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
1350
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1351 bcf leftbind
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1352 return ; Return (CC Mode)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
1353
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1354 PLED_active_gas_surfmode: ; Displays start gas/SP 1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1355 ostc_debug 'q' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1356
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1357 btfsc FLAG_apnoe_mode ; In Apnoe mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1358 return ; Yes, return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1359
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1360 btfsc gauge_mode ; In Gauge mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1361 return ; Yes, return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1362
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1363 btfss FLAG_const_ppO2_mode ; are we in const. ppO2 mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1364 bra PLED_active_gas_surfmode2 ; No, display gases
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1365
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1366 ; In CC Mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1367 WIN_TOP .135
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1368 WIN_LEFT .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1369 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1370 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1371 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1372
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1373 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1374 read_int_eeprom d'36'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1375 movff EEDATA,lo ; copy to lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1376 clrf hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1377 output_16dp d'3' ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1378 movlw 'B'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1379 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1380 movlw 'a'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1381 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1382 movlw 'r'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1383 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1384 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1385 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1386 bra PLED_active_gas_surfmode_exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1387
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1388 PLED_active_gas_surfmode2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1389 WIN_TOP .130
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1390 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1391 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1392 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1393 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1394
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1395
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1396 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1397 movff EEDATA,active_gas ; Read start gas (1-5)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1398
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1399 decf active_gas,W ; Gas 0-4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1400 mullw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1401 movf PRODL,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1402 addlw d'7' ; = address for He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1403 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1404 call read_eeprom ; Read He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1405 movff EEDATA,char_I_He_ratio ; And copy into hold register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1406
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1407 decf active_gas,W ; Gas 0-4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1408 mullw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1409 movf PRODL,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1410 addlw d'6' ; = address for O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1411 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1412 call read_eeprom ; Read O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1413 movff EEDATA, char_I_O2_ratio ; O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1414 movff char_I_He_ratio, wait_temp ; copy into bank1 register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1415 bsf STATUS,C ; Borrow bit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1416 movlw d'100' ; 100%
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1417 subfwb wait_temp,W ; minus He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1418 bsf STATUS,C ; Borrow bit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1419 subfwb EEDATA,F ; minus O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1420 movff EEDATA, char_I_N2_ratio ; = N2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1421
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1422 movlw d'100' ; 100% in the tank
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1423 movff char_I_N2_ratio,lo ; minus N2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1424 bsf STATUS,C ; set borrow bit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1425 subfwb lo,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1426 movff char_I_He_ratio,lo ; minus He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1427 bsf STATUS,C ; set borrow bit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1428 subfwb lo,F ; =% O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1429
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1430 movff char_I_He_ratio,hi ; Copy into Bank1 register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1431
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1432 movlw d'21'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1433 cpfseq lo ; Air? (O2=21%)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1434 bra PLED_active_gas_surfmode4 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1435 tstfsz hi ; Air? (He=0%)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1436 bra PLED_active_gas_surfmode4 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1437
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1438 ; Yes, display "Air" instead of 21/0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1439 DISPLAYTEXTH d'265' ;"Air ", y-scale=2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1440 bra PLED_active_gas_surfmode_exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1441
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1442 PLED_active_gas_surfmode4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1443 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1444 bsf leftbind ; left orientated output
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1445 output_8 ; O2 ratio is still in "lo"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1446 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1447 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1448 movff char_I_He_ratio,lo ; copy He ratio into lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1449 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1450 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1451 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1452 bra PLED_active_gas_surfmode_exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1453
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1454 PLED_active_gas_surfmode_exit:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1455 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1456 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1457 movlw .122
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1458 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1459 movlw .175
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1460 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1461 movlw .82
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1462 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1463 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1464 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1465 call PLED_frame
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1466 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1467
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1468 PLED_confirmbox:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1469 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1470 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1471 movlw .68
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1472 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1473 movlw .146
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1474 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1475 movlw .34
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1476 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1477 movlw .101
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1478 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1479 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1480
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
1481 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1482 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1483 movlw .70
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1484 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1485 movlw .144
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1486 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1487 movlw .35
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1488 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1489 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1490 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1491 call PLED_frame
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1492 DISPLAYTEXT .143 ; Confirm:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1493 DISPLAYTEXT .145 ; Cancel
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1494 DISPLAYTEXT .146 ; OK!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1495
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1496 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1497 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1498
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1499 PLED_confirmbox2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1500 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1501 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1502 movlw .96
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1503 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1504 movlw .143
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1505 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1506 movlw .39
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1507 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1508 movlw .51
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1509 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1510 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1511
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1512 movff menupos,temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1513 movlw d'96'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1514 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1515 movlw d'96'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1516 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1517 movlw d'120'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1518 movff WREG,win_top
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1519 WIN_LEFT .39
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1520 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1521 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1522 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1523
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1524 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1525 movlw 0xB7 ; Arrow for menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1526 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1527 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1528
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1529 bcf sleepmode ; clear some flags
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1530 bcf menubit2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1531 bcf menubit3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1532 bcf switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1533 bcf switch_left
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1534 clrf timeout_counter2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1535 WAITMS d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1536
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1537 PLED_confirmbox_loop:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1538 call check_switches_logbook
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1539
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1540 btfsc menubit3 ; SET/MENU?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1541 bra PLED_confirmbox_move_cursor; Move Cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1542 btfsc menubit2 ; ENTER?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1543 bra PLED_confirmbox_menu_do ; Do task
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1544
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1545 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1546 call timeout_surfmode ; timeout
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1547
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1548 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1549 call set_dive_modes ; check, if divemode must be entered
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1550 bcf onesecupdate ; one second update
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1551
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1552 btfsc sleepmode ; Timeout?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1553 bra PLED_confirmbox_cancel ; back with cancel
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1554 btfsc divemode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1555 bra PLED_confirmbox_cancel ; back with cancel
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1556
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1557 bra PLED_confirmbox_loop ; wait for something to do
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1558
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1559 PLED_confirmbox_cancel:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1560 retlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1561 PLED_confirmbox_ok:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1562 retlw .1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1563
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1564 PLED_confirmbox_menu_do:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1565 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1566 bra PLED_confirmbox_cancel
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1567 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1568 bra PLED_confirmbox_ok
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1569 bra PLED_confirmbox_cancel
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1570
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1571 PLED_confirmbox_move_cursor:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1572 incf menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1573 movlw d'3' ; number of menu options+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1574 cpfseq menupos ; =limit?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1575 bra PLED_confirmbox_move_cursor2 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1576 movlw d'1' ; Yes, reset to position 1!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1577 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1578 PLED_confirmbox_move_cursor2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1579 bra PLED_confirmbox2 ; Return to Profile Menu, also updates cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1580
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1581
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1582 PLED_depth:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1583 ostc_debug 'r' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1584 movff rel_pressure+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1585 movff rel_pressure+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1586 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1587
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1588 movlw .039
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1589 cpfslt hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1590 bra depth_greater_99_84mtr
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1591
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1592 btfsc depth_greater_100m ; Was depth>100m during last call
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1593 call PLED_clear_depth ; Yes, clear depth area
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1594 bcf depth_greater_100m ; Do this once only...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1595
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1596 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1597
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1598 movlw HIGH d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1599 movwf sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1600 movlw LOW d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1601 movwf sub_a+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1602 movff hi,sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1603 movff lo,sub_b+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1604 incf sub_b+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1605 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1606 addwfc sub_b+1,F ; Add 1mBar offset
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1607 call sub16 ; sub_c = sub_a - sub_b
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1608 btfss neg_flag ; Depth lower then 10m?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1609 rcall depth_less_10mtr ; Yes, add extra space
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1610
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1611 WIN_TOP .24
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1612 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1613 WIN_FONT FT_LARGE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1614 WIN_INVERT .0 ; Init new Wordprocessor
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
1615 PLED_color_code warn_depth ; Color-code the output
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1616
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1617 movlw HIGH d'99'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1618 movwf sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1619 movlw LOW d'99'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1620 movwf sub_a+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1621 movff hi,sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1622 movff lo,sub_b+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1623 call sub16 ; sub_c = sub_a - sub_b
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1624 btfss neg_flag ; Depth lower then 1m?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1625 bra pled_depth2 ; Yes, display manual Zero
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1626
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1627 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1628 bsf ignore_digit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1629 output_16 ; Full meters in Big font
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1630 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1631 bra pled_depth3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1632
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1633 pled_depth2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1634 movlw '0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1635 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1636 pled_depth3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1637 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1638 bcf ignore_digit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1639
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1640 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1641 WIN_TOP .50
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1642 WIN_LEFT .40
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
1643 PLED_color_code warn_depth ; Color-code the output
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1644
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1645 movff rel_pressure+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1646 movff rel_pressure+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1647 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1648 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1649 movlw '.'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1650 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1651
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1652 movlw HIGH d'9'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1653 movwf sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1654 movlw LOW d'9'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1655 movwf sub_a+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1656 movff hi,sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1657 movff lo,sub_b+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1658 call sub16 ; sub_c = sub_a - sub_b
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1659 btfss neg_flag ; Depth lower then 0.1m?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1660 bra pled_depth4 ; Yes, display manual Zero
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1661
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1662 movlw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1663 movwf ignore_digits
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1664 bsf ignore_digit5
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1665 output_16dp d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1666 bra pled_depth5
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1667
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1668 pled_depth4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1669 movlw '0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1670 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1671
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1672 pled_depth5:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1673 call word_processor ; decimeters in medium font
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1674 bcf ignore_digit5
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1675 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1676 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1677
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1678 depth_greater_99_84mtr: ; Display only in full meters
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1679 btfss depth_greater_100m ; Is depth>100m already?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1680 call PLED_clear_depth ; No, clear depth area and set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1681 ; Depth is already in hi:lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1682 ; Show depth in Full meters
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1683 ; That means ignore figure 4 and 5
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1684 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1685 WIN_TOP .24
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1686 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1687 WIN_FONT FT_LARGE
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1688 WIN_INVERT .0 ; Init new Wordprocessor
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
1689 PLED_color_code warn_depth ; Color-code the output
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1690
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1691 bsf ignore_digit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1692 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1693 output_16
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1694 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1695 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1696 bcf ignore_digit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1697 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1698 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1699
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1700 depth_less_10mtr:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1701 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1702 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1703 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1704
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1705 PLED_clear_depth ; No, clear depth area and set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1706 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1707 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1708 movlw .24
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1709 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1710 movlw .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1711 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1712 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1713 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1714 movlw .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1715 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1716 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1717 bsf depth_greater_100m ; Set Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1718 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1719
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1720
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1721 PLED_desaturation_time:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1722 ostc_debug 'h'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1723 WIN_TOP .150
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1724 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1725 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1726 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1727 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1728
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1729 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1730 OUTPUTTEXT d'14' ; Desat
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1731 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1732 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1733 movff int_O_desaturation_time+0,lo ; divide by 60...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1734 movff int_O_desaturation_time+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1735 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1736 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1737 movf lo,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1738 movff hi,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1739 movwf hi ; exchange lo and hi...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1740 output_8 ; Hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1741 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1742 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1743 movff hi,lo ; Minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1744 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1745 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1746 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1747 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1748
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1749 PLED_nofly_time:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1750 ostc_debug 'g'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1751 WIN_TOP .125
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1752 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1753 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1754 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1755 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1756
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1757 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1758 OUTPUTTEXT d'35' ; NoFly
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1759 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1760 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1761 movff nofly_time+0,lo ; divide by 60...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1762 movff nofly_time+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1763 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1764 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1765 movf lo,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1766 movff hi,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1767 movwf hi ; exchange lo and hi...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1768 output_8 ; Hours
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1769 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1770 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1771 movff hi,lo ; Minutes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1772 decf lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1773 btfsc lo,7 ; keep Nofly time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1774 clrf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1775 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1776 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1777 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1778 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1779
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1780
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1781 update_surf_press:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1782 btfsc premenu ; Do not update when "Menu?" is displayed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1783 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1784
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1785 ostc_debug 'b' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1786 WIN_TOP .25
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1787 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1788 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1789 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1790 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1791
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1792 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1793 movff amb_pressure+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1794 movff amb_pressure+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1795 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1796 output_16
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1797 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1798 movlw 'm'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1799 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1800 movlw 'b'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1801 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1802 movlw 'a'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1803 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1804 movlw 'r'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1805 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1806 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1807 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1808 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1809 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1810
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1811 update_batt_voltage_divemode:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1812
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1813 update_batt_voltage:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1814 ostc_debug 'f'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1815
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1816 GETCUSTOM8 d'31' ; =1 if battery voltage should be visible
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1817 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1818 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1819 cpfseq lo ; =1?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1820 bra update_batt_voltage2 ; No, show symbol
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1821
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1822 WIN_TOP .175
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1823 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1824 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1825 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1826 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
1827
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1828 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1829 movff batt_voltage+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1830 movff batt_voltage+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1831 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1832 movwf ignore_digits
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1833 bsf ignore_digit5 ; do not display mV
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1834 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1835 output_16dp d'2' ; e.g. 3.45V
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1836 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1837 movlw 'V'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1838 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1839 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1840 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1841 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1842 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1843
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1844 update_batt_voltage2:
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
1845 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1846 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1847 movlw .174
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1848 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1849 movlw .194
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1850 movff WREG,box_temp+2 ; row bottom (0-239)
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1851 movlw .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1852 movff WREG,box_temp+3 ; column left (0-159)
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1853 movlw .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1854 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1855 call PLED_frame
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1856
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1857 ; 4100-Vbatt
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1858 movlw LOW d'4100'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1859 movwf sub_a+0
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1860 movlw HIGH d'4100'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1861 movwf sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1862 movff batt_voltage+0,sub_b+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1863 movff batt_voltage+1,sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1864 call sub16 ; sub_c = sub_a - sub_b
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1865 ; Battery full (>4100mV?
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1866 btfsc neg_flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1867 bra update_batt_voltage2_full
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1868
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1869 ; Vbatt-3500
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1870 movlw LOW d'3500'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1871 movwf sub_b+0
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1872 movlw HIGH d'3500'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1873 movwf sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1874 movff batt_voltage+0,sub_a+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1875 movff batt_voltage+1,sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1876 call sub16 ; sub_c = sub_a - sub_b
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1877 ; Battery lower then 3500mV?
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1878 btfsc neg_flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1879 bra update_batt_voltage2_empty
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1880
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1881 ; Battery is between 3500 and 4100mV
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1882 ; sub_c:2 is between 0 and 600
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1883 movff sub_c+0,xA+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1884 movff sub_c+1,xA+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1885 movlw d'20'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1886 movwf xB+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1887 clrf xB+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1888 call div16x16 ;xA/xB=xC with xA as remainder
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1889 ; xC is between 0 and 30
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1890 movff xC+0,wait_temp ;save value
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1891 incf wait_temp,F ; +1
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1892
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1893 movlw d'3'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1894 cpfsgt wait_temp
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1895 movwf wait_temp ; Minimum = 3
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1896
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1897 update_batt_voltage2a:
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
1898 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1899 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1900 movlw .181
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1901 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1902 movlw .187
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1903 movff WREG,box_temp+2 ; row bottom (0-239)
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1904 movlw .32
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1905 movff WREG,box_temp+3 ; column left (0-159)
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1906 movlw .34
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1907 movff WREG,box_temp+4 ; column right (0-159)
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1908 call PLED_box ; Full Cap
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1909
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1910 ; GETCUSTOM8 d'35' ; Standard output color
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1911 ; movff WREG,box_temp+0 ; Data
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1912 ; movlw .181
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1913 ; movff WREG,box_temp+1 ; row top (0-239)
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1914 ; movlw .187
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1915 ; movff WREG,box_temp+2 ; row bottom (0-239)
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1916 ; movlw .31
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1917 ; movff WREG,box_temp+3 ; column left (0-159)
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1918 ; movlw .33
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1919 ; movff WREG,box_temp+4 ; column right (0-159)
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1920 ; call PLED_frame ; Empty cap
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1921 ;
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1922 update_batt_voltage3:
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1923 GETCUSTOM8 d'34' ; Color battery
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1924 movff WREG,box_temp+0 ; Color Data
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1925 movlw .176
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1926 movff WREG,box_temp+1 ; row top (0-239)
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1927 movlw .192
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1928 movff WREG,box_temp+2 ; row bottom (0-239)
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
1929 movlw .2
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1930 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1931 movff wait_temp,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1932 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1933
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1934 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1935 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1936
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1937 update_batt_voltage2_empty:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1938 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1939 movwf wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1940 bra update_batt_voltage2a
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1941
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1942 update_batt_voltage2_full:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1943 movlw d'30'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1944 movwf wait_temp
25
99512945c7a1 1.61 beta rc2
heinrichsweikamp
parents: 21
diff changeset
1945 bra update_batt_voltage2a
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1946
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1947 PLED_convert_date: ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1948 read_int_eeprom d'91' ; Read date format (0=MMDDYY, 1=DDMMYY, 2=YYMMDD)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1949 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1950 bra PLED_convert_date1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1951
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1952 ; Use MMDDYY
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1953 movff convert_value_temp+0,lo ;month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1954 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1955 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1956 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1957 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1958 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1959 movff convert_value_temp+1,lo ;day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1960 bra PLED_convert_date1_common ;year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1961
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1962 PLED_convert_date1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1963 read_int_eeprom d'91' ; Read date format (0=MMDDYY, 1=DDMMYY, 2=YYMMDD)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1964 decfsz EEDATA,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1965 bra PLED_convert_date2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1966
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1967 ; Use DDMMYY
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1968 movff convert_value_temp+1,lo ;day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1969 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1970 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1971 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1972 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1973 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1974 movff convert_value_temp+0,lo ;month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1975
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1976 PLED_convert_date1_common:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1977 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1978 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1979 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1980 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1981 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1982 movff convert_value_temp+2,lo ;year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1983 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1984 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1985 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1986
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1987 PLED_convert_date2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1988 ; Use YYMMDD
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1989 movff convert_value_temp+2,lo ;year
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1990 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1991 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1992 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1993 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1994 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1995 movff convert_value_temp+0,lo ;month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1996 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1997 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1998 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1999 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2000 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2001 movff convert_value_temp+1,lo ;day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2002 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2003 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2004 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2005
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2006 PLED_convert_date_short: ; converts into "DD/MM" or "MM/DD" or "MM/DD" in postinc2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2007 read_int_eeprom d'91' ; Read date format (0=MMDDYY, 1=DDMMYY, 2=YYMMDD)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2008 tstfsz EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2009 bra PLED_convert_date_short1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2010
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2011 ; Use MMDDYY
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2012 PLED_convert_date_short_common:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2013 movff convert_value_temp+0,lo ;month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2014 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2015 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2016 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2017 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2018 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2019 movff convert_value_temp+1,lo ;day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2020 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2021 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2022 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2023 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2024
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2025 PLED_convert_date_short1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2026 read_int_eeprom d'91' ; Read date format (0=MMDDYY, 1=DDMMYY, 2=YYMMDD)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2027 decfsz EEDATA,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2028 bra PLED_convert_date_short_common ; Use YYMMDD
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2029
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2030 ; Use DDMMYY
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2031 movff convert_value_temp+1,lo ;day
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2032 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2033 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2034 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2035 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2036 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2037 movff convert_value_temp+0,lo ;month
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2038 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2039 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2040 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2041 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2042
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2043 update_date:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2044 ostc_debug 'd'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2045 WIN_TOP .75
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
2046 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2047 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2048 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2049 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2050
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2051 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2052
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2053 movff month,convert_value_temp+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2054 movff day,convert_value_temp+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2055 movff year,convert_value_temp+2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2056 call PLED_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2057 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2058 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2059
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2060 PLED_menu_clear:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2061 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2062 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2063 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2064 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2065 movlw .26
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2066 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2067 movlw .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2068 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2069 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2070 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2071 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2072 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2073
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2074 PLED_max_pressure:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2075 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2076 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2077
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2078 ostc_debug 'p' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2079
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2080 WIN_TOP .184
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2081 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2082 WIN_FONT FT_MEDIUM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2083 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2084 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2085
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2086 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2087 movff max_pressure+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2088 movff max_pressure+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2089 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2090 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2091 bsf ignore_digit5 ; do not display 1cm depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2092 output_16dp d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2093 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2094 bcf show_last3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2095 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2096 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2097 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2098
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2099 PLED_divemins:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2100 btfsc menubit ; Divemode menu active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2101 return ; Yes, do not update divetime
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2102
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2103 ostc_debug 'A' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2104
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2105 btfsc gauge_mode ; different display in gauge mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2106 bra PLED_divemins_gauge
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2107
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2108 btfsc FLAG_apnoe_mode ; different display in apnoe mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2109 bra PLED_divemins_apnoe
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2110
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2111 GETCUSTOM8 d'38' ; Show seconds (=1?)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2112 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2113 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2114 cpfseq lo ; =1?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2115 bra PLED_divemins2 ; No, minutes only
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2116 bra PLED_divemins_gauge ; Yes, use Gauge routine
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2117
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2118 PLED_divemins2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2119 movff divemins+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2120 movff divemins+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2121 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2122 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2123 output_16_3 ; displays only last three figures from a 16Bit value (0-999)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2124 WIN_TOP .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2125 WIN_LEFT .120
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2126 WIN_FONT FT_MEDIUM
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2127 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2128
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2129 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2130 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2131 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2132
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2133 PLED_display_apnoe_surface:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2134 btfsc menubit ; Divemode menu active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2135 return ; Yes, do not display surface mode timeout
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2136
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2137 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2138 DISPLAYTEXT d'140' ; "SURFACE"
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2139 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2140
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2141
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2142 WIN_TOP .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2143 WIN_LEFT .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2144 WIN_FONT FT_MEDIUM
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2145 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2146
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2147
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2148 movff apnoe_surface_mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2149 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2150 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2151 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2152 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2153 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2154 movff apnoe_surface_secs,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2155 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2156 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2157 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2158 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2160 PLED_apnoe_clear_surface:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2161 ; Clear Surface timer....
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2162 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2163 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2164 movlw .60
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2165 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2166 movlw .119
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2167 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2168 movlw .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2169 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2170 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2171 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2172 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2173 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2174
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2175
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2176 PLED_display_apnoe_descent:
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2177 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2178 DISPLAYTEXT d'139' ; "Descent"
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2179 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2180
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2181
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2182 WIN_TOP .145
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2183 WIN_LEFT .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2184 WIN_FONT FT_MEDIUM
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2185 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2186
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2187
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2188 movff apnoe_mins,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2189 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2190 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2191 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2192 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2193 movff apnoe_secs,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2194 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2195 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2196 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2197 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2198
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2199 PLED_divemins_apnoe:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2200
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2201 PLED_divemins_gauge:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2202 movff divemins+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2203 movff divemins+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2204 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2205 bsf show_last3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2206 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2207 output_16_3 ;Displays only 0...999
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2208 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2209 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2210 movff divesecs,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2211 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2212 WIN_TOP .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2213 WIN_LEFT .90
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2214 WIN_FONT FT_MEDIUM
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2215 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2216
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2217 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2218 bcf show_last3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2219 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2220 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2221
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2222 PLED_stopwatch_remove:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2223 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2224 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2225 movlw .54
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2226 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2227 movlw .102
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2228 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2229 movlw .062
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2230 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2231 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2232 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2233 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2234 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2235
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2236
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2237 PLED_stopwatch_show:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2238 btfsc menubit ; Divemode menu active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2239 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2240
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2241 ostc_debug 'V' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2242 ; Stopwatch
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2243
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2244 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2245 DISPLAYTEXTH d'283' ; Counter
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2246 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2247
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2248
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2249 WIN_TOP .80
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2250 WIN_LEFT .110
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2251 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2252 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2253
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2254
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2255
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2256
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2257 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2258 movff average_divesecs+0,lo ; Stopwatch
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2259 movff average_divesecs+1,hi ; Stopwatch
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2260 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2261 subwf lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2262 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2263 subwfb hi,F ; Subtract 2 seconds
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2264
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2265 call convert_time ; converts hi:lo in seconds to mins (hi) and secs (lo)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2266
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2267 movff lo,wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2268 movff hi,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2269 clrf hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2270
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2271 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2272 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2273 bsf show_last3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2274 output_16_3 ;Displays only 0...999
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2275 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2276 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2277 movff wait_temp,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2278 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2279 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2280 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2281
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2282 ostc_debug 'U' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2283
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2284 WIN_TOP .80
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2285 WIN_LEFT .62
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2286 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2287 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2288
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2289
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2290 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2291 movff avr_rel_pressure+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2292 movff avr_rel_pressure+1,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2293 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2294 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2295 bsf ignore_digit5 ; do not display 1cm depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2296 output_16dp d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2297 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2298 movlw 'm'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2299 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2300 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2301 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2302 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2303 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2304
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2305
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2306 PLED_serial: ; Writes OSTC #Serial and Firmware version in surfacemode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2307 ostc_debug 'a' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2308 WIN_TOP .0
56
0338aac9a267 surfacemode
heinrichsweikamp
parents: 47
diff changeset
2309 WIN_LEFT .1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2310 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2311 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2312 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2313
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2314
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2315 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2316 OUTPUTTEXTH d'262' ; "OSTC "
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2317 clrf EEADRH
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2318 clrf EEADR ; Get Serial number LOW
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2319 call read_eeprom ; read byte
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2320 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2321 incf EEADR,F ; Get Serial number HIGH
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2322 call read_eeprom ; read byte
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2323 movff EEDATA,hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2324
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2325 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2326 output_16
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2327 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2328 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2329 movlw 'V'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2330 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2331 movlw softwareversion_x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2332 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2333 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2334 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2335 movlw '.'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2336 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2337 movlw softwareversion_y
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2338 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2339 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2340 output_99x
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2341 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2342 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2343 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2344
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2345 PLED_divemode_menu_mask_first: ; Write Divemode menu1 mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2346 ostc_debug 'o' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2347 call PLED_menu_clear ; clear "Menu?"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2348 DISPLAYTEXT .31 ;"Show Deco"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2349
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2350 btfsc FLAG_const_ppO2_mode ; are we in ppO2 mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2351 bra PLED_divemode_menu_mask_first2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2352 ; in OC Mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2353 DISPLAYTEXT .32 ;"Gaslist"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2354 DISPLAYTEXT .122 ; "Set Gas"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2355 bra PLED_divemode_menu_mask_first3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2356
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2357 PLED_divemode_menu_mask_first2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2358 ; in CC Mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2359 DISPLAYTEXT .238 ; "SetPoint"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2360 DISPLAYTEXT .137 ; "Bailout"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2361
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2362 PLED_divemode_menu_mask_first3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2363 ; In all modes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2364 DISPLAYTEXT .33 ;"More"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2365 DISPLAYTEXT .34 ;"Exit"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2366 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2367
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2368 PLED_divemode_menu_mask_second: ; Write Divemode menu1 mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2369 ostc_debug 'o' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2370 DISPLAYTEXT .240 ;"Graphs"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2371 DISPLAYTEXT .241 ;"Display"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2372 DISPLAYTEXTH .281 ;"L. Tissue"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2373 DISPLAYTEXT .147 ;"Stopwat."
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2374 DISPLAYTEXT .244 ;"Exit"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2375 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2376
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2377 PLED_divemode_set_xgas: ; Displayes the "Set Gas" menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2378 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2379 WIN_TOP .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2380 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2381 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2382
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2383 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2384 movlw 'S'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2385 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2386 movlw 'e'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2387 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2388 movlw 'l'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2389 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2390 read_int_eeprom d'24' ; Get Gas6 %O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2391 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2392 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2393 output_99 ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2394 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2395 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2396 read_int_eeprom d'25' ; Get Gas6 %He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2397 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2398 output_99 ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2399 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2400 DISPLAYTEXT .123 ; O2 +
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2401 DISPLAYTEXT .124 ; O2 -
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2402 DISPLAYTEXT .125 ; He +
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2403 DISPLAYTEXT .126 ; He -
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2404 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2405
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2406 PLED_divemode_simulator_mask:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2407 DISPLAYTEXT .254 ; EXIT
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2408 DISPLAYTEXT .250 ; + 1m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2409 DISPLAYTEXT .251 ; - 1m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2410 DISPLAYTEXT .252 ; +10m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2411 DISPLAYTEXT .253 ; -10m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2412 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2413
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2414 PLED_decoplan_bargraph:
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2415 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2416 movff WREG,box_temp+0 ; Data
65
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2417 movff hi,win_top
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2418 incf win_top,F ; +1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2419 movff win_top,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2420 movff win_top,box_temp+2 ;
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2421 movlw d'18'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2422 addwf box_temp+2,F ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2423 movlw .122
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2424 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2425 addwf lo,F ; Add time offset
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2426 btfsc STATUS,C ; >255?
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2427 setf lo ; limit to 255
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2428 decf lo,F ; No, minus one
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2429 movlw d'138' ; Limit length (16min)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2430 cpfslt lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2431 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2432 movff lo,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2433 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2434
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2435 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2436 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2437 movff win_top,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2438 movff win_top,box_temp+2 ;
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2439 movlw d'18'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2440 addwf box_temp+2,F ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2441 movff lo,box_temp+3 ;
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2442 incf box_temp+3,F ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2443 movlw .139
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2444 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2445 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2446 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2447
70
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2448 PLED_decoplan_delete_gf: ; Delete unused rows
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2449 movlw .238
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2450 movff WREG,box_temp+2 ; row bottom (0-239)
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2451 bra PLED_decoplan_delete_common
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2452
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2453 PLED_decoplan_delete: ; Delete unused rows
70
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2454 movlw .184
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2455 movff WREG,box_temp+2 ; row bottom (0-239)
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2456 PLED_decoplan_delete_common:
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2457 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2458 movff WREG,box_temp+0 ; data 00, x0, 0y, xy clear, links, rechts, beide
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2459 movff hi,box_temp+1 ; row top (0-239)
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2460 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2461 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2462 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2463 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2464 call PLED_box
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2465 bsf last_ceiling_gf_shown ; Set flag
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2466 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2467
70
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2468
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2469 PLED_decoplan_gf_page_current:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2470 movlw d'0'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2471 cpfseq temp8
65
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2472 bra PLED_decoplan_gf_page2 ; =1: Dispplay Page 2
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2473 bra PLED_decoplan_gf_page1 ; =0, Display Page 1
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 65
diff changeset
2474
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2475 PLED_decoplan_gf_page1:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2476 ostc_debug 'n' ; Sends debug-information to screen if debugmode active
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2477
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2478 movff char_O_array_decodepth+0,lo ; Get Depth
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2479 tstfsz lo
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2480 bra PLED_decoplan_gf_page1x
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2481 ; No Deco, show "no Deco"
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2482 DISPLAYTEXT d'239' ;"No Deco"
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2483 return
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2484
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2485 PLED_decoplan_gf_page2:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2486 ; temp7 holds last displayed depth
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2487 ; temp5 list entry
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 65
diff changeset
2488 movff temp5,temp9 ; save
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 65
diff changeset
2489 movff temp7,temp10 ; save
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2490 movlw .231
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2491 movwf temp6 ; row
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2492 PLED_decoplan_gf_page2y:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2493 movlw d'3'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2494 addwf temp7,F ; Add 3m for next stop
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2495 movlw d'25'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2496 addwf temp6,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2497 incf temp5,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2498 call PLED_decoplan_show_stop_gf
65
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2499 movlw d'15' ; the next 8 Stops...
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2500 cpfseq temp5
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2501 bra PLED_decoplan_gf_page2y
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 65
diff changeset
2502 movff temp9,temp5 ; restore
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 65
diff changeset
2503 movff temp10,temp7 ; restore
65
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2504 bsf last_ceiling_gf_shown ; Set flag
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2505 return
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2506
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2507 PLED_decoplan_gf_page1x:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2508 clrf temp8 ; Page 0-3 of deco list
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2509 GETCUSTOM8 d'29' ; Last Deco in m
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2510 movwf temp7 ; Start with last stop
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2511 setf temp5
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2512 movlw .231
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2513 movwf temp6 ; row
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2514
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2515 ; Show last stop manually
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2516 movlw d'25'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2517 addwf temp6,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2518 incf temp5,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2519 call PLED_decoplan_show_stop_gf
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2520 GETCUSTOM8 d'29' ; Last Deco in m
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2521 movwf temp7 ; Last deco
65
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2522 movlw d'4'
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2523 cpfslt temp7 ; >=3m?
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2524 bra PLED_decoplan_gf_page1x_next_6m
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2525
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2526 movlw d'3'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2527 movwf temp7
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2528 bra PLED_decoplan_gf_page1y
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2529
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2530 PLED_decoplan_gf_page1x_next_6m:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2531 movlw d'6'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2532 movwf temp7
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 67
diff changeset
2533 incf temp5,F
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2534 PLED_decoplan_gf_page1y:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2535 movlw d'3'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2536 addwf temp7,F ; Add 3m for next stop
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2537 movlw d'25'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2538 addwf temp6,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2539 incf temp5,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2540 call PLED_decoplan_show_stop_gf
65
5ad68065e4e6 displays 16stops in gf mode
heinrichsweikamp
parents: 64
diff changeset
2541 movlw d'7' ; the next 7 Stops...
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2542 cpfseq temp5
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2543 bra PLED_decoplan_gf_page1y
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2544 return
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2545
67
heinrichsweikamp
parents: 66
diff changeset
2546
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2547 PLED_decoplan_show_stop_gf:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2548 bsf leftbind
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2549 WIN_LEFT .100
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2550 movff temp6,win_top
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2551 movff temp6,hi ; copy for PLED_decoplan_bargraph
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2552
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2553 movff char_O_array_decodepth+0,WREG ; Ceiling
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2554 cpfslt temp7 ; Ceiling already displayed?
70
8d8e753d72e3 1.72beta - small output fix in non-GF modes
heinrichsweikamp
parents: 69
diff changeset
2555 goto PLED_decoplan_delete_gf ; Yes, quit display and RETURN
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2556 movff temp7,lo ; Decodepth
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2557
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2558 lfsr FSR2,letter
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 65
diff changeset
2559 output_99x ; outputs into Postinc2!
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2560 movlw 'm'
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2561 movwf POSTINC2
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2562 call word_processor
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2563 WIN_LEFT .140
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2564 movff temp6,win_top
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 67
diff changeset
2565 ; lfsr FSR1,0x251
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 67
diff changeset
2566 lfsr FSR1,0x0E1 ; Gf_decolist_copy
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2567 movf temp5,W ; number of entry
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 67
diff changeset
2568 movff PLUSW1,lo ; Stop length
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 67
diff changeset
2569 incf lo,F ; add one dummy minute
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2570 lfsr FSR2,letter
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2571 output_99x ; outputs into Postinc2!
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2572 movlw d'39' ;"'"
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2573 movwf POSTINC2
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2574 call word_processor
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2575 tstfsz lo ; 0 min "Stop"?
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2576 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2577 return
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2578
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2579
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2580 PLED_decoplan: ; display the Decoplan
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2581 ostc_debug 'n' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2582
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2583 movff char_O_array_decodepth+0,lo ; Get Depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2584 tstfsz lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2585 bra PLED_decoplan1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2586 ; No Deco, show "no Deco"
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2587 ; call PLED_clear_divemode_menu ; Clear Deco area
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2588 DISPLAYTEXT d'239' ;"No Deco"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2589 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2590
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2591 PLED_decoplan1:
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2592 setf temp5
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2593 movlw .231
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2594 movwf temp6 ; row
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2595 PLED_decoplan2:
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2596 movlw d'25'
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2597 addwf temp6,F
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2598 incf temp5,F
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2599 call PLED_decoplan_show_stop
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2600 movlw d'5' ; 6 Stops...
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2601 cpfseq temp5
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2602 bra PLED_decoplan2
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2603 return
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2604
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2605 PLED_decoplan_show_stop:
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2606 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2607 WIN_LEFT .100
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2608 movff temp6,win_top
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2609 movff temp6,hi ; copy for PLED_decoplan_bargraph
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2610
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2611 lfsr FSR1,char_O_array_decodepth;+0
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2612 movf temp5,W ; number of entry
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2613 movff PLUSW1,lo
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2614 movf lo,w
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2615 btfsc STATUS,Z ; =0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2616 goto PLED_decoplan_delete ; Yes, quit display
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2617
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2618 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2619 output_8 ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2620 movlw 'm'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2621 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2622 call word_processor
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2623
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2624 WIN_LEFT .140
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2625 movff temp6,win_top
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2626
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2627 lfsr FSR1,char_O_array_decotime;+0
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2628 movf temp5,W ; number of entry
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2629 movff PLUSW1,lo
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2630
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2631 lfsr FSR2,letter
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2632 output_99x ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2633 movlw d'39' ;"'"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2634 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2635 call word_processor
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2636 tstfsz lo ; 0 min "Stop"?
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2637 rcall PLED_decoplan_bargraph ; draws a box representing the decotime (stored in lo...) for this depth
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2638 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2639
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
2640
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2641 PLED_gas_list:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2642 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2643
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2644 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2645 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2646 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2647
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2648 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2649 movwf wait_temp ; here: stores eeprom address for gas list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2650 movlw d'231'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2651 movwf waitms_temp ; here: stores row for gas list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2652 clrf hi ; here: Gas counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2653
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2654 PLED_gas_list_loop:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2655 incf hi,F ; Increase Gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2656 movlw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2657 addwf wait_temp,F ; Increase eeprom address for gas list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2658 movlw d'25'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2659 addwf waitms_temp,F ; Increase row
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2660 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2661 movff waitms_temp,win_top ; Set Row
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2662
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2663 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2664 movlw 'G'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2665 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2666 movff hi,lo ; copy gas number
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2667 output_8 ; display gas number
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2668 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2669 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2670 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2671 call read_eeprom ; get byte (stored in EEDATA)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2672 movff EEDATA,lo ; copy to lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2673 output_8 ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2674 movlw '/'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2675 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2676 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2677 call read_eeprom ; get byte (stored in EEDATA)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2678 movff EEDATA,lo ; copy to lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2679 output_8 ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2680
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2681
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2682 read_int_eeprom d'27' ; read flag register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2683 movff hi,lo ; copy gas number
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2684 PLED_gas_list_loop1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2685 rrcf EEDATA ; roll flags into carry
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2686 decfsz lo,F ; max. 5 times...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2687 bra PLED_gas_list_loop1
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2688
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2689 movlw color_grey
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2690 btfss STATUS,C ; test carry
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2691 call PLED_set_color ; grey out inactive gases!
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2692
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2693 call word_processor
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2694 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2695
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2696 movlw d'5' ; list all five gases
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2697 cpfseq hi ; All gases shown?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2698 bra PLED_gas_list_loop ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2699
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2700 return ; No, return (OC mode)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2701
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2702 PLED_splist_start:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2703 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2704 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2705 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2706
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2707 ; list three SP in Gaslist
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2708 movlw d'35' ; 36 = current SP position in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2709 movwf wait_temp ; here: stores eeprom address for gas list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2710 movlw d'231'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2711 movwf waitms_temp ; here: stores row for gas list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2712 clrf temp5 ; here: SP counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2713
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2714 PLED_splist_loop:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2715 incf wait_temp,F ; EEPROM address
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2716 incf temp5,F ; Increase SP
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2717
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2718 movlw d'25'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2719 addwf waitms_temp,F ; Increase row
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2720 movff waitms_temp,win_top ; Set Row
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2721 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2722
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2723 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2724 movlw 'S'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2725 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2726 movlw 'P'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2727 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2728 movff temp5,lo ; copy gas number
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2729 output_8 ; display gas number
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2730 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2731 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2732 movff wait_temp, EEADR; SP #hi position
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2733 call read_eeprom ; get byte (stored in EEDATA)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2734 movff EEDATA,lo ; copy to lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2735 clrf hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2736 output_16dp d'3' ; outputs into Postinc2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2737 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2738
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2739 movlw d'3' ; list all three SP
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2740 cpfseq temp5 ; All gases shown?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2741 bra PLED_splist_loop ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2742
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2743 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2744 return ; no, return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2745
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2746 PLED_clear_divemode_menu:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2747 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2748 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2749 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2750 movff WREG,box_temp+1 ; row top (0-239)
30
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2751 ; movlw .125
943dc3336f48 1.62 in work...
heinrichsweikamp
parents: 29
diff changeset
2752 movlw .185
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2753 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2754 movlw .082
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2755 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2756 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2757 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2758 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2759 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2760
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2761 PLED_divemenu_cursor:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2762 ostc_debug 'l' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2763 WIN_TOP .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2764 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2765 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2766 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2767 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2768 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2769 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2770 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2771 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2772 WIN_TOP .25
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2773 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2774 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2775 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2776 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2777 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2778 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2779 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2780 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2781 WIN_TOP .50
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2782 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2783 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2784 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2785 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2786 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2787 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2788 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2789 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2790 WIN_TOP .75
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2791 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2792 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2793 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2794 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2795 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2796 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2797 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2798 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2799 WIN_TOP .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2800 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2801 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2802 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2803 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2804 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2805 movlw 0xB8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2806 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2807 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2808
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2809 movff menupos,temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2810 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2811 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2812 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2813 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2814 movlw d'25'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2815 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2816 movlw d'50'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2817 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2818 movlw d'75'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2819 dcfsnz temp1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2820 movlw d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2821 movff WREG,win_top
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2822 WIN_LEFT .85
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2823 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2824 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2825 call PLED_standard_color
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2826
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2827 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2828 movlw 0xB7 ; Arrow for menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2829 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2830 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2831 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2832
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
2833 ;PLED_profileview_menu:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
2834 ; DISPLAYTEXT .127 ;"Exit"
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
2835 ; DISPLAYTEXT .128 ;"Delete"
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
2836 ;; DISPLAYTEXT .132 ;"Format"
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
2837 ; return
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2838
37
016a2412d164 1.62beta
heinrichsweikamp
parents: 34
diff changeset
2839 custom_warn_surfmode: ; With CF in temp1
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2840 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2841 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2842 movlw .56
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2843 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2844 movlw .88
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2845 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2846 movlw .69
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2847 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2848 movlw .115
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2849 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2850 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2851
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2852 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2853 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2854 movlw .58
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2855 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2856 movlw .86
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2857 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2858 movlw .70
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2859 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2860 movlw .114
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2861 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2862 call PLED_frame
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2863 ; warning text
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2864
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2865 WIN_TOP .60
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2866 WIN_LEFT .71
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2867 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2868 WIN_INVERT .1 ; Init new Wordprocessor
37
016a2412d164 1.62beta
heinrichsweikamp
parents: 34
diff changeset
2869 call PLED_warnings_color ; Set Color for Warning
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2870 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2871 movlw 'C'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2872 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2873 movlw 'F'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2874 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2875 movff temp1,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2876 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2877 movlw '!'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2878 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2879 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2880
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2881 WIN_INVERT .0 ; Init new Wordprocessor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2882 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2883 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2884
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2885 PLED_saturation_graph_divemode:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2886 ostc_debug 'h' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2887 PLED_tissue_saturation_graph:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2888 ostc_debug 'i' ; Sends debug-information to screen if debugmode active
13
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2889
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2890 ; Clear graph area...
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2891 movlw .0
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2892 movff WREG,box_temp+0 ; Data
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2893 movlw .25
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2894 movff WREG,box_temp+1 ; row top (0-239)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2895 movlw .120
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2896 movff WREG,box_temp+2 ; row bottom (0-239)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2897 movlw .82
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2898 movff WREG,box_temp+3 ; column left (0-159)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2899 movlw .159
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2900 movff WREG,box_temp+4 ; column right (0-159)
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2901 call PLED_box
3b30cd739782 1.53 beta rc2
heinrichsweikamp
parents: 12
diff changeset
2902
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2903 ; Draw Frame
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2904 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2905 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2906 movlw .25
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2907 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2908 movlw .120
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2909 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2910 movlw .82
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2911 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2912 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2913 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2914 call PLED_frame
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2915
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2916 ; Draw N2 Tissues
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2917 lfsr FSR2, char_O_tissue_saturation+.000 ; N2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2918 movlw d'16'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2919 movwf wait_temp ; 16 tissues
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2920 clrf waitms_temp ; Row offset
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2921 PLED_tissue_saturation_graph3:
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2922 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2923 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2924 movlw .28
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2925 addwf waitms_temp,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2926 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2927 movlw .28
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2928 addwf waitms_temp,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2929 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2930
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2931 incf waitms_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2932 incf waitms_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2933
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2934 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2935 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2936
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2937 movff POSTINC2,box_temp+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2938 bcf STATUS,C
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2939 rrcf box_temp+4,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2940 bcf STATUS,C
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2941 rrcf box_temp+4,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2942 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2943 addwf box_temp+4,F ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2944
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2945 movlw d'157' ; limit display
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2946 cpfslt box_temp+4 ; skip if 157 (WREG) < box_temp+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2947 movwf box_temp+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2948
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2949 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2950
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2951 decfsz wait_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2952 bra PLED_tissue_saturation_graph3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2953
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2954 ; Draw He Tissues
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2955 lfsr FSR2, char_O_tissue_saturation+.016 ; He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2956 movlw d'16'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2957 movwf wait_temp ; 16 tissues
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2958 clrf waitms_temp ; Row offset
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2959 PLED_tissue_saturation_graph2:
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
2960 GETCUSTOM8 d'35' ; Standard output color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2961 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2962 movlw .86
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2963 addwf waitms_temp,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2964 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2965 movlw .86
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2966 addwf waitms_temp,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2967 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2968
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2969 incf waitms_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2970 incf waitms_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2971
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2972 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2973 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2974
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2975 movff POSTINC2,box_temp+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2976 bcf STATUS,C
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2977 rrcf box_temp+4,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2978 bcf STATUS,C
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2979 rrcf box_temp+4,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2980 movlw .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2981 addwf box_temp+4,F ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2982
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2983 movlw d'157' ; limit display
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2984 cpfslt box_temp+4 ; skip if 157 (WREG) < box_temp+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2985 movwf box_temp+4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2986
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2987 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2988
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2989 decfsz wait_temp,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2990 bra PLED_tissue_saturation_graph2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2991
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
2992 ; Draw Text
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2993 WIN_LEFT .84
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2994 WIN_TOP .32
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
2995 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2996 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2997 movlw 'N'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2998 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2999 movlw '2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3000 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3001 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3002 WIN_LEFT .84
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3003 WIN_TOP .90
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
3004 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3005 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3006 movlw 'H'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3007 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3008 movlw 'e'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3009 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3010 call word_processor
19
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3011
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3012 movff char_O_gtissue_no,wait_temp ; used as temp
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3013
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3014 lfsr FSR2,letter
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3015 lfsr FSR1,char_O_tissue_saturation+0
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3016 incf wait_temp,F ; make 1-16 of 0-15
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3017 PLED_tissue_saturation_graph4: ; point to leading tissue...
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3018 movff POSTINC1,lo ; copy/overwrite to lo register
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3019 decfsz wait_temp,F ; count until zero
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3020 bra PLED_tissue_saturation_graph4 ;loop
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3021 output_8
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3022 movlw '%'
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3023 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3024 movlw ' '
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3025 movwf POSTINC2
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3026 WIN_LEFT .84
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3027 WIN_TOP .62
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3028 WIN_FONT FT_SMALL
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3029 call PLED_standard_color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3030 call word_processor
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3031 bcf leftbind
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3032
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3033 ; Draw Scale
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3034 GETCUSTOM8 d'35' ; Standard output color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3035 movff WREG,box_temp+0 ; Data
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3036 movlw .73
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3037 movff WREG,box_temp+1 ; row top (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3038 movlw .74
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3039 movff WREG,box_temp+2 ; row bottom (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3040 movlw .121
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3041 movff WREG,box_temp+3 ; column left (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3042 movlw .157
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3043 movff WREG,box_temp+4 ; column right (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3044 call PLED_frame
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3045
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3046 GETCUSTOM8 d'35' ; Standard output color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3047 movff WREG,box_temp+0 ; Data
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3048 movlw .61
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3049 movff WREG,box_temp+1 ; row top (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3050 movlw .84
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3051 movff WREG,box_temp+2 ; row bottom (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3052 movlw .121
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3053 movff WREG,box_temp+3 ; column left (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3054 movlw .122
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3055 movff WREG,box_temp+4 ; column right (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3056 call PLED_box
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3057 GETCUSTOM8 d'35' ; Standard output color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3058 movff WREG,box_temp+0 ; Data
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3059 movlw .65
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3060 movff WREG,box_temp+1 ; row top (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3061 movlw .80
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3062 movff WREG,box_temp+2 ; row bottom (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3063 movlw .121+.9
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3064 movff WREG,box_temp+3 ; column left (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3065 movlw .122+.9
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3066 movff WREG,box_temp+4 ; column right (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3067 call PLED_box
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3068 GETCUSTOM8 d'35' ; Standard output color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3069 movff WREG,box_temp+0 ; Data
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3070 movlw .65
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3071 movff WREG,box_temp+1 ; row top (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3072 movlw .80
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3073 movff WREG,box_temp+2 ; row bottom (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3074 movlw .121+.18
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3075 movff WREG,box_temp+3 ; column left (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3076 movlw .122+.18
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3077 movff WREG,box_temp+4 ; column right (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3078 call PLED_box
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3079 GETCUSTOM8 d'35' ; Standard output color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3080 movff WREG,box_temp+0 ; Data
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3081 movlw .65
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3082 movff WREG,box_temp+1 ; row top (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3083 movlw .80
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3084 movff WREG,box_temp+2 ; row bottom (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3085 movlw .121+.27
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3086 movff WREG,box_temp+3 ; column left (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3087 movlw .122+.27
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3088 movff WREG,box_temp+4 ; column right (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3089 call PLED_box
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3090 GETCUSTOM8 d'35' ; Standard output color
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3091 movff WREG,box_temp+0 ; Data
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3092 movlw .61
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3093 movff WREG,box_temp+1 ; row top (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3094 movlw .84
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3095 movff WREG,box_temp+2 ; row bottom (0-239)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3096 movlw .121+.36
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3097 movff WREG,box_temp+3 ; column left (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3098 movlw .122+.36
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3099 movff WREG,box_temp+4 ; column right (0-159)
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3100 call PLED_box
07e7ca48b49d 1.56 rc1
heinrichsweikamp
parents: 17
diff changeset
3101
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3102 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3103
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3104
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3105 PLED_startupscreen1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3106 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3107 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3108 DISPLAYTEXT d'3' ; "HeinrichsWeikamp"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3109 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3110 DISPLAYTEXT .68 ; Licence 1/2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3111 DISPLAYTEXT .69
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3112 DISPLAYTEXT .70
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3113 DISPLAYTEXT .71
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3114 DISPLAYTEXT .72
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3115 DISPLAYTEXT .73
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3116 DISPLAYTEXT .74
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3117 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3118
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3119 PLED_startupscreen2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3120 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3121 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3122 DISPLAYTEXT d'3' ; "HeinrichsWeikamp"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3123 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3124 DISPLAYTEXT .75 ; Licence 2/2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3125 DISPLAYTEXT .76
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3126 DISPLAYTEXT .77
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3127 DISPLAYTEXT .78
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3128 DISPLAYTEXT .79
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3129 DISPLAYTEXT .80
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3130 DISPLAYTEXT .81
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3131 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3132
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3133 PLED_new_cf_warning:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3134 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3135 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3136 DISPLAYTEXTH .271 ; New CF added!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3137 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3138 DISPLAYTEXTH .272 ; New CustomFunctions
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3139 DISPLAYTEXTH .273 ; were added! Check
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3140 DISPLAYTEXTH .274 ; CF I and CF II Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3141 DISPLAYTEXTH .275 ; for Details!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3142 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3143
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3144 PLED_const_ppO2_value:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3145 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3146 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3147
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3148 ostc_debug 'j' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3149
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3150 WIN_TOP .168
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3151 WIN_LEFT .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3152 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3153 WIN_INVERT .0 ; Init new Wordprocessor
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3154
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3155 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3156 movff char_I_const_ppO2,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3157
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3158 tstfsz lo ; In Bailout mode (char_I_const_ppO2=0)?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3159 bra PLED_const_ppO2_value2 ; No, display Setpoint
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3160
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3161 ; Yes, Display "Bail"
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
3162 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3163 OUTPUTTEXTH d'263' ;"Bail"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3164 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3165 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3166
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3167 PLED_const_ppO2_value2: ; Display SetPoint
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3168 ;Show fixed SP value
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3169 movff amb_pressure+0,xA+0
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3170 movff amb_pressure+1,xA+1
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3171 movlw d'10'
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3172 movwf xB+0
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3173 clrf xB+1
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3174 ;xA/xB=xC with xA as remainder
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3175 call div16x16 ; xC+0=p_amb/10
26
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3176
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3177 ; char_I_const_ppO2 > p_amb/10 -> Not physically possible! -> Display actual value!
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3178 tstfsz xC+1 ; xC>255
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3179 setf xC+0 ; Yes, set xC+0 to 2,55bar ppO2
26
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3180
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3181 movff ppO2_setpoint_store,WREG
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3182 cpfslt xC+0 ; Setpoint value possible?
26
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3183 bra PLED_const_ppO2_value1 ; Yes
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3184
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3185 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3186 bra PLED_const_ppO2_value1a
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3187
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3188 PLED_const_ppO2_value1:
26
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3189 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value!
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3190 movff amb_pressure+0,xA+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3191 movff amb_pressure+1,xA+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3192 movlw d'10'
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3193 movwf xB+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3194 clrf xB+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3195 call div16x16 ; xC=p_amb/10
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3196 movff xC+0,xA+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3197 movff xC+1,xA+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3198 movff char_I_O2_ratio,xB+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3199 clrf xB+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3200 call mult16x16 ; xC:2=char_I_O2_ratio * p_amb/10
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3201
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3202 movff xC+0,sub_b+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3203 movff xC+1,sub_b+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3204 movff ppO2_setpoint_store,WREG; Setpoint
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3205 mullw d'100' ; Setpoint*100
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3206 movff PRODL,sub_a+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3207 movff PRODH,sub_a+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3208 call sub16 ; sub_c = sub_a - sub_b
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3209
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3210 btfss neg_flag
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3211 bra PLED_const_ppO2_value11 ; Value in range
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3212
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3213 ; char_I_const_ppO2 < ppO2[Diluent] -> Not physically possible! -> Display actual value!
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3214
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3215 movff xC+0,xA+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3216 movff xC+1,xA+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3217 movlw d'100'
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3218 movwf xB+0
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3219 clrf xB+1
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3220 call div16x16 ;xA/xB=xC with xA as remainder
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3221
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3222 movff xC+0,char_I_const_ppO2 ; No, Overwrite with actual value
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3223 bra PLED_const_ppO2_value1a
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3224
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3225 PLED_const_ppO2_value11:
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3226
8d7af04e0f85 ppO2 limits in fixed setpoint ccr
heinrichsweikamp
parents: 25
diff changeset
3227 ; Setpoint in possible limits
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3228 movff ppO2_setpoint_store,char_I_const_ppO2 ; Restore Setpoint
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3229
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3230 PLED_const_ppO2_value1a:
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
3231 PLED_color_code warn_ppo2 ; Color-code output
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
3232 movff char_I_const_ppO2,lo
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3233 clrf hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3234 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3235 output_16dp d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3236 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3237 call word_processor
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
3238 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3239 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3240
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3241 PLED_show_leading_tissue:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3242 call deco_main_calc_desaturation_time ; calculate desaturation time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3243 movlb b'00000001' ; select ram bank 1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3244
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3245 DISPLAYTEXTH .282 ; L. Tissue:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3246 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3247 movlw '#'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3248 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3249 movff char_O_gtissue_no,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3250 movff char_O_gtissue_no,wait_temp ; used as temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3251 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3252 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3253 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3254 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3255 movlw '('
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3256 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3257
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3258 movlw d'16'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3259 cpfslt wait_temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3260 bra PLED_show_leading_tissue_he
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3261 movlw 'N'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3262 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3263 movlw '2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3264 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3265 bra PLED_show_leading_tissue2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3266 PLED_show_leading_tissue_he:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3267 movlw 'H'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3268 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3269 movlw 'e'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3270 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3271 PLED_show_leading_tissue2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3272 movlw ')'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3273 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3274 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3275 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3276 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3277 WIN_TOP .25
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3278 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
3279 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3280 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3281
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3282 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3283 lfsr FSR1,char_O_tissue_saturation+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3284 incf wait_temp,F ; make 1-16 of 0-15
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3285 PLED_show_leading_tissue3: ; point to leading tissue...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3286 movff POSTINC1,lo ; copy/overwrite to lo register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3287 decfsz wait_temp,F ; count until zero
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3288 bra PLED_show_leading_tissue3 ;loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3289 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3290 movlw '%'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3291 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3292 movlw ' '
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3293 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3294 WIN_LEFT .100
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3295 WIN_TOP .50
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3296 WIN_FONT FT_SMALL
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
3297 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3298 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3299 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3300 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3301
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3302 PLED_topline_box_clear: ; Writes an empty box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3303 movlw .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3304 bra PLED_topline_box2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3305 PLED_topline_box: ; Writes a filled box
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
3306 GETCUSTOM8 d'35'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3307 PLED_topline_box2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3308 movff WREG,box_temp+0 ; Data
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3309 movlw .000
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3310 movff WREG,box_temp+1 ; row top (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3311 movlw .026
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3312 movff WREG,box_temp+2 ; row bottom (0-239)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3313 movlw .000
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3314 movff WREG,box_temp+3 ; column left (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3315 movlw .159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3316 movff WREG,box_temp+4 ; column right (0-159)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3317 call PLED_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3318 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3319
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3320 PLED_display_cns:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3321 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3322 return ; Yes, No update and return!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3323
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3324 btfsc gauge_mode ; Do not display in gauge mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3325 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3326
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3327 btfsc FLAG_apnoe_mode ; Do not display in apnoe mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3328 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3329
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3330 btfsc pled_velocity_display ; Is velocity displayed?`
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3331 return ; Yes, do not overwrite until pled_velocity_clear was called
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3332
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3333 ostc_debug 'k' ; Sends debug-information to screen if debugmode active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3334
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3335 WIN_TOP .090
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3336 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3337 WIN_FONT FT_SMALL
27
29341afd2060 NEW: Depth, CNS, GF, ppO2 and Velocity are Color-coded
heinrichsweikamp
parents: 26
diff changeset
3338 PLED_color_code warn_cns ; Color-code CNS output
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3339
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3340 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3341 movlw 'C'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3342 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3343 movlw 'N'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3344 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3345 movlw 'S'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3346 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3347 movlw ':'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3348 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3349 movff char_O_CNS_fraction,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3350 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3351 output_8
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3352 bcf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3353 movlw '%'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3354 movwf POSTINC2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3355 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3356 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3357
43
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3358 PLED_display_cns_surface:
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3359 ; Check if CNS should be displayed
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3360 movff char_O_CNS_fraction,lo ; copy into bank1
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3361 GETCUSTOM8 d'15' ; cns_display_high_surfacemode
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3362 subwf lo,W
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3363 btfss STATUS,C
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3364 return ; Do not show...
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3365 ; Show CNS
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3366
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3367 ostc_debug 'W' ; Sends debug-information to screen if debugmode active
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3368
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3369 WIN_TOP .175
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3370 WIN_LEFT .45
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3371 WIN_FONT FT_SMALL
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3372 WIN_INVERT .0 ; Init new Wordprocessor
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3373 PLED_color_code warn_cns ; Color-code CNS output
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3374
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3375 lfsr FSR2,letter
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3376 movlw 'C'
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3377 movwf POSTINC2
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3378 movlw 'N'
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3379 movwf POSTINC2
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3380 movlw 'S'
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3381 movwf POSTINC2
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3382 movlw ':'
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3383 movwf POSTINC2
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3384 movff char_O_CNS_fraction,lo
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3385 bsf leftbind
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3386 output_8
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3387 bcf leftbind
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3388 movlw '%'
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3389 movwf POSTINC2
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3390 call word_processor
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3391 return
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3392
65d5b0c8da41 New CF48, changed CF15
heinrichsweikamp
parents: 37
diff changeset
3393
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3394 PLED_custom_text:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3395 read_int_eeprom d'64'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3396 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3397 cpfseq EEDATA ; Custom text active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3398 bra PLED_clear_custom_text ; No, Delete row
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3399 WIN_TOP .200
62
2972a06b0785 1.71 beta in work
heinrichsweikamp
parents: 56
diff changeset
3400 WIN_LEFT .0
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3401 WIN_FONT FT_SMALL
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3402 WIN_INVERT .0 ; Init new Wordprocessor
9
395230c28023 Added CF36: Divemask color
heinrichsweikamp
parents: 8
diff changeset
3403 call PLED_divemask_color ; Set Color for Divemode mask
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3404
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3405 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3406 movlw d'64'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3407 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3408 movlw d'24'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3409 movwf hi ; counter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3410
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3411 PLED_custom_text1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3412 incf lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3413 call PLED_get_custom_letter ; Get one letter for the custom text
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3414 movlw '}' ; End marker found?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3415 cpfseq EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3416 bra PLED_custom_text2 ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3417 bra PLED_custom_text3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3418 PLED_custom_text2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3419 movff EEDATA,POSTINC2 ; Copy into Postinc
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3420
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3421 decfsz hi,F ; Max. numbers?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3422 bra PLED_custom_text1 ; No, get next letters
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3423
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3424 PLED_custom_text3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3425 call word_processor
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
3426 call PLED_standard_color
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3427 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3428
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3429 PLED_get_custom_letter:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3430 movff lo,EEADR ; Address for next custom text letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3431 call read_eeprom ; Read letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3432 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3433
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3434 PLED_clear_custom_text:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3435 movlw d'24'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3436 movwf temp1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3437 WIN_TOP .200
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3438 WIN_LEFT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3439 call PLED_display_clear_common_y1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3440 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3441
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3442 PLED_simdata_screen: ;Display Pre-Dive Screen
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3443 ; List active gases/Setpoints
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3444 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3445 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3446
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3447 PLED_simdata_screen2:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3448 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3449
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3450 WIN_LEFT .0
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3451 WIN_FONT FT_SMALL
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3452 bsf leftbind
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3453
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3454 movlw d'2'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3455 movwf wait_temp ; here: stores eeprom address for gas list
34
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3456 movlw d'10'
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3457 movwf waitms_temp ; here: stores row for gas list
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3458 clrf hi ; here: Gas counter
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3459
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3460 PLED_simdata_screen2_loop:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3461 incf hi,F ; Increase Gas
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3462 movlw d'4'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3463 addwf wait_temp,F ; Increase eeprom address for gas list
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3464
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3465 lfsr FSR2,letter
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3466 movlw 'G'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3467 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3468 movff hi,lo ; copy gas number
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3469 output_8 ; display gas number
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3470 movlw ':'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3471 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3472 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3473 call read_eeprom ; get byte (stored in EEDATA)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3474 movff EEDATA,lo ; copy to lo
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3475 output_8 ; outputs into Postinc2!
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3476 movlw '/'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3477 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3478 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3479 call read_eeprom ; get byte (stored in EEDATA)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3480 movff EEDATA,lo ; copy to lo
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3481 output_8 ; outputs into Postinc2!
34
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3482 movlw ' '
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3483 movwf POSTINC2
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3484 movf hi,W ; Gas number
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3485 addlw d'27' ; -> Adress of change depth register
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3486 call read_int_eeprom_1
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3487 movff EEDATA,lo ; Change depth in m
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3488 output_99 ; outputs into Postinc2!
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3489 movlw 'm'
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3490 movwf POSTINC2
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3491 read_int_eeprom d'27' ; read flag register
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3492 movff hi,lo ; copy gas number
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3493 PLED_simdata_screen2_loop1:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3494 rrcf EEDATA ; roll flags into carry
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3495 decfsz lo,F ; max. 5 times...
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3496 bra PLED_simdata_screen2_loop1
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3497
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3498 btfsc STATUS,C ; test carry
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3499 bra PLED_simdata_white
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3500
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3501 movlw color_grey
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3502 call PLED_set_color ; grey out inactive gases!
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3503 bra PLED_simdata_color_done
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3504
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3505 PLED_simdata_white:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3506 call PLED_standard_color
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3507
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3508 PLED_simdata_color_done:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3509 movlw d'25'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3510 addwf waitms_temp,F ; Increase row
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3511 WIN_LEFT .0
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3512 movff waitms_temp,win_top ; Set Row
34
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3513 call word_processor ; display gas
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3514
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3515 PLED_simdata_screen2b:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3516 call PLED_standard_color
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3517
34
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3518 movlw d'5' ; list all five gases
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3519 cpfseq hi ; All gases shown?
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3520 bra PLED_simdata_screen2_loop ; No
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3521
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3522 return ; No, return (OC mode)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3523
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3524 PLED_simdata_screen3:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3525 WIN_LEFT .0
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3526 WIN_FONT FT_SMALL
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3527 bsf leftbind
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3528
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3529 ; list three SP in Gaslist
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3530 movlw d'35' ; 36 = current SP position in EEPROM
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3531 movwf wait_temp ; here: stores eeprom address for gas list
34
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3532 movlw d'10'
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3533 movwf waitms_temp ; here: stores row for gas list
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
3534 clrf temp6 ; here: SP counter
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3535
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3536 PLED_simdata_screen3_loop:
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3537 incf wait_temp,F ; EEPROM address
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
3538 incf temp6,F ; Increase SP
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3539
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3540 movlw d'25'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3541 addwf waitms_temp,F ; Increase row
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3542 WIN_LEFT .0
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3543 movff waitms_temp,win_top ; Set Row
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3544
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3545 lfsr FSR2,letter
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3546 movlw 'S'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3547 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3548 movlw 'P'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3549 movwf POSTINC2
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
3550 movff temp6,lo ; copy gas number
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3551 output_8 ; display gas number
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3552 movlw ':'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3553 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3554 movlw ' '
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3555 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3556 movff wait_temp, EEADR; SP #hi position
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3557 call read_eeprom ; get byte (stored in EEDATA)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3558 movff EEDATA,lo ; copy to lo
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3559 clrf hi
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3560 output_16dp d'3' ; outputs into Postinc2!
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3561 call word_processor
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3562
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3563 movlw d'3' ; list all three SP
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 63
diff changeset
3564 cpfseq temp6 ; All gases shown?
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3565 bra PLED_simdata_screen3_loop ;no
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3566
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3567 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3568 movff EEDATA,active_gas ; Read start gas (1-5)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3569 decf active_gas,W ; Gas 0-4
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3570 mullw d'4'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3571 movf PRODL,W
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3572 addlw d'7' ; = address for He ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3573 movwf EEADR
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3574 call read_eeprom ; Read He ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3575 movff EEDATA,hi ; And copy into hold register
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3576 decf active_gas,W ; Gas 0-4
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3577 mullw d'4'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3578 movf PRODL,W
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3579 addlw d'6' ; = address for O2 ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3580 movwf EEADR
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3581 call read_eeprom ; Read O2 ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3582 movff EEDATA, lo ; O2 ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3583
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3584 WIN_LEFT .0
34
5dbdc08e5460 New Simulator results screen
heinrichsweikamp
parents: 33
diff changeset
3585 WIN_TOP .110
33
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3586 lfsr FSR2,letter
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3587 movlw 'D'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3588 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3589 movlw 'i'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3590 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3591 movlw 'l'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3592 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3593 movlw ':'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3594 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3595 output_8 ; O2 Ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3596 movlw '/'
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3597 movwf POSTINC2
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3598 movff hi,lo
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3599 output_8 ; He Ratio
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3600 call word_processor
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3601
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3602 bcf leftbind
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3603 return ; Return (CC Mode)
6e5db85382a2 Speedy simulator! New Deco code test 1
heinrichsweikamp
parents: 30
diff changeset
3604
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3605
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3606
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3607 adjust_depth_with_salinity: ; computes salinity setting into lo:hi [mBar]
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3608
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3609 btfsc simulatormode_active ; Do apply salinity in Simulatormode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3610 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3611
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3612 read_int_eeprom d'26' ; Read Salinity from EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3613 movff EEDATA, wait_temp ; salinity
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3614
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3615 movlw d'105' ; 105% ?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3616 cpfslt wait_temp ; Salinity higher limit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3617 return ; Out of limit, do not adjust lo:hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3618
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3619 movlw d'99' ; 99% ?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3620 cpfsgt wait_temp ; Salinity lower limit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3621 return ; Out of limit, do not adjust lo:hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3622
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3623 movff lo,xA+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3624 movff hi,xA+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3625
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3626 movlw d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3627 movwf xB+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3628 clrf xB+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3629
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3630 call mult16x16 ;xA*xB=xC (lo:hi * 100)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3631
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3632 movff wait_temp,xB+0 ; Salinity
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3633 clrf xB+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3634
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3635 call div32x16 ; xC:4 / xB:2 = xC+3:xC+2 with xC+1:xC+0 as remainder
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3636
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3637 movff xC+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3638 movff xC+1,hi ; restore lo and hi with updated value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3639
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3640 return