Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/customview.asm @ 480:8f4882639326
relative path changed for include
author | heinrichsweikamp |
---|---|
date | Tue, 11 Oct 2011 21:17:05 +0200 |
parents | 7779bfa89171 |
children | fd8266b511cc |
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 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
20 ; written: 101212 |
128 | 21 ; history: |
22 ; 2010-12-12: [MH] last updated | |
23 ; 2011-01-04: [jDG] Saturation graphs in customview divemode | |
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 ; | |
30 customview_menu_entry3: | |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
31 ; bcf menu3_active ;=1: menu entry three in divemode menu is active |
128 | 32 |
33 movff menupos3,WREG ; copy | |
34 dcfsnz WREG,F | |
35 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu | |
36 dcfsnz WREG,F | |
37 bra customview_menu3_marker ; Show the marker option in divemode menu | |
38 dcfsnz WREG,F | |
39 bra customview_menu3_clock ; Show the clock option in divemode menu | |
40 dcfsnz WREG,F | |
41 bra customview_menu3_lead_tiss ; Show the leading tissue option in divemode menu | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
42 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
43 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
44 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
45 customview_menu3_stopwatch: |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
46 ; bsf menu3_active ; Set Flag |
128 | 47 DISPLAYTEXT .33 ; ResetAvr |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
48 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
49 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
50 customview_menu3_marker: |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
51 ; bsf menu3_active ; Set Flag |
128 | 52 DISPLAYTEXT .30 ; Set Marker |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
53 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
54 |
128 | 55 customview_menu3_clock: ; No menu entry |
56 customview_menu3_lead_tiss ; No menu entry | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
57 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
58 |
128 | 59 ;============================================================================= |
60 ; Do every-second tasks for the custom view area | |
61 | |
62 customview_second: | |
63 movff menupos3,WREG ; copy | |
64 dcfsnz WREG,F | |
65 bra customview_1sec_stopwatch ; Update the Stopwatch | |
66 dcfsnz WREG,F | |
67 bra customview_1sec_marker ; Update the Marker | |
68 dcfsnz WREG,F | |
69 bra customview_1sec_clock ; Update the Clock | |
70 dcfsnz WREG,F | |
71 bra customview_1sec_lead_tiss ; Update the leading tissue | |
133 | 72 dcfsnz WREG,F |
131 | 73 bra customview_1sec_average ; Update the Average depth |
128 | 74 dcfsnz WREG,F |
75 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
|
76 dcfsnz WREG,F |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
77 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
|
78 dcfsnz WREG,F |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
79 bra customview_1sec_@5 ; Show TTS for extra time. |
476 | 80 dcfsnz WREG,F |
81 bra customview_1sec_cave_bailout; Show Cave conso prediction. | |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
82 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
83 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
84 return |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
85 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
86 customview_1sec_average: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
87 goto PLED_total_average_show2 ; Update the figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
88 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
89 customview_1sec_stopwatch: |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
90 btfsc gauge_mode ; In Gauge mode? |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
91 bra customview_1sec_stopwatch_gauge; Yes |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
92 |
295 | 93 bsf menu3_active ; Set Flag |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
94 goto PLED_stopwatch_show2 ; Update figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
95 |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
96 customview_1sec_stopwatch_gauge: |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
97 bsf menu3_active ; Set Flag |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
98 goto PLED_stopwatch_show_gauge ; Update figures + Description |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
99 |
128 | 100 customview_1sec_marker: ; Do nothing extra |
295 | 101 bsf menu3_active ; Set Flag |
128 | 102 customview_1sec_clock: ; Do nothing extra |
103 customview_1sec_lead_tiss: ; Do nothing extra | |
133 | 104 return |
105 | |
128 | 106 customview_1sec_graphs: ; Do nothing extra |
150 | 107 decfsz apnoe_mins ; 10 sec passed ? |
108 return ; No: skip. | |
109 movlw .10 ; Yes: reset counter. | |
110 movwf apnoe_mins | |
111 | |
112 call deco_calc_desaturation_time ; calculate desaturation time | |
113 movlb b'00000001' ; select ram bank 1 | |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
114 goto PLED_tissue_saturation_graph |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
115 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
116 customview_1sec_ead_end: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
117 goto PLED_show_end_ead_divemode |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
118 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
119 customview_1sec_@5: |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
120 goto PLED_show_@5 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
121 |
476 | 122 customview_1sec_cave_bailout: |
123 goto PLED_show_cave_bailout | |
124 | |
128 | 125 ;============================================================================= |
126 ; Do every-minute tasks for the custom view area | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
127 |
128 | 128 customview_minute: |
129 movff menupos3,WREG ; copy | |
130 dcfsnz WREG,F | |
131 bra customview_minute_stopwatch ; Update the Stopwatch | |
132 dcfsnz WREG,F | |
133 bra customview_minute_marker ; Update the Marker | |
134 dcfsnz WREG,F | |
135 bra customview_minute_clock ; Update the Clock | |
136 dcfsnz WREG,F | |
137 bra customview_minute_lead_tiss ; Update the leading tissue | |
133 | 138 dcfsnz WREG,F |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
139 bra customview_minute_average ; Update the Average depth |
128 | 140 dcfsnz WREG,F |
141 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
|
142 dcfsnz WREG,F |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
143 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
|
144 dcfsnz WREG,F |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
145 bra customview_minute_@5 ; Show TTS for extra time. |
476 | 146 dcfsnz WREG,F |
147 bra customview_minute_cave_bailout; Show Cave consomation prediction. | |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
148 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
149 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
150 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
151 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
152 customview_minute_clock: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
153 goto PLED_diveclock2 ; Update the clock |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
154 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
155 customview_minute_lead_tiss: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
156 goto PLED_show_leading_tissue_2 ; Update the leading tissue |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
157 |
476 | 158 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
|
159 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
|
160 customview_minute_ead_end: ; Do nothing extra |
128 | 161 customview_minute_marker: ; Do nothing extra |
162 customview_minute_stopwatch: ; Do nothing extra | |
137 | 163 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
|
164 customview_minute_graphs: ; Do nothing extra |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
165 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
166 |
128 | 167 ;============================================================================= |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
168 ; Show next customview (and delete this flag) |
128 | 169 |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
170 customview_toggle: |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
171 bcf menu3_active ;=1: menu entry three in divemode menu is active |
119 | 172 ostc_debug 'X' ; Sends debug-information to screen if debugmode active |
137 | 173 |
174 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
175 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely | |
176 | |
128 | 177 incf menupos3,F ; Number of customview to show |
476 | 178 movlw d'9' ; Max number |
128 | 179 cpfsgt menupos3 ; Max reached? |
180 bra customview_mask ; No, show | |
181 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
|
182 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
183 customview_mask: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
184 call PLED_clear_customview_divemode |
476 | 185 bcf tts_extra_time ; By default, CLEAR computation of @5 request. |
186 | |
128 | 187 movff menupos3,WREG ; Menupos3 holds number of customview function |
188 dcfsnz WREG,F | |
476 | 189 bra customview_init_stopwatch ; 1: Show the Stopwatch |
128 | 190 dcfsnz WREG,F |
476 | 191 bra customview_init_marker ; 2: Show the Marker-Menu |
128 | 192 dcfsnz WREG,F |
476 | 193 bra customview_init_clock ; 3: Show the clock |
128 | 194 dcfsnz WREG,F |
476 | 195 bra customview_init_lead_tissue ; 4: Show the leading tissue |
133 | 196 dcfsnz WREG,F |
476 | 197 bra customview_init_average ; 5: Show Total average depth |
128 | 198 dcfsnz WREG,F |
476 | 199 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
|
200 dcfsnz WREG,F |
476 | 201 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
|
202 dcfsnz WREG,F |
476 | 203 bra customview_init_@5 ; 8: Show TTS for extra time. |
204 dcfsnz WREG,F | |
205 bra customview_init_cave_bailout ; 9: Show Cave consomation prediction. | |
128 | 206 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
207 customview_init_nocustomview: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
208 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
209 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
210 customview_init_average: |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
211 call PLED_total_average_show ; Show Average with mask |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
212 bra customview_toggle_exit |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
213 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
214 customview_init_stopwatch: |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
215 GETCUSTOM8 d'51' ; Show Stopwatch? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
216 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
217 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
218 |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
219 btfsc gauge_mode ; In Gauge mode? |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
220 bra customview_init_stopwatch_gauge ; Yes |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
221 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
222 call PLED_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
|
223 bsf menu3_active ; Set Flag |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
224 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
225 |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
226 customview_init_stopwatch_gauge: |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
227 call PLED_stopwatch_show_gauge ; Init Stopwatch display |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
228 bsf menu3_active ; Set Flag |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
229 bra customview_toggle_exit |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
230 |
128 | 231 customview_init_marker: ; Init Marker |
386
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
232 btfsc gauge_mode ; In Gauge mode? |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
233 call PLED_clear_divemode_menu; Yes, clear BIG stopwatch |
deced1cacff7
Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents:
323
diff
changeset
|
234 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
235 GETCUSTOM8 d'50' ; Show Marker? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
236 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
237 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
238 |
150 | 239 call PLED_standard_color |
240 DISPLAYTEXT d'151' ; Set Marker? | |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
241 bsf menu3_active ; Set Flag |
150 | 242 bra customview_toggle_exit |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
243 |
107 | 244 customview_init_clock: ; Init Clock |
150 | 245 call PLED_diveclock |
246 bra customview_toggle_exit | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
247 |
107 | 248 customview_init_lead_tissue: ; Show leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
249 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
250 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
251 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
252 |
137 | 253 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
254 bra customview_toggle ; Yes, use next Customview! | |
255 | |
150 | 256 call PLED_show_leading_tissue |
257 bra customview_toggle_exit | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
258 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
259 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
|
260 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
|
261 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
|
262 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
263 call PLED_show_end_ead_divemode |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
264 bra customview_toggle_exit |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
265 |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
266 customview_init_@5: |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
267 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
|
268 iorwf WREG,F ; Null ? |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
269 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
|
270 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
271 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
|
272 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
|
273 |
323 | 274 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
|
275 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
|
276 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
|
277 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
278 movlw 1 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
279 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
|
280 bsf tts_extra_time |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
281 call PLED_show_@5 ; Show (wait) |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
282 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
283 bra customview_toggle_exit |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
284 |
476 | 285 customview_init_cave_bailout: |
286 GETCUSTOM15 d'59' ; Conso level warning set ? | |
287 movf lo,W | |
288 iorwf hi,W | |
289 bz customview_toggle ; No: jump to next Customview ! | |
290 | |
291 call PLED_show_cave_bailout | |
292 bra customview_toggle_exit | |
293 | |
131 | 294 customview_init_graphs: ; Show tissue graph |
295 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) | |
296 decfsz WREG,F ; WREG=1? | |
297 bra customview_toggle ; No, use next Customview | |
128 | 298 |
137 | 299 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
300 bra customview_toggle ; Yes, use next Customview! | |
301 | |
150 | 302 movlw .1 ; Draw next second. |
303 movwf apnoe_mins ; 10sec counter. | |
304 | |
305 call deco_calc_desaturation_time ; calculate desaturation time | |
306 movlb b'00000001' ; select ram bank 1 | |
307 call PLED_tissue_saturation_graph | |
308 | |
309 bra customview_toggle_exit | |
310 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
311 customview_toggle_exit: |
107 | 312 bcf toggle_customview ; Clear flag |
128 | 313 ostc_debug 'Y' ; Sends debug-information to screen in debugmode |
107 | 314 return |
315 | |
128 | 316 ;============================================================================= |
317 ; Yes, show next customview (and delete this flag) | |
107 | 318 |
128 | 319 surfcustomview_toggle: |
107 | 320 incf menupos3,F ; Number of customview to show |
111 | 321 movlw d'4' ; Max number |
322 cpfsgt menupos3 ; Max reached? | |
107 | 323 bra surfcustomview_mask ; No, show |
324 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
325 surfcustomview_mask: | |
115 | 326 call PLED_clear_customview_surfmode |
128 | 327 movff menupos3,WREG ; Menupos3 holds number of customview function |
328 dcfsnz WREG,F | |
107 | 329 bra surfcustomview_init_graphs ; Show the tissue graphs |
128 | 330 dcfsnz WREG,F |
107 | 331 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list |
128 | 332 dcfsnz WREG,F |
133 | 333 bra surfcustomview_init_interval; Show the interval counter |
128 | 334 dcfsnz WREG,F |
111 | 335 bra surfcustomview_init_cfview ; Show the interval counter |
128 | 336 |
107 | 337 surfcustomview_init_nocustomview: |
338 bra surfcustomview_toggle_exit | |
339 | |
340 surfcustomview_init_graphs: | |
137 | 341 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
342 bra surfcustomview_toggle ; Yes, use next Customview! | |
343 | |
133 | 344 call PLED_tissue_saturation_graph; Draw the graphs |
107 | 345 bra surfcustomview_toggle_exit |
346 | |
347 surfcustomview_init_gaslist: | |
137 | 348 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
349 bra surfcustomview_toggle ; Yes, use next Customview! | |
350 | |
107 | 351 call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list |
352 bra surfcustomview_toggle_exit | |
353 | |
111 | 354 surfcustomview_init_interval: |
123 | 355 call PLED_standard_color |
111 | 356 DISPLAYTEXT d'189' ; Surface |
357 DISPLAYTEXT d'240' ; Interval: | |
358 call PLED_interval ; Display the interval | |
359 bra surfcustomview_toggle_exit | |
360 | |
361 surfcustomview_init_cfview: | |
362 read_int_eeprom d'34' ; Get Decomode | |
363 incf EEDATA,W ; +1 -> WREG | |
364 movwf temp10 | |
365 dcfsnz temp10,F | |
366 call PLED_show_cf11_cf12_cf29 ; =0 (ZH-L16 OC) | |
367 dcfsnz temp10,F | |
368 bra surfcustomview_toggle_exit ; =1 (Gauge) | |
369 dcfsnz temp10,F | |
370 call PLED_show_cf11_cf12_cf29 ; =2 (ZH-L16 CC) | |
371 dcfsnz temp10,F | |
372 bra surfcustomview_toggle_exit ; =3 (Apnoe) | |
373 dcfsnz temp10,F | |
374 call PLED_show_cf32_cf33_cf29 ; =4 (L16-GF OC) | |
375 dcfsnz temp10,F | |
376 call PLED_show_cf32_cf33_cf29 ; =5 (L16-GF CC) | |
377 bra surfcustomview_toggle_exit | |
378 | |
107 | 379 surfcustomview_toggle_exit: |
380 bcf toggle_customview ; Clear flag | |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
381 clrf timeout_counter2 ; Clear timeout |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
382 return |
107 | 383 |
128 | 384 ;============================================================================= |
385 ; Do every-second tasks for the custom view area | |
107 | 386 |
128 | 387 surfcustomview_second: |
388 ; movff menupos3,WREG ; copy | |
389 ; dcfsnz WREG,F | |
390 ; bra surfcustomview_1sec_graphs ; Update the Graphs | |
391 ; dcfsnz WREG,F | |
392 ; bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List | |
393 ; dcfsnz WREG,F | |
394 ; bra surfcustomview_1sec_interval ; Update the Interval display | |
395 ; dcfsnz WREG,F | |
396 ; bra surfcustomview_1sec_cfview ; Update the critical cf view | |
397 ; ; Menupos3=0, do nothing | |
398 ; return | |
399 ;surfcustomview_1sec_cfview: ; Do nothing extra | |
400 ;surfcustomview_1sec_graphs: ; Do nothing extra | |
137 | 401 ;surfcustomview_1sec_gaslist: ; Do nothing extra |
402 ;surfcustomview_1sec_interval: ; Do nothing extra | |
107 | 403 return |
404 | |
128 | 405 ;============================================================================= |
107 | 406 |
407 surfcustomview_minute: ; Do every-minute tasks for the custom view area | |
128 | 408 movff menupos3,WREG ; copy |
409 dcfsnz WREG,F | |
107 | 410 bra surfcustomview_minute_graphs ; Update the Graphs |
128 | 411 dcfsnz WREG,F |
107 | 412 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List |
128 | 413 dcfsnz WREG,F |
111 | 414 bra surfcustomview_minute_interval ; Update the Interval display |
128 | 415 dcfsnz WREG,F |
137 | 416 bra surfcustomview_minute_cfview ; Update the critical cf view |
107 | 417 ; Menupos3=0, do nothing |
418 return | |
419 | |
420 surfcustomview_minute_graphs: | |
150 | 421 call deco_calc_desaturation_time ; calculate desaturation time |
422 movlb b'00000001' ; select ram bank 1 | |
423 call PLED_tissue_saturation_graph ; Draw/Update the graphs | |
107 | 424 return |
425 | |
111 | 426 surfcustomview_minute_interval: |
112 | 427 DISPLAYTEXT d'189' ; Surface |
428 DISPLAYTEXT d'240' ; Interval: | |
111 | 429 call PLED_interval ; Display the interval |
430 return | |
431 | |
107 | 432 surfcustomview_minute_gaslist: ; Do nothing extra |
111 | 433 surfcustomview_minute_cfview: ; Do nothing extra |
434 return |