Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/customview.asm @ 143:e82e0df6d0ea
divemode gas fix
author | heinrichsweikamp |
---|---|
date | Fri, 07 Jan 2011 14:23:58 +0100 |
parents | e6aa4a74c3c2 |
children | fc699a7460e6 |
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: | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
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: |
128 | 46 bsf menu3_active ; Set Flag |
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: |
128 | 51 bsf menu3_active ; Set Flag |
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 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
76 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
77 return |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
78 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
79 customview_1sec_average: |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
80 call PLED_total_average_show2 ; Update the figures only |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
81 return |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
82 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
83 customview_1sec_stopwatch: |
128 | 84 call PLED_stopwatch_show2 ; Update figures only |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
85 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
86 |
128 | 87 customview_1sec_marker: ; Do nothing extra |
88 customview_1sec_clock: ; Do nothing extra | |
89 customview_1sec_lead_tiss: ; Do nothing extra | |
133 | 90 return |
91 | |
128 | 92 customview_1sec_graphs: ; Do nothing extra |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
93 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
94 |
128 | 95 ;============================================================================= |
96 ; Do every-minute tasks for the custom view area | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
97 |
128 | 98 customview_minute: |
99 movff menupos3,WREG ; copy | |
100 dcfsnz WREG,F | |
101 bra customview_minute_stopwatch ; Update the Stopwatch | |
102 dcfsnz WREG,F | |
103 bra customview_minute_marker ; Update the Marker | |
104 dcfsnz WREG,F | |
105 bra customview_minute_clock ; Update the Clock | |
106 dcfsnz WREG,F | |
107 bra customview_minute_lead_tiss ; Update the leading tissue | |
133 | 108 dcfsnz WREG,F |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
109 bra customview_minute_average ; Update the Average depth |
128 | 110 dcfsnz WREG,F |
111 bra customview_minute_graphs ; Update the graphs | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
112 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
113 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
114 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
115 customview_minute_clock: |
128 | 116 call PLED_diveclock2 ; Update the clock |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
117 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
118 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
119 customview_minute_lead_tiss: |
128 | 120 call PLED_show_leading_tissue_2 ; Update the leading tissue |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
121 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
122 |
134 | 123 customview_minute_graphs: |
124 call deco_calc_desaturation_time ; calculate desaturation time | |
125 movlb b'00000001' ; select ram bank 1 | |
126 call PLED_tissue_saturation_graph | |
127 return | |
128 | 128 |
129 customview_minute_marker: ; Do nothing extra | |
130 customview_minute_stopwatch: ; Do nothing extra | |
137 | 131 customview_minute_average: ; Do nothing extra |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
132 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
133 |
128 | 134 ;============================================================================= |
135 ; Yes, show next customview (and delete this flag) | |
136 | |
137 customview_toggle: | |
119 | 138 ostc_debug 'X' ; Sends debug-information to screen if debugmode active |
137 | 139 |
140 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
141 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely | |
142 | |
128 | 143 incf menupos3,F ; Number of customview to show |
137 | 144 movlw d'6' ; Max number |
128 | 145 cpfsgt menupos3 ; Max reached? |
146 bra customview_mask ; No, show | |
147 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
148 customview_mask: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
149 call PLED_clear_customview_divemode |
128 | 150 movff menupos3,WREG ; Menupos3 holds number of customview function |
151 dcfsnz WREG,F | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
152 bra customview_init_stopwatch ; Show the Stopwatch |
128 | 153 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
154 bra customview_init_marker ; Show the Marker-Menu |
128 | 155 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
156 bra customview_init_clock ; Show the clock |
128 | 157 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
158 bra customview_init_lead_tissue ; Show the leading tissue |
133 | 159 dcfsnz WREG,F |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
160 bra customview_init_average ; Show Total average depth |
128 | 161 dcfsnz WREG,F |
162 bra customview_init_graphs ; Show the graphs | |
163 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
164 customview_init_nocustomview: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
165 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
166 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
167 customview_init_average: |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
168 call PLED_total_average_show ; Show Average with mask |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
169 bra customview_toggle_exit |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
170 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
171 customview_init_stopwatch: |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
172 GETCUSTOM8 d'51' ; Show Stopwatch? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
173 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
174 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
175 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
176 call PLED_stopwatch_show ; Init Stopwatch display |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
177 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
178 |
128 | 179 customview_init_marker: ; Init Marker |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
180 GETCUSTOM8 d'50' ; Show Marker? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
181 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
182 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
183 |
128 | 184 call PLED_standard_color |
107 | 185 DISPLAYTEXT d'151' ; Set Marker? |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
186 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
187 |
107 | 188 customview_init_clock: ; Init Clock |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
189 call PLED_diveclock |
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 |
107 | 192 customview_init_lead_tissue: ; Show leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
193 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
194 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
195 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
196 |
137 | 197 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
198 bra customview_toggle ; Yes, use next Customview! | |
199 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
200 call PLED_show_leading_tissue |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
201 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
202 |
131 | 203 customview_init_graphs: ; Show tissue graph |
204 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) | |
205 decfsz WREG,F ; WREG=1? | |
206 bra customview_toggle ; No, use next Customview | |
128 | 207 |
137 | 208 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
209 bra customview_toggle ; Yes, use next Customview! | |
210 | |
134 | 211 call deco_calc_desaturation_time ; calculate desaturation time |
212 movlb b'00000001' ; select ram bank 1 | |
133 | 213 call PLED_tissue_saturation_graph |
214 bra customview_toggle_exit | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
215 customview_toggle_exit: |
107 | 216 bcf toggle_customview ; Clear flag |
128 | 217 ostc_debug 'Y' ; Sends debug-information to screen in debugmode |
107 | 218 return |
219 | |
128 | 220 ;============================================================================= |
221 ; Yes, show next customview (and delete this flag) | |
107 | 222 |
128 | 223 surfcustomview_toggle: |
107 | 224 incf menupos3,F ; Number of customview to show |
111 | 225 movlw d'4' ; Max number |
226 cpfsgt menupos3 ; Max reached? | |
107 | 227 bra surfcustomview_mask ; No, show |
228 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
229 surfcustomview_mask: | |
115 | 230 call PLED_clear_customview_surfmode |
128 | 231 movff menupos3,WREG ; Menupos3 holds number of customview function |
232 dcfsnz WREG,F | |
107 | 233 bra surfcustomview_init_graphs ; Show the tissue graphs |
128 | 234 dcfsnz WREG,F |
107 | 235 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list |
128 | 236 dcfsnz WREG,F |
133 | 237 bra surfcustomview_init_interval; Show the interval counter |
128 | 238 dcfsnz WREG,F |
111 | 239 bra surfcustomview_init_cfview ; Show the interval counter |
128 | 240 |
107 | 241 surfcustomview_init_nocustomview: |
242 bra surfcustomview_toggle_exit | |
243 | |
244 surfcustomview_init_graphs: | |
137 | 245 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
246 bra surfcustomview_toggle ; Yes, use next Customview! | |
247 | |
133 | 248 call PLED_tissue_saturation_graph; Draw the graphs |
107 | 249 bra surfcustomview_toggle_exit |
250 | |
251 surfcustomview_init_gaslist: | |
137 | 252 btfsc no_deco_customviews ; no-deco-mode-flag = 1 |
253 bra surfcustomview_toggle ; Yes, use next Customview! | |
254 | |
107 | 255 call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list |
256 bra surfcustomview_toggle_exit | |
257 | |
111 | 258 surfcustomview_init_interval: |
123 | 259 call PLED_standard_color |
111 | 260 DISPLAYTEXT d'189' ; Surface |
261 DISPLAYTEXT d'240' ; Interval: | |
262 call PLED_interval ; Display the interval | |
263 bra surfcustomview_toggle_exit | |
264 | |
265 surfcustomview_init_cfview: | |
266 read_int_eeprom d'34' ; Get Decomode | |
267 incf EEDATA,W ; +1 -> WREG | |
268 movwf temp10 | |
269 dcfsnz temp10,F | |
270 call PLED_show_cf11_cf12_cf29 ; =0 (ZH-L16 OC) | |
271 dcfsnz temp10,F | |
272 bra surfcustomview_toggle_exit ; =1 (Gauge) | |
273 dcfsnz temp10,F | |
274 call PLED_show_cf11_cf12_cf29 ; =2 (ZH-L16 CC) | |
275 dcfsnz temp10,F | |
276 bra surfcustomview_toggle_exit ; =3 (Apnoe) | |
277 dcfsnz temp10,F | |
278 call PLED_show_cf32_cf33_cf29 ; =4 (L16-GF OC) | |
279 dcfsnz temp10,F | |
280 call PLED_show_cf32_cf33_cf29 ; =5 (L16-GF CC) | |
281 bra surfcustomview_toggle_exit | |
282 | |
107 | 283 surfcustomview_toggle_exit: |
284 bcf toggle_customview ; Clear flag | |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
285 clrf timeout_counter2 ; Clear timeout |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
286 return |
107 | 287 |
128 | 288 ;============================================================================= |
289 ; Do every-second tasks for the custom view area | |
107 | 290 |
128 | 291 surfcustomview_second: |
292 ; movff menupos3,WREG ; copy | |
293 ; dcfsnz WREG,F | |
294 ; bra surfcustomview_1sec_graphs ; Update the Graphs | |
295 ; dcfsnz WREG,F | |
296 ; bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List | |
297 ; dcfsnz WREG,F | |
298 ; bra surfcustomview_1sec_interval ; Update the Interval display | |
299 ; dcfsnz WREG,F | |
300 ; bra surfcustomview_1sec_cfview ; Update the critical cf view | |
301 ; ; Menupos3=0, do nothing | |
302 ; return | |
303 ;surfcustomview_1sec_cfview: ; Do nothing extra | |
304 ;surfcustomview_1sec_graphs: ; Do nothing extra | |
137 | 305 ;surfcustomview_1sec_gaslist: ; Do nothing extra |
306 ;surfcustomview_1sec_interval: ; Do nothing extra | |
107 | 307 return |
308 | |
128 | 309 ;============================================================================= |
107 | 310 |
311 surfcustomview_minute: ; Do every-minute tasks for the custom view area | |
128 | 312 movff menupos3,WREG ; copy |
313 dcfsnz WREG,F | |
107 | 314 bra surfcustomview_minute_graphs ; Update the Graphs |
128 | 315 dcfsnz WREG,F |
107 | 316 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List |
128 | 317 dcfsnz WREG,F |
111 | 318 bra surfcustomview_minute_interval ; Update the Interval display |
128 | 319 dcfsnz WREG,F |
137 | 320 bra surfcustomview_minute_cfview ; Update the critical cf view |
107 | 321 ; Menupos3=0, do nothing |
322 return | |
323 | |
324 surfcustomview_minute_graphs: | |
325 call PLED_tissue_saturation_graph ; Draw/Update the graphs | |
326 return | |
327 | |
111 | 328 surfcustomview_minute_interval: |
112 | 329 DISPLAYTEXT d'189' ; Surface |
330 DISPLAYTEXT d'240' ; Interval: | |
111 | 331 call PLED_interval ; Display the interval |
332 return | |
333 | |
107 | 334 surfcustomview_minute_gaslist: ; Do nothing extra |
111 | 335 surfcustomview_minute_cfview: ; Do nothing extra |
336 return |