Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/customview.asm @ 790:53425d598585
NEW: Store useage timer in logbook header (Byte 54)
author | heinrichsweikamp |
---|---|
date | Thu, 28 Aug 2014 17:45:16 +0200 |
parents | b0c96aaa86e4 |
children | c50296c3059e |
rev | line source |
---|---|
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
1 ; OSTC - diving computer code |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
2 ; Copyright (C) 2008 HeinrichsWeikamp GbR |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
3 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
4 ; This program is free software: you can redistribute it and/or modify |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
5 ; it under the terms of the GNU General Public License as published by |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
6 ; the Free Software Foundation, either version 3 of the License, or |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
7 ; (at your option) any later version. |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
8 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
9 ; This program is distributed in the hope that it will be useful, |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
12 ; GNU General Public License for more details. |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
13 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
14 ; You should have received a copy of the GNU General Public License |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>. |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
16 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
17 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
18 ; Customviews for divemode |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com |
128 | 20 ; history: |
478
fd8266b511cc
New SAC (CF56/CF57) in 5..50 l/min range (no more decimal).
JeanDo
parents:
476
diff
changeset
|
21 ; 2010-12-12: [MH] First updated |
128 | 22 ; 2011-01-04: [jDG] Saturation graphs in customview divemode |
478
fd8266b511cc
New SAC (CF56/CF57) in 5..50 l/min range (no more decimal).
JeanDo
parents:
476
diff
changeset
|
23 ; 2011-10-10: [jDG] Added Cave live gas counter |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
24 ; known bugs: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
25 ; ToDo: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
26 |
128 | 27 ;============================================================================= |
28 ; Show the customview-dependent entry for the divemode menu | |
29 ; | |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
30 customview_menu_entry3: |
128 | 31 movff menupos3,WREG ; copy |
32 dcfsnz WREG,F | |
33 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu | |
34 dcfsnz WREG,F | |
35 bra customview_menu3_marker ; Show the marker option in divemode menu | |
36 dcfsnz WREG,F | |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
37 bra customview_menu3_clock ; Show nothing |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
38 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
39 bra customview_menu3_lead_tiss ; Show nothing |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
40 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
41 bra customview_menu3_average ; Show nothing |
128 | 42 dcfsnz WREG,F |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
43 bra customview_menu3_graphs ; Show nothing |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
44 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
45 bra customview_menu3_ead_end ; Show nothing |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
46 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
47 bra customview_menu3_@5 ; Show nothing |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
48 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
49 bra customview_menu3_cave_bailout; Show reset option |
666 | 50 dcfsnz WREG,F |
51 bra customview_menu3_pSCR_ppO2 ; Show nothing | |
52 dcfsnz WREG,F | |
53 bra customview_menu3_show_change_gf; Show toggle option | |
54 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
55 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
56 |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
57 customview_menu3_cave_bailout: |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
58 customview_menu3_stopwatch: |
128 | 59 DISPLAYTEXT .33 ; ResetAvr |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
60 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
61 |
666 | 62 customview_menu3_show_change_gf: |
63 DISPLAYTEXTH .269 ; ToggleGF | |
64 return | |
65 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
66 customview_menu3_marker: |
128 | 67 DISPLAYTEXT .30 ; Set Marker |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
68 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
69 |
128 | 70 customview_menu3_clock: ; No menu entry |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
71 customview_menu3_lead_tiss: |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
72 customview_menu3_average: |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
73 customview_menu3_graphs: |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
74 customview_menu3_ead_end: |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
75 customview_menu3_@5: |
666 | 76 customview_menu3_pSCR_ppO2: |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
77 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
78 |
128 | 79 ;============================================================================= |
80 ; Do every-second tasks for the custom view area | |
81 | |
82 customview_second: | |
83 movff menupos3,WREG ; copy | |
84 dcfsnz WREG,F | |
85 bra customview_1sec_stopwatch ; Update the Stopwatch | |
86 dcfsnz WREG,F | |
87 bra customview_1sec_marker ; Update the Marker | |
88 dcfsnz WREG,F | |
89 bra customview_1sec_clock ; Update the Clock | |
90 dcfsnz WREG,F | |
91 bra customview_1sec_lead_tiss ; Update the leading tissue | |
133 | 92 dcfsnz WREG,F |
131 | 93 bra customview_1sec_average ; Update the Average depth |
128 | 94 dcfsnz WREG,F |
95 bra customview_1sec_graphs ; Update the leading tissue | |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
96 dcfsnz WREG,F |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
97 bra customview_1sec_ead_end ; Show END and EAD in divemode |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
98 dcfsnz WREG,F |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
99 bra customview_1sec_@5 ; Show TTS for extra time. |
476 | 100 dcfsnz WREG,F |
101 bra customview_1sec_cave_bailout; Show Cave conso prediction. | |
552 | 102 dcfsnz WREG,F |
103 bra customview_1sec_pSCR_ppO2 ; Show/Update pSCR ppO2 | |
666 | 104 dcfsnz WREG,F |
105 bra customview_1sec_show_change_gf; Show and/or change GF values | |
759 | 106 dcfsnz WREG,F |
107 bra customview_1sec_show_deco_gas | |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
108 dcfsnz WREG,F |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
109 bra customview_1sec_show_ceiling |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
110 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
111 return |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
112 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
113 customview_1sec_average: |
681 | 114 goto DISP_total_average_show2 ; Update the figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
115 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
116 customview_1sec_stopwatch: |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
117 btfsc gauge_mode ; In Gauge mode? |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
118 bra customview_1sec_stopwatch_gauge; Yes |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
119 |
295 | 120 bsf menu3_active ; Set Flag |
681 | 121 goto DISP_stopwatch_show2 ; Update figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
122 |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
123 customview_1sec_stopwatch_gauge: |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
124 bsf menu3_active ; Set Flag |
681 | 125 goto DISP_stopwatch_show_gauge ; Update figures + Description |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
126 |
128 | 127 customview_1sec_marker: ; Do nothing extra |
666 | 128 customview_1sec_show_change_gf: ; Do nothing extra |
295 | 129 bsf menu3_active ; Set Flag |
128 | 130 customview_1sec_lead_tiss: ; Do nothing extra |
133 | 131 return |
132 | |
778
43ef5a003df7
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
759
diff
changeset
|
133 customview_1sec_clock: |
43ef5a003df7
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
759
diff
changeset
|
134 goto DISP_diveclock3 ; Update end of divetime only |
43ef5a003df7
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
759
diff
changeset
|
135 |
128 | 136 customview_1sec_graphs: ; Do nothing extra |
150 | 137 decfsz apnoe_mins ; 10 sec passed ? |
138 return ; No: skip. | |
139 movlw .10 ; Yes: reset counter. | |
140 movwf apnoe_mins | |
141 | |
142 call deco_calc_desaturation_time ; calculate desaturation time | |
143 movlb b'00000001' ; select ram bank 1 | |
681 | 144 goto DISP_tissue_saturation_graph |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
145 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
146 customview_1sec_ead_end: |
681 | 147 goto DISP_show_end_ead_divemode |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
148 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
149 customview_1sec_@5: |
681 | 150 goto DISP_show_@5 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
151 |
476 | 152 customview_1sec_cave_bailout: |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
153 bsf menu3_active ; Set Flag |
681 | 154 goto DISP_show_cave_bailout |
476 | 155 |
552 | 156 customview_1sec_pSCR_ppO2: |
681 | 157 goto DISP_show_pSCR_ppO2 ; Yes, compute and show value |
759 | 158 |
159 customview_1sec_show_deco_gas: | |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
160 goto DISP_show_deco_gas1 ; Show the next decogas |
759 | 161 |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
162 customview_1sec_show_ceiling: |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
163 goto DISP_show_ceiling_1 ; Update the ceiling |
552 | 164 |
128 | 165 ;============================================================================= |
166 ; Do every-minute tasks for the custom view area | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
167 |
128 | 168 customview_minute: |
169 movff menupos3,WREG ; copy | |
170 dcfsnz WREG,F | |
171 bra customview_minute_stopwatch ; Update the Stopwatch | |
172 dcfsnz WREG,F | |
173 bra customview_minute_marker ; Update the Marker | |
174 dcfsnz WREG,F | |
175 bra customview_minute_clock ; Update the Clock | |
176 dcfsnz WREG,F | |
177 bra customview_minute_lead_tiss ; Update the leading tissue | |
133 | 178 dcfsnz WREG,F |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
179 bra customview_minute_average ; Update the Average depth |
128 | 180 dcfsnz WREG,F |
181 bra customview_minute_graphs ; Update the graphs | |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
182 dcfsnz WREG,F |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
183 bra customview_minute_ead_end ; Show END and EAD in divemode |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
184 dcfsnz WREG,F |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
185 bra customview_minute_@5 ; Show TTS for extra time. |
476 | 186 dcfsnz WREG,F |
187 bra customview_minute_cave_bailout; Show Cave consomation prediction. | |
552 | 188 dcfsnz WREG,F |
189 bra customview_minute_pSCR_ppO2; Show pSCR ppO2 level | |
666 | 190 dcfsnz WREG,F |
191 bra customview_minute_show_change_gf; Show and/or change GF values | |
759 | 192 dcfsnz WREG,F |
193 bra customview_minute_show_deco_gas ; Show the next decogas | |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
194 dcfsnz WREG,F |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
195 bra customview_minute_show_ceiling ; Update the ceiling |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
196 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
197 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
198 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
199 customview_minute_clock: |
681 | 200 goto DISP_diveclock2 ; Update the clock |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
201 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
202 customview_minute_lead_tiss: |
681 | 203 goto DISP_show_leading_tissue_2 ; Update the leading tissue |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
204 |
666 | 205 customview_minute_show_change_gf: ; Do nothing extra |
476 | 206 customview_minute_cave_bailout: ; Do nothing extra |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
207 customview_minute_@5: ; Do nothing extra |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
208 customview_minute_ead_end: ; Do nothing extra |
128 | 209 customview_minute_marker: ; Do nothing extra |
210 customview_minute_stopwatch: ; Do nothing extra | |
137 | 211 customview_minute_average: ; Do nothing extra |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
212 customview_minute_graphs: ; Do nothing extra |
552 | 213 customview_minute_pSCR_ppO2: ; Do nothing extra |
759 | 214 customview_minute_show_deco_gas: ; Do nothing extra |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
215 customview_minute_show_ceiling: ; Do nothing extra |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
216 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
217 |
128 | 218 ;============================================================================= |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
219 ; Show next customview (and delete this flag) |
128 | 220 |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
221 customview_toggle: |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
222 bcf menu3_active ;=1: menu entry three in divemode menu is active |
119 | 223 ostc_debug 'X' ; Sends debug-information to screen if debugmode active |
137 | 224 |
626
bab5a9fc1b10
restore last used customview in dive- and surface-mode
heinrichsweikamp
parents:
592
diff
changeset
|
225 incf menupos3,F ; Number of customview to show |
bab5a9fc1b10
restore last used customview in dive- and surface-mode
heinrichsweikamp
parents:
592
diff
changeset
|
226 customview_toggle2: |
137 | 227 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
228 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely | |
229 | |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
230 movlw d'13' ; Max number |
128 | 231 cpfsgt menupos3 ; Max reached? |
232 bra customview_mask ; No, show | |
233 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
234 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
235 customview_mask: |
681 | 236 call DISP_clear_customview_divemode |
476 | 237 bcf tts_extra_time ; By default, CLEAR computation of @5 request. |
238 | |
128 | 239 movff menupos3,WREG ; Menupos3 holds number of customview function |
240 dcfsnz WREG,F | |
476 | 241 bra customview_init_stopwatch ; 1: Show the Stopwatch |
128 | 242 dcfsnz WREG,F |
476 | 243 bra customview_init_marker ; 2: Show the Marker-Menu |
128 | 244 dcfsnz WREG,F |
476 | 245 bra customview_init_clock ; 3: Show the clock |
128 | 246 dcfsnz WREG,F |
476 | 247 bra customview_init_lead_tissue ; 4: Show the leading tissue |
133 | 248 dcfsnz WREG,F |
476 | 249 bra customview_init_average ; 5: Show Total average depth |
128 | 250 dcfsnz WREG,F |
476 | 251 bra customview_init_graphs ; 6: Show the graphs |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
252 dcfsnz WREG,F |
476 | 253 bra customview_init_ead_end ; 7: Show END and EAD in divemode |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
254 dcfsnz WREG,F |
476 | 255 bra customview_init_@5 ; 8: Show TTS for extra time. |
256 dcfsnz WREG,F | |
257 bra customview_init_cave_bailout ; 9: Show Cave consomation prediction. | |
552 | 258 dcfsnz WREG,F |
259 bra customview_init_pSCR_ppo2 ; 10: Show ppO2 for pSCR users | |
666 | 260 dcfsnz WREG,F |
261 bra customview_init_show_change_gf ; 11: Show and/or change GF values | |
759 | 262 dcfsnz WREG,F |
263 bra customview_init_show_deco_gas ; 12: Show deco gas | |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
264 dcfsnz WREG,F |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
265 bra customview_init_show_ceiling ; 13: Show ceiling |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
266 |
128 | 267 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
268 customview_init_nocustomview: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
269 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
270 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
271 customview_init_average: |
681 | 272 call DISP_total_average_show ; Show Average with mask |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
273 bra customview_toggle_exit |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
274 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
275 customview_init_stopwatch: |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
276 GETCUSTOM8 d'51' ; Show Stopwatch? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
277 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
278 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
279 |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
280 btfsc gauge_mode ; In Gauge mode? |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
281 bra customview_init_stopwatch_gauge ; Yes |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
282 |
681 | 283 call DISP_stopwatch_show ; Init Stopwatch display |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
284 bsf menu3_active ; Set Flag |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
285 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
286 |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
287 customview_init_stopwatch_gauge: |
681 | 288 call DISP_stopwatch_show_gauge ; Init Stopwatch display |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
289 bsf menu3_active ; Set Flag |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
290 bra customview_toggle_exit |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
291 |
128 | 292 customview_init_marker: ; Init Marker |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
293 btfsc gauge_mode ; In Gauge mode? |
681 | 294 call DISP_clear_divemode_menu; Yes, clear BIG stopwatch |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
295 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
296 GETCUSTOM8 d'50' ; Show Marker? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
297 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
298 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
299 |
681 | 300 call DISP_standard_color |
150 | 301 DISPLAYTEXT d'151' ; Set Marker? |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
302 bsf menu3_active ; Set Flag |
674 | 303 |
304 btfss event_occured ; Is an event active? | |
305 bra customview_toggle_exit ; No | |
306 | |
307 movlw d'6' ; Type of Alarm (Manual Marker) | |
308 cpfseq AlarmType ; Marker recently set? | |
309 bra customview_toggle_exit ; No | |
310 | |
681 | 311 call DISP_marker_set ; Show some feedback |
150 | 312 bra customview_toggle_exit |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
313 |
107 | 314 customview_init_clock: ; Init Clock |
681 | 315 call DISP_diveclock |
150 | 316 bra customview_toggle_exit |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
317 |
107 | 318 customview_init_lead_tissue: ; Show leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
319 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
320 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
321 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
322 |
137 | 323 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
324 bra customview_toggle ; Yes, use next Customview! | |
325 | |
681 | 326 call DISP_show_leading_tissue |
150 | 327 bra customview_toggle_exit |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
328 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
329 customview_init_ead_end: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
330 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
331 bra customview_toggle ; Yes, use next Customview! |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
332 |
681 | 333 call DISP_show_end_ead_divemode |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
334 bra customview_toggle_exit |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
335 |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
336 customview_init_@5: |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
337 GETCUSTOM8 d'58' ; Extra time to simulate |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
338 iorwf WREG,F ; Null ? |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
339 bz customview_toggle ; Yes: use next Customview ! |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
340 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
341 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
342 bra customview_toggle ; Yes, use next Customview! |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
343 |
323 | 344 setf WREG ; WAIT marker: display "---" |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
345 movff WREG,int_O_extra_ascenttime+0 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
346 movff WREG,int_O_extra_ascenttime+1 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
347 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
348 movlw 1 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
349 movwf apnoe_mins ; Start compute after next cycle. |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
350 bsf tts_extra_time |
681 | 351 call DISP_show_@5 ; Show (wait) |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
352 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
353 bra customview_toggle_exit |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
354 |
476 | 355 customview_init_cave_bailout: |
356 GETCUSTOM15 d'59' ; Conso level warning set ? | |
357 movf lo,W | |
358 iorwf hi,W | |
359 bz customview_toggle ; No: jump to next Customview ! | |
360 | |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
478
diff
changeset
|
361 bsf menu3_active ; Set Flag |
681 | 362 call DISP_show_cave_bailout |
476 | 363 bra customview_toggle_exit |
364 | |
131 | 365 customview_init_graphs: ; Show tissue graph |
366 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) | |
367 decfsz WREG,F ; WREG=1? | |
368 bra customview_toggle ; No, use next Customview | |
128 | 369 |
137 | 370 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
371 bra customview_toggle ; Yes, use next Customview! | |
372 | |
150 | 373 movlw .1 ; Draw next second. |
374 movwf apnoe_mins ; 10sec counter. | |
375 | |
376 call deco_calc_desaturation_time ; calculate desaturation time | |
377 movlb b'00000001' ; select ram bank 1 | |
681 | 378 call DISP_tissue_saturation_graph |
150 | 379 |
380 bra customview_toggle_exit | |
381 | |
552 | 382 customview_init_pSCR_ppo2: |
383 GETCUSTOM8 d'61' ; Show pSCR ppO2? | |
384 decfsz WREG,F ; WREG=1? | |
385 bra customview_toggle ; No, use next Customview | |
386 | |
666 | 387 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
388 bra customview_toggle ; Yes, use next Customview! | |
389 | |
681 | 390 call DISP_show_pSCR_ppO2 ; Yes, compute and show value |
552 | 391 |
392 bra customview_toggle_exit | |
393 | |
666 | 394 customview_init_show_change_gf: |
395 GETCUSTOM8 d'69' ; Allow GF change? | |
396 decfsz WREG,F ; WREG=1? | |
397 bra customview_toggle ; No, use next Customview | |
398 | |
399 btfsc no_deco_customviews ; no-deco-mode-flag = 1 | |
400 bra customview_toggle ; Yes, use next Customview! | |
401 | |
402 movff char_I_deco_model,lo | |
403 decfsz lo,F ; jump over next line if char_I_deco_model == 1 | |
404 bra customview_toggle_exit | |
405 | |
406 bsf menu3_active ; Set Flag | |
681 | 407 call DISP_show_gf_customview ; Show info |
666 | 408 bra customview_toggle_exit |
409 | |
759 | 410 customview_init_show_deco_gas: |
411 bra customview_toggle ; mH: Ignore now | |
412 | |
413 btfsc no_deco_customviews ; no-deco-mode-flag = 1 | |
414 bra customview_toggle ; Yes, use next Customview! | |
415 btfsc FLAG_const_ppO2_mode ; in ppO2 mode | |
416 bra surfcustomview_toggle ; Yes, use next Customview! | |
417 | |
418 call DISP_show_deco_gas ; Show the next decogas | |
419 | |
420 bra customview_toggle_exit | |
421 | |
785
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
422 customview_init_show_ceiling: |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
423 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
424 bra customview_toggle ; Yes, use next Customview! |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
425 call DISP_show_ceiling ; Update the ceiling |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
426 bra customview_toggle_exit |
b0c96aaa86e4
add ceiling display, no turkish language support anymore
heinrichsweikamp
parents:
778
diff
changeset
|
427 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
428 customview_toggle_exit: |
107 | 429 bcf toggle_customview ; Clear flag |
128 | 430 ostc_debug 'Y' ; Sends debug-information to screen in debugmode |
107 | 431 return |
432 | |
128 | 433 ;============================================================================= |
434 ; Yes, show next customview (and delete this flag) | |
107 | 435 |
128 | 436 surfcustomview_toggle: |
107 | 437 incf menupos3,F ; Number of customview to show |
626
bab5a9fc1b10
restore last used customview in dive- and surface-mode
heinrichsweikamp
parents:
592
diff
changeset
|
438 surfcustomview_toggle2: |
758
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
439 movlw d'6' ; Max number |
111 | 440 cpfsgt menupos3 ; Max reached? |
107 | 441 bra surfcustomview_mask ; No, show |
442 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
443 surfcustomview_mask: | |
681 | 444 call DISP_clear_customview_surfmode |
128 | 445 movff menupos3,WREG ; Menupos3 holds number of customview function |
446 dcfsnz WREG,F | |
107 | 447 bra surfcustomview_init_graphs ; Show the tissue graphs |
128 | 448 dcfsnz WREG,F |
107 | 449 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list |
128 | 450 dcfsnz WREG,F |
758
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
451 bra surfcustomview_init_interval ; Show the interval counter |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
452 dcfsnz WREG,F |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
453 bra surfcustomview_init_cfview ; Show important CF settings |
128 | 454 dcfsnz WREG,F |
758
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
455 bra surfcustomview_init_first_bail ; Show the first bailout gas |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
456 dcfsnz WREG,F |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
457 bra surfcustomview_init_bailoutlist ; Show the bailout list |
128 | 458 |
107 | 459 surfcustomview_init_nocustomview: |
460 bra surfcustomview_toggle_exit | |
461 | |
758
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
462 surfcustomview_init_first_bail: ; Show the first bailout gas |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
463 btfss FLAG_const_ppO2_mode ; in ppO2 mode |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
464 bra surfcustomview_toggle ; No, use next Customview! |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
465 call DISP_bailoutgas ; Show the first bailout gas |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
466 bra surfcustomview_toggle_exit |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
467 |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
468 surfcustomview_init_bailoutlist: ; Show the bailout list |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
469 btfss FLAG_const_ppO2_mode ; in ppO2 mode |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
470 bra surfcustomview_toggle ; No, use next Customview! |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
471 call DISP_bailoutlist ; Show the Bailout list |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
472 bra surfcustomview_toggle_exit |
3096294bb06e
Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents:
681
diff
changeset
|
473 |
107 | 474 surfcustomview_init_graphs: |
137 | 475 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
476 bra surfcustomview_toggle ; Yes, use next Customview! | |
477 | |
681 | 478 call DISP_tissue_saturation_graph; Draw the graphs |
107 | 479 bra surfcustomview_toggle_exit |
480 | |
481 surfcustomview_init_gaslist: | |
137 | 482 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
483 bra surfcustomview_toggle ; Yes, use next Customview! | |
484 | |
681 | 485 call DISP_pre_dive_screen ; Show the Gaslist/Setpoint list |
107 | 486 bra surfcustomview_toggle_exit |
487 | |
111 | 488 surfcustomview_init_interval: |
681 | 489 call DISP_standard_color |
111 | 490 DISPLAYTEXT d'189' ; Surface |
491 DISPLAYTEXT d'240' ; Interval: | |
681 | 492 call DISP_interval ; Display the interval |
111 | 493 bra surfcustomview_toggle_exit |
494 | |
495 surfcustomview_init_cfview: | |
496 read_int_eeprom d'34' ; Get Decomode | |
497 incf EEDATA,W ; +1 -> WREG | |
498 movwf temp10 | |
499 dcfsnz temp10,F | |
681 | 500 call DISP_show_cf11_cf12_cf29 ; =0 (ZH-L16 OC) |
111 | 501 dcfsnz temp10,F |
502 bra surfcustomview_toggle_exit ; =1 (Gauge) | |
503 dcfsnz temp10,F | |
681 | 504 call DISP_show_cf11_cf12_cf29 ; =2 (ZH-L16 CC) |
111 | 505 dcfsnz temp10,F |
506 bra surfcustomview_toggle_exit ; =3 (Apnoe) | |
507 dcfsnz temp10,F | |
681 | 508 call DISP_show_cf32_cf33_cf29 ; =4 (L16-GF OC) |
111 | 509 dcfsnz temp10,F |
681 | 510 call DISP_show_cf32_cf33_cf29 ; =5 (L16-GF CC) |
592
cda5b45b953f
NEW: Deco mode "pSCR-GF": Computes deco and CNS based on pSCR parameters (CF62/63)
heinrichsweikamp
parents:
552
diff
changeset
|
511 dcfsnz temp10,F |
681 | 512 call DISP_show_cf32_cf33_cf62_cf63 ; =6 (pSCR-GF) |
592
cda5b45b953f
NEW: Deco mode "pSCR-GF": Computes deco and CNS based on pSCR parameters (CF62/63)
heinrichsweikamp
parents:
552
diff
changeset
|
513 |
111 | 514 bra surfcustomview_toggle_exit |
515 | |
107 | 516 surfcustomview_toggle_exit: |
517 bcf toggle_customview ; Clear flag | |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
518 clrf timeout_counter2 ; Clear timeout |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
519 return |
107 | 520 |
128 | 521 ;============================================================================= |
522 ; Do every-second tasks for the custom view area | |
107 | 523 |
128 | 524 surfcustomview_second: |
525 ; movff menupos3,WREG ; copy | |
526 ; dcfsnz WREG,F | |
527 ; bra surfcustomview_1sec_graphs ; Update the Graphs | |
528 ; dcfsnz WREG,F | |
529 ; bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List | |
530 ; dcfsnz WREG,F | |
531 ; bra surfcustomview_1sec_interval ; Update the Interval display | |
532 ; dcfsnz WREG,F | |
533 ; bra surfcustomview_1sec_cfview ; Update the critical cf view | |
534 ; ; Menupos3=0, do nothing | |
535 ; return | |
536 ;surfcustomview_1sec_cfview: ; Do nothing extra | |
537 ;surfcustomview_1sec_graphs: ; Do nothing extra | |
137 | 538 ;surfcustomview_1sec_gaslist: ; Do nothing extra |
539 ;surfcustomview_1sec_interval: ; Do nothing extra | |
107 | 540 return |
541 | |
128 | 542 ;============================================================================= |
107 | 543 |
544 surfcustomview_minute: ; Do every-minute tasks for the custom view area | |
128 | 545 movff menupos3,WREG ; copy |
546 dcfsnz WREG,F | |
107 | 547 bra surfcustomview_minute_graphs ; Update the Graphs |
128 | 548 dcfsnz WREG,F |
107 | 549 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List |
128 | 550 dcfsnz WREG,F |
111 | 551 bra surfcustomview_minute_interval ; Update the Interval display |
128 | 552 dcfsnz WREG,F |
137 | 553 bra surfcustomview_minute_cfview ; Update the critical cf view |
107 | 554 ; Menupos3=0, do nothing |
555 return | |
556 | |
557 surfcustomview_minute_graphs: | |
150 | 558 call deco_calc_desaturation_time ; calculate desaturation time |
559 movlb b'00000001' ; select ram bank 1 | |
681 | 560 call DISP_tissue_saturation_graph ; Draw/Update the graphs |
107 | 561 return |
562 | |
111 | 563 surfcustomview_minute_interval: |
112 | 564 DISPLAYTEXT d'189' ; Surface |
565 DISPLAYTEXT d'240' ; Interval: | |
681 | 566 call DISP_interval ; Display the interval |
111 | 567 return |
568 | |
107 | 569 surfcustomview_minute_gaslist: ; Do nothing extra |
111 | 570 surfcustomview_minute_cfview: ; Do nothing extra |
571 return |