Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/customview.asm @ 372:d8e83ef49962 64kByte Logbook
Merge fixed x-slace
author | Heinrichsweikamp |
---|---|
date | Fri, 10 Jun 2011 13:59:10 +0200 |
parents | b7940978edc9 |
children | deced1cacff7 |
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. |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
80 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
81 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
82 return |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
83 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
84 customview_1sec_average: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
85 goto PLED_total_average_show2 ; Update the figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
86 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
87 customview_1sec_stopwatch: |
295 | 88 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
|
89 goto PLED_stopwatch_show2 ; Update figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
90 |
128 | 91 customview_1sec_marker: ; Do nothing extra |
295 | 92 bsf menu3_active ; Set Flag |
128 | 93 customview_1sec_clock: ; Do nothing extra |
94 customview_1sec_lead_tiss: ; Do nothing extra | |
133 | 95 return |
96 | |
128 | 97 customview_1sec_graphs: ; Do nothing extra |
150 | 98 decfsz apnoe_mins ; 10 sec passed ? |
99 return ; No: skip. | |
100 movlw .10 ; Yes: reset counter. | |
101 movwf apnoe_mins | |
102 | |
103 call deco_calc_desaturation_time ; calculate desaturation time | |
104 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
|
105 goto PLED_tissue_saturation_graph |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
106 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
107 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
|
108 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
|
109 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
110 customview_1sec_@5: |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
111 goto PLED_show_@5 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
112 |
128 | 113 ;============================================================================= |
114 ; Do every-minute tasks for the custom view area | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
115 |
128 | 116 customview_minute: |
117 movff menupos3,WREG ; copy | |
118 dcfsnz WREG,F | |
119 bra customview_minute_stopwatch ; Update the Stopwatch | |
120 dcfsnz WREG,F | |
121 bra customview_minute_marker ; Update the Marker | |
122 dcfsnz WREG,F | |
123 bra customview_minute_clock ; Update the Clock | |
124 dcfsnz WREG,F | |
125 bra customview_minute_lead_tiss ; Update the leading tissue | |
133 | 126 dcfsnz WREG,F |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
127 bra customview_minute_average ; Update the Average depth |
128 | 128 dcfsnz WREG,F |
129 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
|
130 dcfsnz WREG,F |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
131 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
|
132 dcfsnz WREG,F |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
133 bra customview_minute_@5 ; Show TTS for extra time. |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
134 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
135 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
136 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
137 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
138 customview_minute_clock: |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
139 goto PLED_diveclock2 ; Update the clock |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
140 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
141 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
|
142 goto PLED_show_leading_tissue_2 ; Update the leading tissue |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
143 |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
144 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
|
145 customview_minute_ead_end: ; Do nothing extra |
128 | 146 customview_minute_marker: ; Do nothing extra |
147 customview_minute_stopwatch: ; Do nothing extra | |
137 | 148 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
|
149 customview_minute_graphs: ; Do nothing extra |
98
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 |
128 | 152 ;============================================================================= |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
153 ; Show next customview (and delete this flag) |
128 | 154 |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
155 customview_toggle: |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
156 bcf menu3_active ;=1: menu entry three in divemode menu is active |
119 | 157 ostc_debug 'X' ; Sends debug-information to screen if debugmode active |
137 | 158 |
159 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
160 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely | |
161 | |
128 | 162 incf menupos3,F ; Number of customview to show |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
163 movlw d'8' ; Max number |
128 | 164 cpfsgt menupos3 ; Max reached? |
165 bra customview_mask ; No, show | |
166 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
|
167 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
168 customview_mask: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
169 call PLED_clear_customview_divemode |
128 | 170 movff menupos3,WREG ; Menupos3 holds number of customview function |
171 dcfsnz WREG,F | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
172 bra customview_init_stopwatch ; Show the Stopwatch |
128 | 173 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
174 bra customview_init_marker ; Show the Marker-Menu |
128 | 175 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
176 bra customview_init_clock ; Show the clock |
128 | 177 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
178 bra customview_init_lead_tissue ; Show the leading tissue |
133 | 179 dcfsnz WREG,F |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
180 bra customview_init_average ; Show Total average depth |
128 | 181 dcfsnz WREG,F |
182 bra customview_init_graphs ; Show the graphs | |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
183 dcfsnz WREG,F |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
184 bra customview_init_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
|
185 dcfsnz WREG,F |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
186 bra customview_init_@5 ; Show TTS for extra time. |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
187 bcf tts_extra_time ; Else, CLEAR computation of @5 request. |
128 | 188 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
189 customview_init_nocustomview: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
190 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
191 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
192 customview_init_average: |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
193 call PLED_total_average_show ; Show Average with mask |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
194 bra customview_toggle_exit |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
195 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
196 customview_init_stopwatch: |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
197 GETCUSTOM8 d'51' ; Show Stopwatch? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
198 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
199 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
200 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
201 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
|
202 bsf menu3_active ; Set Flag |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
203 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
204 |
128 | 205 customview_init_marker: ; Init Marker |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
206 GETCUSTOM8 d'50' ; Show Marker? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
207 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
208 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
209 |
150 | 210 call PLED_standard_color |
211 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
|
212 bsf menu3_active ; Set Flag |
150 | 213 bra customview_toggle_exit |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
214 |
107 | 215 customview_init_clock: ; Init Clock |
150 | 216 call PLED_diveclock |
217 bra customview_toggle_exit | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
218 |
107 | 219 customview_init_lead_tissue: ; Show leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
220 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
221 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
222 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
223 |
137 | 224 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
225 bra customview_toggle ; Yes, use next Customview! | |
226 | |
150 | 227 call PLED_show_leading_tissue |
228 bra customview_toggle_exit | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
229 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
230 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
|
231 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
|
232 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
|
233 |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
234 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
|
235 bra customview_toggle_exit |
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
150
diff
changeset
|
236 |
312
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
237 customview_init_@5: |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
238 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
|
239 iorwf WREG,F ; Null ? |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
240 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
|
241 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
242 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
|
243 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
|
244 |
323 | 245 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
|
246 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
|
247 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
|
248 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
249 movlw 1 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
250 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
|
251 bsf tts_extra_time |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
252 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
|
253 |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
254 bra customview_toggle_exit |
b7e4e74c0e17
New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents:
295
diff
changeset
|
255 |
131 | 256 customview_init_graphs: ; Show tissue graph |
257 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) | |
258 decfsz WREG,F ; WREG=1? | |
259 bra customview_toggle ; No, use next Customview | |
128 | 260 |
137 | 261 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
262 bra customview_toggle ; Yes, use next Customview! | |
263 | |
150 | 264 movlw .1 ; Draw next second. |
265 movwf apnoe_mins ; 10sec counter. | |
266 | |
267 call deco_calc_desaturation_time ; calculate desaturation time | |
268 movlb b'00000001' ; select ram bank 1 | |
269 call PLED_tissue_saturation_graph | |
270 | |
271 bra customview_toggle_exit | |
272 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
273 customview_toggle_exit: |
107 | 274 bcf toggle_customview ; Clear flag |
128 | 275 ostc_debug 'Y' ; Sends debug-information to screen in debugmode |
107 | 276 return |
277 | |
128 | 278 ;============================================================================= |
279 ; Yes, show next customview (and delete this flag) | |
107 | 280 |
128 | 281 surfcustomview_toggle: |
107 | 282 incf menupos3,F ; Number of customview to show |
111 | 283 movlw d'4' ; Max number |
284 cpfsgt menupos3 ; Max reached? | |
107 | 285 bra surfcustomview_mask ; No, show |
286 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
287 surfcustomview_mask: | |
115 | 288 call PLED_clear_customview_surfmode |
128 | 289 movff menupos3,WREG ; Menupos3 holds number of customview function |
290 dcfsnz WREG,F | |
107 | 291 bra surfcustomview_init_graphs ; Show the tissue graphs |
128 | 292 dcfsnz WREG,F |
107 | 293 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list |
128 | 294 dcfsnz WREG,F |
133 | 295 bra surfcustomview_init_interval; Show the interval counter |
128 | 296 dcfsnz WREG,F |
111 | 297 bra surfcustomview_init_cfview ; Show the interval counter |
128 | 298 |
107 | 299 surfcustomview_init_nocustomview: |
300 bra surfcustomview_toggle_exit | |
301 | |
302 surfcustomview_init_graphs: | |
137 | 303 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
304 bra surfcustomview_toggle ; Yes, use next Customview! | |
305 | |
133 | 306 call PLED_tissue_saturation_graph; Draw the graphs |
107 | 307 bra surfcustomview_toggle_exit |
308 | |
309 surfcustomview_init_gaslist: | |
137 | 310 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
311 bra surfcustomview_toggle ; Yes, use next Customview! | |
312 | |
107 | 313 call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list |
314 bra surfcustomview_toggle_exit | |
315 | |
111 | 316 surfcustomview_init_interval: |
123 | 317 call PLED_standard_color |
111 | 318 DISPLAYTEXT d'189' ; Surface |
319 DISPLAYTEXT d'240' ; Interval: | |
320 call PLED_interval ; Display the interval | |
321 bra surfcustomview_toggle_exit | |
322 | |
323 surfcustomview_init_cfview: | |
324 read_int_eeprom d'34' ; Get Decomode | |
325 incf EEDATA,W ; +1 -> WREG | |
326 movwf temp10 | |
327 dcfsnz temp10,F | |
328 call PLED_show_cf11_cf12_cf29 ; =0 (ZH-L16 OC) | |
329 dcfsnz temp10,F | |
330 bra surfcustomview_toggle_exit ; =1 (Gauge) | |
331 dcfsnz temp10,F | |
332 call PLED_show_cf11_cf12_cf29 ; =2 (ZH-L16 CC) | |
333 dcfsnz temp10,F | |
334 bra surfcustomview_toggle_exit ; =3 (Apnoe) | |
335 dcfsnz temp10,F | |
336 call PLED_show_cf32_cf33_cf29 ; =4 (L16-GF OC) | |
337 dcfsnz temp10,F | |
338 call PLED_show_cf32_cf33_cf29 ; =5 (L16-GF CC) | |
339 bra surfcustomview_toggle_exit | |
340 | |
107 | 341 surfcustomview_toggle_exit: |
342 bcf toggle_customview ; Clear flag | |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
343 clrf timeout_counter2 ; Clear timeout |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
344 return |
107 | 345 |
128 | 346 ;============================================================================= |
347 ; Do every-second tasks for the custom view area | |
107 | 348 |
128 | 349 surfcustomview_second: |
350 ; movff menupos3,WREG ; copy | |
351 ; dcfsnz WREG,F | |
352 ; bra surfcustomview_1sec_graphs ; Update the Graphs | |
353 ; dcfsnz WREG,F | |
354 ; bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List | |
355 ; dcfsnz WREG,F | |
356 ; bra surfcustomview_1sec_interval ; Update the Interval display | |
357 ; dcfsnz WREG,F | |
358 ; bra surfcustomview_1sec_cfview ; Update the critical cf view | |
359 ; ; Menupos3=0, do nothing | |
360 ; return | |
361 ;surfcustomview_1sec_cfview: ; Do nothing extra | |
362 ;surfcustomview_1sec_graphs: ; Do nothing extra | |
137 | 363 ;surfcustomview_1sec_gaslist: ; Do nothing extra |
364 ;surfcustomview_1sec_interval: ; Do nothing extra | |
107 | 365 return |
366 | |
128 | 367 ;============================================================================= |
107 | 368 |
369 surfcustomview_minute: ; Do every-minute tasks for the custom view area | |
128 | 370 movff menupos3,WREG ; copy |
371 dcfsnz WREG,F | |
107 | 372 bra surfcustomview_minute_graphs ; Update the Graphs |
128 | 373 dcfsnz WREG,F |
107 | 374 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List |
128 | 375 dcfsnz WREG,F |
111 | 376 bra surfcustomview_minute_interval ; Update the Interval display |
128 | 377 dcfsnz WREG,F |
137 | 378 bra surfcustomview_minute_cfview ; Update the critical cf view |
107 | 379 ; Menupos3=0, do nothing |
380 return | |
381 | |
382 surfcustomview_minute_graphs: | |
150 | 383 call deco_calc_desaturation_time ; calculate desaturation time |
384 movlb b'00000001' ; select ram bank 1 | |
385 call PLED_tissue_saturation_graph ; Draw/Update the graphs | |
107 | 386 return |
387 | |
111 | 388 surfcustomview_minute_interval: |
112 | 389 DISPLAYTEXT d'189' ; Surface |
390 DISPLAYTEXT d'240' ; Interval: | |
111 | 391 call PLED_interval ; Display the interval |
392 return | |
393 | |
107 | 394 surfcustomview_minute_gaslist: ; Do nothing extra |
111 | 395 surfcustomview_minute_cfview: ; Do nothing extra |
396 return |