Mercurial > public > hwos_code
annotate src/customview.asm @ 502:0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
NEW: More customviews in surface mode for PSCR mode
BUGFIX: several minor graphic issues in logbook fixed
author | heinrichsweikamp |
---|---|
date | Fri, 09 Jun 2017 14:47:02 +0200 |
parents | 18e047102e49 |
children | 4542d03f748a |
rev | line source |
---|---|
0 | 1 ;============================================================================= |
2 ; | |
3 ; File customview.asm | |
4 ; | |
5 ; Customview in Surfacemode and Divemode | |
6 ; | |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | |
8 ;============================================================================= | |
9 ; HISTORY | |
10 ; 2011-08-10 : [mH] moving from OSTC code | |
11 | |
12 ;============================================================================= | |
13 | |
275 | 14 #include "hwos.inc" ; Mandatory header |
0 | 15 #include "tft_outputs.inc" |
16 #include "strings.inc" | |
17 #include "tft.inc" | |
18 #include "isr.inc" | |
19 #include "wait.inc" | |
20 #include "surfmode.inc" | |
21 #include "convert.inc" | |
22 #include "divemode.inc" | |
23 #include "i2c.inc" | |
24 | |
25 gui CODE | |
26 | |
27 ;============================================================================= | |
28 ; Do every-second tasks for the custom view area (Dive mode) | |
29 | |
30 global customview_second | |
31 customview_second: | |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
32 movff menupos3,WREG ; copy current view (1-...) |
0 | 33 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
34 goto TFT_update_ppo2_sensors ; Update Sensor data ; and return |
0 | 35 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
36 goto TFT_update_avr_stopwatch ; Update average depth and stopwatch; and return |
0 | 37 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
38 goto TFT_decoplan ; Show decoplan ; and return |
0 | 39 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
40 goto TFT_battinfo_tissues_clock ; Update Battery, Tissues and clock ; and return |
0 | 41 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
42 goto TFT_gf_info ; Update GF informations ; and return |
53
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
43 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
44 return ; Compass updated seperately (Faster) in divemode; |
53
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
45 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
46 goto TFT_dyn_gaslist ; Update the gaslist ; and return |
102
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
47 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
48 goto TFT_hud_voltages ; Show HUD details ; and return |
123 | 49 dcfsnz WREG,F |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
50 bra customview_1sec_view9 ; Make sure to change value in "check_ppo2_display:" when moving around custom views |
413
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
51 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
52 goto TFT_sensor_check ; Show ppO2 of O2 and Diluent ; and return |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
53 dcfsnz WREG,F |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
471
diff
changeset
|
54 goto TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS; and return |
482
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
55 dcfsnz WREG,F |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
56 goto TFT_pscr_info ; Show ppO2, drop and lung ratio; and return |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
57 |
0 | 58 ; Menupos3=0, do nothing |
59 return | |
60 | |
123 | 61 customview_1sec_view9: ; Ceiling |
62 call TFT_ceiling ; Show Ceiling | |
333
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
63 ; ppO2 value |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
64 call TFT_display_ppo2_val |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
65 ; current GF value |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
66 extern char_I_deco_model |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
67 TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
68 return ; No GF info for non-GF modes |
428 | 69 goto TFT_gf_info ; Update GF informations ; and return |
123 | 70 |
413
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
71 |
0 | 72 |
73 ;============================================================================= | |
74 ; Do every-minute tasks for the custom view area | |
75 | |
76 global customview_minute | |
77 customview_minute: | |
78 return | |
79 ; movff menupos3,WREG ; copy | |
80 ; dcfsnz WREG,F | |
81 ; bra customview_1min_view1 | |
82 ; dcfsnz WREG,F | |
83 ; bra customview_1min_view2 | |
84 ; dcfsnz WREG,F | |
85 ; bra customview_1min_view3 | |
86 ; dcfsnz WREG,F | |
87 ; bra customview_1min_view4 | |
88 ; dcfsnz WREG,F | |
89 ; bra customview_1min_view5 | |
90 ; dcfsnz WREG,F | |
91 ; bra customview_1min_view6 | |
92 ; dcfsnz WREG,F | |
93 ; bra customview_1min_view7 | |
94 ; dcfsnz WREG,F | |
95 ; bra customview_1min_view8 | |
96 ; dcfsnz WREG,F | |
97 ; bra customview_1min_view9 | |
98 ; dcfsnz WREG,F | |
99 ; bra customview_1min_view10 | |
100 ; dcfsnz WREG,F | |
101 ; bra customview_1min_view11 | |
102 ; ; Menupos3=0, do nothing | |
103 ; return | |
104 ; | |
105 ;customview_1min_view1: | |
106 ;customview_1min_view2: | |
107 ;customview_1min_view3: | |
108 ;customview_1min_view4: | |
109 ;customview_1min_view5: | |
110 ;customview_1min_view6: | |
111 ;customview_1min_view7: | |
112 ;customview_1min_view8: | |
113 ;customview_1min_view9: | |
114 ;customview_1min_view10: | |
115 ;customview_1min_view11: | |
116 ; return | |
117 | |
118 global surf_customview_toggle | |
119 surf_customview_toggle: | |
120 bcf switch_right | |
121 incf menupos3,F ; Number of customview to show | |
41 | 122 movlw d'7' ; Max number of customsviews in surface mode |
0 | 123 cpfsgt menupos3 ; Max reached? |
124 bra surf_customview_mask ; No, show | |
125 movlw .1 | |
126 movwf menupos3 ; Reset to one (Always one custom view visible) | |
127 | |
128 global surf_customview_mask | |
129 surf_customview_mask: | |
48 | 130 WIN_BOX_BLACK .50,surf_warning1_row-1, .0, surf_decotype_column-.1 ; top, bottom, left, right |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
131 ; Prepare title |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
132 WIN_TINY surf_customview_title_column,surf_customview_title_row |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
133 WIN_COLOR color_greenish |
0 | 134 movff menupos3,WREG ; Menupos3 holds number of customview function |
135 dcfsnz WREG,F | |
136 bra surf_customview_init_view1 ; OC Gas list | |
137 dcfsnz WREG,F | |
138 bra surf_customview_init_view2 ; CC Dil list | |
139 dcfsnz WREG,F | |
140 bra surf_customview_init_view3 ; CC SP list | |
141 dcfsnz WREG,F | |
142 bra surf_customview_init_view4 ; Custom Text | |
143 dcfsnz WREG,F | |
144 bra surf_customview_init_view5 ; Tissue Diagram | |
41 | 145 dcfsnz WREG,F |
0 | 146 bra surf_customview_init_view6 ; Compass |
41 | 147 dcfsnz WREG,F |
148 bra surf_customview_init_view7 ; Deco settings | |
0 | 149 |
150 call I2C_sleep_accelerometer ; Stop accelerometer | |
151 call I2C_sleep_compass ; Stop compass | |
152 | |
153 movlw .1 | |
154 movwf menupos3 ; Reset to one (Always one custom view visible) | |
155 | |
156 surf_customview_init_view1: ; View1: OC Gas list | |
157 btfsc FLAG_gauge_mode | |
158 bra surf_customview_toggle | |
159 btfsc FLAG_apnoe_mode | |
160 bra surf_customview_toggle | |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
161 btfsc FLAG_ccr_mode |
502
0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents:
485
diff
changeset
|
162 bra surf_customview_init_view1_bail ; Bailout version of "OC Gas List" |
0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents:
485
diff
changeset
|
163 btfsc FLAG_pscr_mode |
0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents:
485
diff
changeset
|
164 bra surf_customview_init_view1_bail ; Bailout version of "OC Gas List" |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
165 STRCPY_TEXT_PRINT tGaslist ; Title of customview |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
166 call TFT_standard_color |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
167 call TFT_gaslist_surfmode ; Show gas list |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
168 bra customview_toggle_exit ; Done. |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
169 |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
170 surf_customview_init_view1_bail: |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
171 STRCPY_TEXT_PRINT tDiveBailout ; Title of customview |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
172 call TFT_standard_color |
0 | 173 call TFT_gaslist_surfmode ; Show gas list |
174 bra customview_toggle_exit ; Done. | |
175 | |
176 surf_customview_init_view2: ; View2: CC Dil list | |
502
0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents:
485
diff
changeset
|
177 btfsc FLAG_pscr_mode |
0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents:
485
diff
changeset
|
178 bra surf_customview_init_view2_2 |
0 | 179 btfss FLAG_ccr_mode |
180 bra surf_customview_toggle | |
181 btfsc FLAG_gauge_mode | |
182 bra surf_customview_toggle | |
183 btfsc FLAG_apnoe_mode | |
184 bra surf_customview_toggle | |
502
0910c227018f
BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents:
485
diff
changeset
|
185 surf_customview_init_view2_2: |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
186 STRCPY_TEXT_PRINT tGaslistCC ; Title of customview |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
187 call TFT_standard_color |
0 | 188 call TFT_dillist_surfmode ; Show diluent list |
189 bra customview_toggle_exit ; Done. | |
190 | |
191 surf_customview_init_view3: ; View3: CC SP list | |
192 btfss FLAG_ccr_mode | |
193 bra surf_customview_toggle | |
194 btfsc FLAG_gauge_mode | |
195 bra surf_customview_toggle | |
196 btfsc FLAG_apnoe_mode | |
197 bra surf_customview_toggle | |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
198 STRCPY_TEXT_PRINT tFixedSetpoints ; Title of customview |
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
199 call TFT_standard_color |
0 | 200 call TFT_splist_surfmode ; Show Setpoint list |
201 bra customview_toggle_exit ; Done. | |
202 | |
203 surf_customview_init_view4: ; View4: Custom text | |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
204 call TFT_standard_color |
0 | 205 call TFT_custom_text ; Show the custom text |
206 bra customview_toggle_exit ; Done. | |
207 | |
208 surf_customview_init_view5: ; View5: Tissue Diagram | |
209 btfsc FLAG_gauge_mode | |
210 bra surf_customview_toggle | |
211 btfsc FLAG_apnoe_mode | |
212 bra surf_customview_toggle | |
188
ebc28381f17d
NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents:
184
diff
changeset
|
213 call TFT_standard_color |
0 | 214 call TFT_surface_tissues ; Show Tissue diagram |
215 bra customview_toggle_exit ; Done. | |
216 | |
217 surf_customview_init_view6: ; View6: Compass | |
218 call I2C_init_accelerometer ; Start accelerometer | |
219 call I2C_init_compass ; Start compass | |
256
5b4ef0b9090d
place compass display code into compass_ops.asm
heinrichsweikamp
parents:
254
diff
changeset
|
220 extern TFT_surface_compass_mask |
0 | 221 call TFT_surface_compass_mask ; Show compass |
222 bra customview_toggle_exit ; Done. | |
41 | 223 surf_customview_init_view7: |
224 btfsc FLAG_gauge_mode | |
225 bra surf_customview_toggle | |
226 btfsc FLAG_apnoe_mode | |
227 bra surf_customview_toggle | |
228 extern deco_setup_dive | |
229 call deco_setup_dive | |
230 call TFT_surface_decosettings ; Show all deco settings | |
231 bra customview_toggle_exit ; Done. | |
0 | 232 |
233 global menuview_toggle | |
234 menuview_toggle: ; Show Menu or the simulator tasks | |
235 movlw divemode_menuview_timeout | |
236 movwf timeout_counter3 | |
237 bsf menuview | |
238 bcf switch_left | |
239 incf menupos2,F ; Number of options to show | |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
240 movlw d'9' ; Max number of options in divemode |
0 | 241 cpfsgt menupos2 ; Max reached? |
242 bra menuview_mask ; No, show | |
243 global menuview_toggle_reset | |
244 menuview_toggle_reset: ; Timeout occured | |
245 clrf menupos2 | |
246 bcf menuview | |
247 menuview_mask: | |
300
5ad479f2a868
Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents:
275
diff
changeset
|
248 WIN_BOX_BLACK dm_simtext_row, dm_simtext_row+.23, dm_simtext_column, dm_simtext_column+.49 ; top, bottom, left, right |
0 | 249 btfss FLAG_gauge_mode |
250 bra menuview_mask2 | |
315
4f83470dcece
VSIbar #3: remaining changes for the split style bar
Janos Kovacs <kovjanos@gmail.com>
parents:
300
diff
changeset
|
251 ; Clear some more in gauge mode -- "Reset Avg." text is longer than normal simtext |
300
5ad479f2a868
Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents:
275
diff
changeset
|
252 WIN_BOX_BLACK dm_simtext_row, dm_simtext_row+.23, dm_simtext_column+.50, dm_simtext_column+.70 ; top, bottom, left, right |
327
ca5df826437a
Small fix for the custom grid layout
janos_kovacs <kovjanos@gmail.com>
parents:
315
diff
changeset
|
253 menuview_mask2: |
315
4f83470dcece
VSIbar #3: remaining changes for the split style bar
Janos Kovacs <kovjanos@gmail.com>
parents:
300
diff
changeset
|
254 call TFT_draw_gassep_line |
0 | 255 movlw color_yellow |
256 call TFT_set_color | |
189
e79bc535ef9e
ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents:
188
diff
changeset
|
257 bsf win_invert ; Set invert flag |
300
5ad479f2a868
Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents:
275
diff
changeset
|
258 WIN_SMALL dm_simtext_column,dm_simtext_row |
0 | 259 movff menupos2,WREG ; Menupos2 holds number of menu option to show |
260 dcfsnz WREG,F | |
137 | 261 bra menuview_view_gaschange ; If a better gas is indicated |
262 dcfsnz WREG,F | |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
263 bra menuview_view1 ; "Menu?" (Not in Gauge and Anpnoe) |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
264 dcfsnz WREG,F |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
265 bra menuview_view2 ; "Quit Simulation?" (Sim only) |
0 | 266 dcfsnz WREG,F |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
267 bra menuview_view3 ; "Descent 1m" (Sim only) |
0 | 268 dcfsnz WREG,F |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
269 bra menuview_view4 ; "Ascend 1m" (Sim only) |
0 | 270 dcfsnz WREG,F |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
271 bra menuview_view5 ; "Quit Apnea mode?" (Apnea only) |
0 | 272 dcfsnz WREG,F |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
273 bra menuview_view6 ; "Reset Avr." (Gauge only) |
0 | 274 dcfsnz WREG,F |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
275 bra menuview_view7 ; "Sim:+5mins" (Sim only) |
216
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
276 dcfsnz WREG,F |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
277 bra menuview_view8 ; "Heading" (When compass is shown) |
0 | 278 menuview_exit: |
279 call TFT_standard_color | |
189
e79bc535ef9e
ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents:
188
diff
changeset
|
280 bcf win_invert ; Reset invert flag |
0 | 281 return ; Menupos2 = 0, Show nothing |
137 | 282 |
283 | |
284 menuview_view_gaschange: | |
285 extern gaslist_strcat_gas_mod | |
286 btfss better_gas_available ; =1: A better gas is available | |
287 bra menuview_toggle ; No, call next option | |
138
2852b0bd6391
minor: some extra protection against wrong gas selection
heinrichsweikamp
parents:
137
diff
changeset
|
288 btfsc divemode_gaschange ; Skip if the last gas change is not done yet. |
2852b0bd6391
minor: some extra protection against wrong gas selection
heinrichsweikamp
parents:
137
diff
changeset
|
289 bra menuview_toggle |
137 | 290 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint |
291 movff better_gas_number,PRODL ; number (1-5) of the "better gas" in divemode, =0: no better gas available | |
292 decf PRODL,F | |
293 call gaslist_strcat_gas_mod ; Append gas description of gas #PRODL (0-4) to current string | |
294 movlw .5 | |
295 movwf FSR2L ; Point to char 6 (5 chars gas description only) | |
296 STRCAT_PRINT "?" | |
297 bra menuview_exit ; Done. | |
0 | 298 menuview_view1: |
299 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
300 bra menuview_toggle ; Call next option | |
301 btfsc FLAG_gauge_mode ; In Gauge mode? | |
302 bra menuview_toggle ; Call next option | |
303 STRCPY_TEXT_PRINT tDivePreMenu ; "Menu?" | |
304 bra menuview_exit ; Done. | |
305 menuview_view2: | |
306 btfss simulatormode_active ; View only for simulator mode | |
307 bra menuview_toggle ; Call next option | |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
308 STRCPY_TEXT_PRINT tQuitSim ; "Quit Simulation?" |
0 | 309 bra menuview_exit ; Done. |
310 menuview_view3: | |
311 btfss simulatormode_active ; View only for simulator mode | |
312 bra menuview_toggle ; Call next option | |
428 | 313 STRCPY_PRINT "Sim:-1m" |
0 | 314 bra menuview_exit ; Done. |
315 menuview_view4: | |
316 btfss simulatormode_active ; View only for simulator mode | |
317 bra menuview_toggle ; Call next option | |
428 | 318 STRCPY_PRINT "Sim:+1m" |
0 | 319 bra menuview_exit ; Done. |
320 menuview_view5: | |
321 btfss FLAG_apnoe_mode ; In Apnoe mode? | |
322 bra menuview_toggle ; No, call next option | |
184
faa06c58e977
BUGFIX: Quit Apnea mode on the surface manually
heinrichsweikamp
parents:
148
diff
changeset
|
323 btfss FLAG_active_descent ; Are we descending? |
0 | 324 bra menuview_toggle ; Yes |
325 ; We are at the surface: | |
148 | 326 STRCPY_TEXT_PRINT tQuitSim ; "Quit Apnea mode?" |
0 | 327 bra menuview_exit ; Done. |
328 menuview_view6: | |
329 btfss FLAG_gauge_mode ; In Gauge mode? | |
330 bra menuview_toggle ; No, call next option | |
437 | 331 STRCPY_TEXT_PRINT tDivemenu_ResetAvg ; "Reset Avg." |
0 | 332 bra menuview_exit ; Done. |
216
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
333 menuview_view7: |
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
334 btfss simulatormode_active ; View only for simulator mode |
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
335 bra menuview_toggle ; Call next option |
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
336 btfsc FLAG_gauge_mode ; In Gauge mode? |
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
337 bra menuview_toggle ; Yes, call next option |
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
338 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
339 bra menuview_toggle ; Yes, call next option |
428 | 340 STRCPY_PRINT "Sim:+5'" |
216
973a0969e0ac
NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents:
192
diff
changeset
|
341 bra menuview_exit ; Done. |
254
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
342 menuview_view8: |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
343 movlw .6 |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
344 cpfseq menupos3 ; in compass view? |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
345 bra menuview_toggle ; No, call next option |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
346 STRCPY_TEXT_PRINT tSetHeading ; "Heading" |
5fe7aff622f3
preparations to set a course for the compass display
heinrichsweikamp
parents:
249
diff
changeset
|
347 bra menuview_exit ; Done. |
0 | 348 |
349 | |
350 ;============================================================================= | |
351 ; Show next customview (and delete this flag) | |
352 customview_toggle_reset: ; Timeout occured | |
353 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
39
e4e91fe8b09d
remember last customview in dive and surface mode
mh@mh-THINK.fritz.box
parents:
0
diff
changeset
|
354 global customview_mask |
0 | 355 customview_mask: |
353
573f2251cf49
NEW: Quit Simulator automatically when starting a real dive
heinrichsweikamp
parents:
337
diff
changeset
|
356 ; Clear custom view area in divemode |
573f2251cf49
NEW: Quit Simulator automatically when starting a real dive
heinrichsweikamp
parents:
337
diff
changeset
|
357 WIN_BOX_BLACK dm_customview_row, dm_customview_bot, dm_customview_column, dm_customview_rgt ; top, bottom, left, right |
300
5ad479f2a868
Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents:
275
diff
changeset
|
358 WIN_SMALL dm_customview_column,dm_customview_row |
0 | 359 call TFT_standard_color |
360 movff menupos3,WREG ; Menupos3 holds number of customview function | |
361 dcfsnz WREG,F | |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
362 bra customview_init_view1 ; Update Sensor data |
0 | 363 dcfsnz WREG,F |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
364 bra customview_init_view2 ; average depth and stopwatch |
0 | 365 dcfsnz WREG,F |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
366 bra customview_init_view3 ; Decoplan |
0 | 367 dcfsnz WREG,F |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
368 bra customview_init_view4 ; Battery info, Tissues and clock |
0 | 369 dcfsnz WREG,F |
370 bra customview_init_view5 ; GF informations | |
371 dcfsnz WREG,F | |
372 bra customview_init_view6 ; Compass | |
53
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
373 dcfsnz WREG,F |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
374 bra customview_init_view7 ; Dynamic gaslist |
105 | 375 dcfsnz WREG,F |
376 bra customview_init_view8 ; HUD voltages | |
123 | 377 dcfsnz WREG,F |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
378 bra customview_init_view9 ; ppO2, Ceiling and current GF |
413
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
379 dcfsnz WREG,F |
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
380 bra customview_init_view10 ; Sensor check |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
381 dcfsnz WREG,F |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
382 bra customview_init_view11 ; ppO2, END/EAD and CNS |
482
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
383 dcfsnz WREG,F |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
384 bra customview_init_view12 ; PSCR Info |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
385 |
0 | 386 customview_init_nocustomview: |
387 call I2C_sleep_accelerometer ; Stop accelerometer | |
388 call I2C_sleep_compass ; Stop compass | |
389 bra customview_toggle_exit | |
390 | |
391 customview_init_view1: | |
485 | 392 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
393 bra customview_toggle ; yes, Call next view... | |
394 btfsc FLAG_pscr_mode ; In PSCR mode? | |
395 bra customview_init_view1a ; Yes | |
396 btfss FLAG_ccr_mode ; In CC mode? | |
397 bra customview_toggle ; no, Call next view... | |
398 | |
399 customview_init_view1a: | |
249 | 400 movf hardware_flag,W |
401 sublw 0x11 ; 2 with BLE | |
402 btfsc STATUS,Z | |
403 bra customview_toggle ; no, Call next view... | |
476
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
404 movf hardware_flag,W |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
405 sublw 0x13 ; + |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
406 btfsc STATUS,Z |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
407 bra customview_toggle ; no, Call next view... |
0 | 408 |
409 bsf dive_hud1_displayed ; Set display flag | |
410 bsf dive_hud2_displayed ; Set display flag | |
411 bsf dive_hud3_displayed ; Set display flag | |
412 call TFT_hud_mask ; Setup HUD mask | |
192 | 413 call TFT_update_ppo2_sensors ; Update Sensor data |
485 | 414 bra customview_toggle_exit |
0 | 415 |
416 customview_init_view2: | |
417 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
418 bra customview_toggle ; Yes, Call next view... | |
419 call TFT_mask_avr_stopwatch ; Show mask for average depth and stopwatch | |
420 call TFT_update_avr_stopwatch ; Update average depth and stopwatch | |
421 bra customview_toggle_exit | |
422 | |
423 customview_init_view3: | |
424 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
425 bra customview_toggle ; Yes, Call next view... | |
426 btfsc FLAG_gauge_mode ; In Gauge mode? | |
427 bra customview_toggle ; Yes, Call next view... | |
428 call TFT_decoplan ; Show decoplan | |
429 bra customview_toggle_exit | |
430 | |
431 customview_init_view4: | |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
432 call TFT_battinfo_tissues_clock_mask ; Setup Mask |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
433 call TFT_battinfo_tissues_clock ; Show Battery info, Tissues and clock |
0 | 434 bra customview_toggle_exit |
435 | |
436 customview_init_view5: | |
437 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
438 bra customview_toggle ; Yes, Call next view... | |
439 btfsc FLAG_gauge_mode ; In Gauge mode? | |
440 bra customview_toggle ; Yes, Call next view... | |
119 | 441 |
442 extern char_I_deco_model | |
443 TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF | |
444 bra customview_toggle ; No GF info for non-GF modes | |
445 | |
0 | 446 call TFT_gf_mask ; Setup Mask |
447 call TFT_gf_info ; Show GF informations | |
448 bra customview_toggle_exit | |
449 | |
450 customview_init_view6: ; Compass (View 6) | |
451 call I2C_init_accelerometer ; Start accelerometer | |
452 call I2C_init_compass ; Start compass | |
256
5b4ef0b9090d
place compass display code into compass_ops.asm
heinrichsweikamp
parents:
254
diff
changeset
|
453 extern TFT_dive_compass_mask |
0 | 454 call TFT_dive_compass_mask ; Show compass |
455 bra customview_toggle_exit | |
456 | |
53
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
457 customview_init_view7: ; Dynamic gaslist (View 7) |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
458 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
459 bra customview_toggle ; Yes, Call next view... |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
460 btfsc FLAG_ccr_mode ; In CC mode? |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
461 bra customview_toggle ; Yes, Call next view... |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
462 call TFT_dyn_gaslist ; Show the dyn gaslist |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
463 bra customview_toggle_exit |
2825f1d2262f
NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents:
48
diff
changeset
|
464 |
102
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
465 customview_init_view8: ; Sensor millivolts |
136 | 466 btfsc FLAG_gauge_mode ; In Gauge mode? |
467 bra customview_toggle ; Yes, Call next view... | |
102
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
468 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
469 bra customview_toggle ; yes, Call next view... |
485 | 470 btfsc FLAG_pscr_mode ; In PSCR mode? |
471 bra customview_init_view8a ; Yes | |
102
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
472 btfss FLAG_ccr_mode ; In CC mode? |
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
473 bra customview_toggle ; no, Call next view... |
485 | 474 customview_init_view8a: |
476
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
475 movf hardware_flag,W |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
476 sublw 0x13 ; + |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
477 btfsc STATUS,Z |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
478 bra customview_toggle ; no, Call next view... |
7c10557c248e
no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents:
472
diff
changeset
|
479 |
337
508d7fb98b34
cleanup menu, add "Auto SP" option (Not working yet), minor layout change in compass menu
heinrichsweikamp
parents:
333
diff
changeset
|
480 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP |
508d7fb98b34
cleanup menu, add "Auto SP" option (Not working yet), minor layout change in compass menu
heinrichsweikamp
parents:
333
diff
changeset
|
481 sublw .1 ; opt_ccr_mode = 1 (Sensor)? |
508d7fb98b34
cleanup menu, add "Auto SP" option (Not working yet), minor layout change in compass menu
heinrichsweikamp
parents:
333
diff
changeset
|
482 bnz customview_toggle ; no, Call next view... |
102
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
483 call TFT_hud_mask ; Setup HUD mask |
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
484 call TFT_hud_voltages ; Show HUD details |
485 | 485 goto customview_toggle_exit |
102
37275e0fa7f5
NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents:
53
diff
changeset
|
486 |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
487 customview_init_view9: ; ppO2, Ceiling and current GF |
123 | 488 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
485 | 489 bra customview_toggle ; yes, Call next view... |
123 | 490 btfsc FLAG_gauge_mode ; In Gauge mode? |
485 | 491 bra customview_toggle ; Yes, Call next view... |
123 | 492 call TFT_ceiling_mask ; Setup mask |
493 call TFT_ceiling ; Show Ceiling | |
333
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
494 |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
495 ; ppO2 value |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
496 call TFT_mask_ppo2 |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
497 call TFT_display_ppo2_val |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
498 |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
499 ; current GF value |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
500 extern char_I_deco_model |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
501 TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
502 bra customview_toggle_exit ; No GF info for non-GF modes |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
503 call TFT_gf_mask_cGF ; Setup Mask - current GF only |
14b466f66a7f
Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents:
327
diff
changeset
|
504 call TFT_gf_info ; Show GF informations |
123 | 505 bra customview_toggle_exit |
506 | |
485 | 507 ;============================================================================= |
508 ; Show next customview (and delete this flag) | |
509 global customview_toggle | |
510 customview_toggle: | |
511 bcf switch_right | |
512 incf menupos3,F ; Number of customview to show | |
513 movlw d'12' ; Max number of customsviews in divemode | |
514 cpfsgt menupos3 ; Max reached? | |
515 goto customview_mask ; No, show | |
516 goto customview_toggle_reset | |
517 | |
518 | |
413
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
519 customview_init_view10: ; Sensor check |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
520 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
521 bra customview_toggle ; yes, Call next view... |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
522 btfsc FLAG_gauge_mode ; In Gauge mode? |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
523 bra customview_toggle ; Yes, Call next view... |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
524 btfss FLAG_ccr_mode ; In CC mode? |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
525 bra customview_toggle ; no, Call next view... |
413
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
526 |
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
527 call TFT_sensor_check_mask ; Show ppO2 of O2 and Diluent mask |
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
528 call TFT_sensor_check ; Show ppO2 of O2 and Diluent |
12e85930d95c
NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents:
376
diff
changeset
|
529 bra customview_toggle_exit |
123 | 530 |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
531 customview_init_view11: ; ppO2, END/EAD and CNS |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
532 btfsc FLAG_apnoe_mode ; In Apnoe mode? |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
533 bra customview_toggle ; yes, Call next view... |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
534 btfsc FLAG_gauge_mode ; In Gauge mode? |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
535 bra customview_toggle ; Yes, Call next view... |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
536 |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
537 call TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask |
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
538 call TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS |
485 | 539 goto customview_toggle_exit |
482
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
540 |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
541 customview_init_view12: ; PSCR Info |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
542 btfss FLAG_pscr_mode ; In PSCR mode? |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
543 bra customview_toggle ; No, Call next view... |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
544 |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
545 call TFT_pscr_info_mask ; Show ppO2, drop and lung ratio |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
546 call TFT_pscr_info ; Show ppO2, drop and lung ratio |
c0ee33f1f399
New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents:
476
diff
changeset
|
547 bra customview_toggle_exit |
471
9edb1359ce43
NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents:
437
diff
changeset
|
548 |
0 | 549 customview_toggle_exit: |
550 call TFT_standard_color | |
551 bcf toggle_customview ; Clear flag | |
552 return | |
553 | |
554 global customview_show_change_depth | |
555 customview_show_change_depth: ; Put " lom" or " loft" into Postinc2 | |
556 PUTC " " | |
557 TSTOSS opt_units ; 0=m, 1=ft | |
558 bra customview_show_mix_metric | |
559 movf lo,W | |
560 mullw .100 ; convert meters to mbar | |
561 movff PRODL,lo | |
562 movff PRODH,hi | |
563 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet | |
564 bsf leftbind | |
565 output_16 ; Change depth in lo:hi | |
566 bcf leftbind | |
567 STRCAT_TEXT tFeets | |
568 return | |
569 customview_show_mix_metric: | |
570 output_99 ; Change depth in lo | |
571 STRCAT_TEXT tMeters | |
572 return | |
573 | |
574 | |
575 global customview_show_mix | |
576 customview_show_mix: ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2 | |
577 tstfsz hi ; He=0? | |
578 bra customview_show_mix5 ; No, Show a TX | |
579 movlw .21 | |
580 cpfseq lo ; Air? | |
581 bra customview_show_mix2 ; No | |
582 STRCAT_TEXT tSelectAir ; Yes, show "Air" | |
583 bra customview_show_mix4b | |
584 customview_show_mix2: | |
585 movlw .100 | |
586 cpfseq lo ; O2? | |
587 bra customview_show_mix3 ; No | |
588 STRCAT_TEXT tSelectO2 ; Yes, show "O2" | |
589 bra customview_show_mix4b | |
590 | |
591 customview_show_mix3: | |
592 movlw .21 | |
593 cpfslt lo ; < Nx21? | |
594 bra customview_show_mix4 ; No | |
595 STRCAT_TEXT tGasErr ; Yes, show "Err" | |
596 output_99 ; O2 ratio is still in "lo" | |
597 bra customview_show_mix4c | |
598 | |
599 customview_show_mix4: | |
600 STRCAT_TEXT tSelectNx ; Show "Nx" | |
601 output_99 ; O2 ratio is still in "lo" | |
602 customview_show_mix4b: | |
603 STRCAT " " | |
604 customview_show_mix4c: | |
605 btfsc divemode ; In divemode | |
606 return ; Yes | |
607 STRCAT " " | |
608 return | |
609 | |
610 customview_show_mix5: | |
611 btfsc divemode | |
612 bra customview_show_mix6 | |
613 STRCAT_TEXT tSelectTx ; Show "Tx" | |
614 customview_show_mix6: | |
615 output_99 ; O2 ratio is still in "lo" | |
616 PUTC "/" | |
617 movff hi,lo | |
618 output_99 ; He ratio | |
619 return | |
620 | |
621 END |