Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/customview.asm @ 128:4c588c3d1f12
Saturation graphs in customview divemode
author | JeanDo |
---|---|
date | Tue, 04 Jan 2011 15:14:42 +0100 |
parents | 6a94f96e9cea |
children | 03df42de03e1 |
comparison
equal
deleted
inserted
replaced
127:245de99d1d15 | 128:4c588c3d1f12 |
---|---|
16 | 16 |
17 | 17 |
18 ; Customviews for divemode | 18 ; Customviews for divemode |
19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com | 19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com |
20 ; written: 101212 | 20 ; written: 101212 |
21 ; last updated: 101212 | 21 ; history: |
22 ; 2010-12-12: [MH] last updated | |
23 ; 2011-01-04: [jDG] Saturation graphs in customview divemode | |
22 ; known bugs: | 24 ; known bugs: |
23 ; ToDo: | 25 ; ToDo: |
24 | 26 |
25 customview_menu_entry3: ; Show the customview-dependent entry for the divemode menu | 27 ;============================================================================= |
28 ; Show the customview-dependent entry for the divemode menu | |
29 ; | |
30 customview_menu_entry3: | |
26 bcf menu3_active ;=1: menu entry three in divemode menu is active | 31 bcf menu3_active ;=1: menu entry three in divemode menu is active |
27 movff menupos3,temp1 ; copy | 32 |
28 dcfsnz temp1,F | 33 movff menupos3,WREG ; copy |
29 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu | 34 dcfsnz WREG,F |
30 dcfsnz temp1,F | 35 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu |
31 bra customview_menu3_marker ; Show the marker option in divemode menu | 36 dcfsnz WREG,F |
32 dcfsnz temp1,F | 37 bra customview_menu3_marker ; Show the marker option in divemode menu |
33 bra customview_menu3_clock ; Show the clock option in divemode menu | 38 dcfsnz WREG,F |
34 dcfsnz temp1,F | 39 bra customview_menu3_clock ; Show the clock option in divemode menu |
35 bra customview_menu3_lead_tiss ; Show the leading tissue option in divemode menu | 40 dcfsnz WREG,F |
41 bra customview_menu3_lead_tiss ; Show the leading tissue option in divemode menu | |
36 ; Menupos3=0, do nothing | 42 ; Menupos3=0, do nothing |
37 return | 43 return |
38 | 44 |
39 customview_menu3_stopwatch: | 45 customview_menu3_stopwatch: |
40 bsf menu3_active ; Set Flag | 46 bsf menu3_active ; Set Flag |
41 DISPLAYTEXT .33 ; ResetAvr | 47 DISPLAYTEXT .33 ; ResetAvr |
42 return | 48 return |
43 | 49 |
44 customview_menu3_marker: | 50 customview_menu3_marker: |
45 bsf menu3_active ; Set Flag | 51 bsf menu3_active ; Set Flag |
46 DISPLAYTEXT .30 ; Set Marker | 52 DISPLAYTEXT .30 ; Set Marker |
47 return | 53 return |
48 | 54 |
49 customview_menu3_clock: ; No menu entry | 55 customview_menu3_clock: ; No menu entry |
50 customview_menu3_lead_tiss ; No menu entry | 56 customview_menu3_lead_tiss ; No menu entry |
51 return | 57 return |
52 | 58 |
53 customview_second: ; Do every-second tasks for the custom view area | 59 ;============================================================================= |
54 movff menupos3,temp1 ; copy | 60 ; Do every-second tasks for the custom view area |
55 dcfsnz temp1,F | 61 |
56 bra customview_1sec_stopwatch ; Update the Stopwatch | 62 customview_second: |
57 dcfsnz temp1,F | 63 movff menupos3,WREG ; copy |
58 bra customview_1sec_marker ; Update the Marker | 64 dcfsnz WREG,F |
59 dcfsnz temp1,F | 65 bra customview_1sec_stopwatch ; Update the Stopwatch |
60 bra customview_1sec_clock ; Update the Clock | 66 dcfsnz WREG,F |
61 dcfsnz temp1,F | 67 bra customview_1sec_marker ; Update the Marker |
62 bra customview_1sec_lead_tiss ; Update the leading tissue | 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 | |
72 dcfsnz WREG,F | |
73 bra customview_1sec_graphs ; Update the leading tissue | |
63 ; Menupos3=0, do nothing | 74 ; Menupos3=0, do nothing |
64 return | 75 return |
65 | 76 |
66 customview_1sec_stopwatch: | 77 customview_1sec_stopwatch: |
67 call PLED_stopwatch_show2 ; Update figures only | 78 call PLED_stopwatch_show2 ; Update figures only |
68 return | 79 return |
69 | 80 |
70 customview_1sec_marker: ; Do nothing extra | 81 customview_1sec_marker: ; Do nothing extra |
71 customview_1sec_lead_tiss: ; Do nothing extra | 82 customview_1sec_clock: ; Do nothing extra |
72 customview_1sec_clock: ; Do nothing extra | 83 customview_1sec_lead_tiss: ; Do nothing extra |
73 return | 84 customview_1sec_graphs: ; Do nothing extra |
74 | 85 return |
75 | 86 |
76 customview_minute: ; Do every-minute tasks for the custom view area | 87 ;============================================================================= |
77 movff menupos3,temp1 ; copy | 88 ; Do every-minute tasks for the custom view area |
78 dcfsnz temp1,F | 89 |
79 bra customview_minute_stopwatch ; Update the Stopwatch | 90 customview_minute: |
80 dcfsnz temp1,F | 91 movff menupos3,WREG ; copy |
81 bra customview_minute_marker ; Update the Marker | 92 dcfsnz WREG,F |
82 dcfsnz temp1,F | 93 bra customview_minute_stopwatch ; Update the Stopwatch |
83 bra customview_minute_clock ; Update the Clock | 94 dcfsnz WREG,F |
84 dcfsnz temp1,F | 95 bra customview_minute_marker ; Update the Marker |
85 bra customview_minute_lead_tiss ; Update the leading tissue | 96 dcfsnz WREG,F |
97 bra customview_minute_clock ; Update the Clock | |
98 dcfsnz WREG,F | |
99 bra customview_minute_lead_tiss ; Update the leading tissue | |
100 dcfsnz WREG,F | |
101 bra customview_minute_graphs ; Update the graphs | |
86 ; Menupos3=0, do nothing | 102 ; Menupos3=0, do nothing |
87 return | 103 return |
88 | 104 |
89 customview_minute_clock: | 105 customview_minute_clock: |
90 call PLED_diveclock2 ; Update the clock | 106 call PLED_diveclock2 ; Update the clock |
91 return | 107 return |
92 | 108 |
93 customview_minute_lead_tiss: | 109 customview_minute_lead_tiss: |
94 call PLED_show_leading_tissue_2 ; Update the leading tissue | 110 call PLED_show_leading_tissue_2 ; Update the leading tissue |
95 return | 111 return |
96 | 112 |
97 customview_minute_marker: ; Do nothing extra | 113 customview_minute_graphs: |
98 customview_minute_stopwatch: ; Do nothing extra | 114 call PLED_tissue_saturation_graph |
99 return | 115 return |
100 | 116 |
101 customview_toggle: ; Yes, show next customview (and delete this flag) | 117 customview_minute_marker: ; Do nothing extra |
118 customview_minute_stopwatch: ; Do nothing extra | |
119 return | |
120 | |
121 ;============================================================================= | |
122 ; Yes, show next customview (and delete this flag) | |
123 | |
124 customview_toggle: | |
102 ostc_debug 'X' ; Sends debug-information to screen if debugmode active | 125 ostc_debug 'X' ; Sends debug-information to screen if debugmode active |
103 incf menupos3,F ; Number of customview to show | 126 incf menupos3,F ; Number of customview to show |
104 movlw d'4' ; Max number | 127 movlw d'5' ; Max number |
105 cpfsgt menupos3 ; Max reached? | 128 cpfsgt menupos3 ; Max reached? |
106 bra customview_mask ; No, show | 129 bra customview_mask ; No, show |
107 clrf menupos3 ; Reset to zero (Zero=no custom view) | 130 clrf menupos3 ; Reset to zero (Zero=no custom view) |
108 customview_mask: | 131 customview_mask: |
109 call PLED_clear_customview_divemode | 132 call PLED_clear_customview_divemode |
110 movff menupos3,temp1 ; Menupos3 holds number of customview function | 133 movff menupos3,WREG ; Menupos3 holds number of customview function |
111 dcfsnz temp1,F | 134 dcfsnz WREG,F |
112 bra customview_init_stopwatch ; Show the Stopwatch | 135 bra customview_init_stopwatch ; Show the Stopwatch |
113 dcfsnz temp1,F | 136 dcfsnz WREG,F |
114 bra customview_init_marker ; Show the Marker-Menu | 137 bra customview_init_marker ; Show the Marker-Menu |
115 dcfsnz temp1,F | 138 dcfsnz WREG,F |
116 bra customview_init_clock ; Show the clock | 139 bra customview_init_clock ; Show the clock |
117 dcfsnz temp1,F | 140 dcfsnz WREG,F |
118 bra customview_init_lead_tissue ; Show the leading tissue | 141 bra customview_init_lead_tissue ; Show the leading tissue |
119 ; bra customview_init_nocustomview ; menupos3=0 -> No Customview | 142 dcfsnz WREG,F |
143 bra customview_init_graphs ; Show the graphs | |
144 | |
120 customview_init_nocustomview: | 145 customview_init_nocustomview: |
121 bra customview_toggle_exit | 146 bra customview_toggle_exit |
122 | 147 |
123 customview_init_stopwatch: | 148 customview_init_stopwatch: |
124 ; Init Stopwatch | 149 ; Init Stopwatch |
125 call PLED_stopwatch_show | 150 call PLED_stopwatch_show |
126 bra customview_toggle_exit | 151 bra customview_toggle_exit |
127 | 152 |
128 customview_init_marker: ; Init Marker | 153 customview_init_marker: ; Init Marker |
154 call PLED_standard_color | |
129 DISPLAYTEXT d'151' ; Set Marker? | 155 DISPLAYTEXT d'151' ; Set Marker? |
130 bra customview_toggle_exit | 156 bra customview_toggle_exit |
131 | 157 |
132 customview_init_clock: ; Init Clock | 158 customview_init_clock: ; Init Clock |
133 call PLED_diveclock | 159 call PLED_diveclock |
135 | 161 |
136 customview_init_lead_tissue: ; Show leading tissue | 162 customview_init_lead_tissue: ; Show leading tissue |
137 call PLED_show_leading_tissue | 163 call PLED_show_leading_tissue |
138 bra customview_toggle_exit | 164 bra customview_toggle_exit |
139 | 165 |
166 customview_init_graphs: ; Show graphs | |
167 call PLED_tissue_saturation_graph | |
168 bra customview_toggle_exit | |
169 | |
140 customview_toggle_exit: | 170 customview_toggle_exit: |
141 bcf toggle_customview ; Clear flag | 171 bcf toggle_customview ; Clear flag |
142 ostc_debug 'Y' ; Sends debug-information to screen if debugmode active | 172 ostc_debug 'Y' ; Sends debug-information to screen in debugmode |
143 return | 173 return |
144 | 174 |
145 | 175 ;============================================================================= |
146 | 176 ; Yes, show next customview (and delete this flag) |
147 surfcustomview_toggle: ; Yes, show next customview (and delete this flag) | 177 |
178 surfcustomview_toggle: | |
148 incf menupos3,F ; Number of customview to show | 179 incf menupos3,F ; Number of customview to show |
149 movlw d'4' ; Max number | 180 movlw d'4' ; Max number |
150 cpfsgt menupos3 ; Max reached? | 181 cpfsgt menupos3 ; Max reached? |
151 bra surfcustomview_mask ; No, show | 182 bra surfcustomview_mask ; No, show |
152 clrf menupos3 ; Reset to zero (Zero=no custom view) | 183 clrf menupos3 ; Reset to zero (Zero=no custom view) |
153 surfcustomview_mask: | 184 surfcustomview_mask: |
154 call PLED_clear_customview_surfmode | 185 call PLED_clear_customview_surfmode |
155 movff menupos3,temp1 ; Menupos3 holds number of customview function | 186 movff menupos3,WREG ; Menupos3 holds number of customview function |
156 dcfsnz temp1,F | 187 dcfsnz WREG,F |
157 bra surfcustomview_init_graphs ; Show the tissue graphs | 188 bra surfcustomview_init_graphs ; Show the tissue graphs |
158 dcfsnz temp1,F | 189 dcfsnz WREG,F |
159 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list | 190 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list |
160 dcfsnz temp1,F | 191 dcfsnz WREG,F |
161 bra surfcustomview_init_interval ; Show the interval counter | 192 bra surfcustomview_init_interval ; Show the interval counter |
162 dcfsnz temp1,F | 193 dcfsnz WREG,F |
163 bra surfcustomview_init_cfview ; Show the interval counter | 194 bra surfcustomview_init_cfview ; Show the interval counter |
164 ; bra surfcustomview_init_nocustomview ; menupos3=0 -> No Customview | 195 |
165 surfcustomview_init_nocustomview: | 196 surfcustomview_init_nocustomview: |
166 bra surfcustomview_toggle_exit | 197 bra surfcustomview_toggle_exit |
167 | 198 |
168 surfcustomview_init_graphs: | 199 surfcustomview_init_graphs: |
169 call PLED_tissue_saturation_graph ; Draw the graphs | 200 call PLED_tissue_saturation_graph ; Draw the graphs |
198 call PLED_show_cf32_cf33_cf29 ; =5 (L16-GF CC) | 229 call PLED_show_cf32_cf33_cf29 ; =5 (L16-GF CC) |
199 bra surfcustomview_toggle_exit | 230 bra surfcustomview_toggle_exit |
200 | 231 |
201 surfcustomview_toggle_exit: | 232 surfcustomview_toggle_exit: |
202 bcf toggle_customview ; Clear flag | 233 bcf toggle_customview ; Clear flag |
203 | 234 bra surfcustomview_second |
204 | 235 |
205 | 236 ;============================================================================= |
206 | 237 ; Do every-second tasks for the custom view area |
207 surfcustomview_second: ; Do every-second tasks for the custom view area | 238 |
208 movff menupos3,temp1 ; copy | 239 surfcustomview_second: |
209 dcfsnz temp1,F | 240 ; movff menupos3,WREG ; copy |
210 bra surfcustomview_1sec_graphs ; Update the Graphs | 241 ; dcfsnz WREG,F |
211 dcfsnz temp1,F | 242 ; bra surfcustomview_1sec_graphs ; Update the Graphs |
212 bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List | 243 ; dcfsnz WREG,F |
213 dcfsnz temp1,F | 244 ; bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List |
214 bra surfcustomview_1sec_interval ; Update the Interval display | 245 ; dcfsnz WREG,F |
215 dcfsnz temp1,F | 246 ; bra surfcustomview_1sec_interval ; Update the Interval display |
216 bra surfcustomview_1sec_cfview ; Update the critical cf view | 247 ; dcfsnz WREG,F |
217 ; Menupos3=0, do nothing | 248 ; bra surfcustomview_1sec_cfview ; Update the critical cf view |
218 return | 249 ; ; Menupos3=0, do nothing |
219 surfcustomview_1sec_cfview: ; Do nothing extra | 250 ; return |
220 surfcustomview_1sec_graphs: ; Do nothing extra | 251 ;surfcustomview_1sec_cfview: ; Do nothing extra |
221 surfcustomview_1sec_gaslist: ; Do nothing extra | 252 ;surfcustomview_1sec_graphs: ; Do nothing extra |
222 surfcustomview_1sec_interval: ; Do nothing extra | 253 ;surfcustomview_1sec_gaslist: ; Do nothing extra |
223 return | 254 ;surfcustomview_1sec_interval: ; Do nothing extra |
224 | 255 return |
256 | |
257 ;============================================================================= | |
225 | 258 |
226 surfcustomview_minute: ; Do every-minute tasks for the custom view area | 259 surfcustomview_minute: ; Do every-minute tasks for the custom view area |
227 movff menupos3,temp1 ; copy | 260 movff menupos3,WREG ; copy |
228 dcfsnz temp1,F | 261 dcfsnz WREG,F |
229 bra surfcustomview_minute_graphs ; Update the Graphs | 262 bra surfcustomview_minute_graphs ; Update the Graphs |
230 dcfsnz temp1,F | 263 dcfsnz WREG,F |
231 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List | 264 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List |
232 dcfsnz temp1,F | 265 dcfsnz WREG,F |
233 bra surfcustomview_minute_interval ; Update the Interval display | 266 bra surfcustomview_minute_interval ; Update the Interval display |
234 dcfsnz temp1,F | 267 dcfsnz WREG,F |
235 bra surfcustomview_minute_cfview ; Update the critical cf view | 268 bra surfcustomview_minute_cfview ; Update the critical cf view |
236 ; Menupos3=0, do nothing | 269 ; Menupos3=0, do nothing |
237 return | 270 return |
238 | 271 |
239 surfcustomview_minute_graphs: | 272 surfcustomview_minute_graphs: |