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