annotate src/customview.asm @ 183:976e19d1e1ba

BUGFIX: O2 > 99% was not configurable from the PC
author heinrichsweikamp
date Thu, 16 Oct 2014 13:11:18 +0200
parents 022b886eddaf
children faa06c58e977
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
heinrichsweikamp
parents:
diff changeset
3 ; File customview.asm
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ; Customview in Surfacemode and Divemode
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
heinrichsweikamp
parents:
diff changeset
10 ; 2011-08-10 : [mH] moving from OSTC code
heinrichsweikamp
parents:
diff changeset
11
heinrichsweikamp
parents:
diff changeset
12 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
13
heinrichsweikamp
parents:
diff changeset
14 #include "ostc3.inc" ; Mandatory header
heinrichsweikamp
parents:
diff changeset
15 #include "tft_outputs.inc"
heinrichsweikamp
parents:
diff changeset
16 #include "strings.inc"
heinrichsweikamp
parents:
diff changeset
17 #include "tft.inc"
heinrichsweikamp
parents:
diff changeset
18 #include "isr.inc"
heinrichsweikamp
parents:
diff changeset
19 #include "wait.inc"
heinrichsweikamp
parents:
diff changeset
20 #include "surfmode.inc"
heinrichsweikamp
parents:
diff changeset
21 #include "convert.inc"
heinrichsweikamp
parents:
diff changeset
22 #include "divemode.inc"
heinrichsweikamp
parents:
diff changeset
23 #include "i2c.inc"
heinrichsweikamp
parents:
diff changeset
24
heinrichsweikamp
parents:
diff changeset
25 gui CODE
heinrichsweikamp
parents:
diff changeset
26
heinrichsweikamp
parents:
diff changeset
27 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
28 ; Do every-second tasks for the custom view area (Dive mode)
heinrichsweikamp
parents:
diff changeset
29
heinrichsweikamp
parents:
diff changeset
30 global customview_second
heinrichsweikamp
parents:
diff changeset
31 customview_second:
heinrichsweikamp
parents:
diff changeset
32 movff menupos3,WREG ; copy
heinrichsweikamp
parents:
diff changeset
33 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
34 bra customview_1sec_view1
heinrichsweikamp
parents:
diff changeset
35 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
36 bra customview_1sec_view2
heinrichsweikamp
parents:
diff changeset
37 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
38 bra customview_1sec_view3
heinrichsweikamp
parents:
diff changeset
39 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
40 bra customview_1sec_view4
heinrichsweikamp
parents:
diff changeset
41 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
42 bra customview_1sec_view5
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
43 dcfsnz WREG,F
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
44 bra customview_1sec_view6
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
45 dcfsnz WREG,F
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
46 bra customview_1sec_view7
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
47 dcfsnz WREG,F
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
48 bra customview_1sec_view8
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
49 dcfsnz WREG,F
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
50 bra customview_1sec_view9
0
heinrichsweikamp
parents:
diff changeset
51 ; Menupos3=0, do nothing
heinrichsweikamp
parents:
diff changeset
52 return
heinrichsweikamp
parents:
diff changeset
53
heinrichsweikamp
parents:
diff changeset
54 customview_1sec_view3:
heinrichsweikamp
parents:
diff changeset
55 call TFT_decoplan ; Show decoplan
heinrichsweikamp
parents:
diff changeset
56 return
heinrichsweikamp
parents:
diff changeset
57 customview_1sec_view2:
heinrichsweikamp
parents:
diff changeset
58 call TFT_update_avr_stopwatch ; Update average depth and stopwatch
heinrichsweikamp
parents:
diff changeset
59 return
heinrichsweikamp
parents:
diff changeset
60 customview_1sec_view1:
heinrichsweikamp
parents:
diff changeset
61 call TFT_update_hud ; Update HUD data
heinrichsweikamp
parents:
diff changeset
62 return
heinrichsweikamp
parents:
diff changeset
63 customview_1sec_view4:
heinrichsweikamp
parents:
diff changeset
64 call TFT_ead_end_tissues_clock ; Update EAD/END, Tissues and clock
heinrichsweikamp
parents:
diff changeset
65 return
heinrichsweikamp
parents:
diff changeset
66 customview_1sec_view5:
heinrichsweikamp
parents:
diff changeset
67 call TFT_gf_info ; Update GF informations
heinrichsweikamp
parents:
diff changeset
68 return
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
69 customview_1sec_view6:
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
70 ; Compass updated seperately (Faster) in divemode
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
71 return
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
72 customview_1sec_view7: ; Dynamic gaslist
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
73 call TFT_dyn_gaslist ; Update the gaslist
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
74 return
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
75 customview_1sec_view8: ; Sensor voltages
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
76 call TFT_hud_voltages ; Show HUD details
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
77 return
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
78 customview_1sec_view9: ; Ceiling
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
79 call TFT_ceiling ; Show Ceiling
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
80 return
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
81
0
heinrichsweikamp
parents:
diff changeset
82
heinrichsweikamp
parents:
diff changeset
83 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
84 ; Do every-minute tasks for the custom view area
heinrichsweikamp
parents:
diff changeset
85
heinrichsweikamp
parents:
diff changeset
86 global customview_minute
heinrichsweikamp
parents:
diff changeset
87 customview_minute:
heinrichsweikamp
parents:
diff changeset
88 return
heinrichsweikamp
parents:
diff changeset
89 ; movff menupos3,WREG ; copy
heinrichsweikamp
parents:
diff changeset
90 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
91 ; bra customview_1min_view1
heinrichsweikamp
parents:
diff changeset
92 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
93 ; bra customview_1min_view2
heinrichsweikamp
parents:
diff changeset
94 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
95 ; bra customview_1min_view3
heinrichsweikamp
parents:
diff changeset
96 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
97 ; bra customview_1min_view4
heinrichsweikamp
parents:
diff changeset
98 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
99 ; bra customview_1min_view5
heinrichsweikamp
parents:
diff changeset
100 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
101 ; bra customview_1min_view6
heinrichsweikamp
parents:
diff changeset
102 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
103 ; bra customview_1min_view7
heinrichsweikamp
parents:
diff changeset
104 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
105 ; bra customview_1min_view8
heinrichsweikamp
parents:
diff changeset
106 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
107 ; bra customview_1min_view9
heinrichsweikamp
parents:
diff changeset
108 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
109 ; bra customview_1min_view10
heinrichsweikamp
parents:
diff changeset
110 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
111 ; bra customview_1min_view11
heinrichsweikamp
parents:
diff changeset
112 ; ; Menupos3=0, do nothing
heinrichsweikamp
parents:
diff changeset
113 ; return
heinrichsweikamp
parents:
diff changeset
114 ;
heinrichsweikamp
parents:
diff changeset
115 ;customview_1min_view1:
heinrichsweikamp
parents:
diff changeset
116 ;customview_1min_view2:
heinrichsweikamp
parents:
diff changeset
117 ;customview_1min_view3:
heinrichsweikamp
parents:
diff changeset
118 ;customview_1min_view4:
heinrichsweikamp
parents:
diff changeset
119 ;customview_1min_view5:
heinrichsweikamp
parents:
diff changeset
120 ;customview_1min_view6:
heinrichsweikamp
parents:
diff changeset
121 ;customview_1min_view7:
heinrichsweikamp
parents:
diff changeset
122 ;customview_1min_view8:
heinrichsweikamp
parents:
diff changeset
123 ;customview_1min_view9:
heinrichsweikamp
parents:
diff changeset
124 ;customview_1min_view10:
heinrichsweikamp
parents:
diff changeset
125 ;customview_1min_view11:
heinrichsweikamp
parents:
diff changeset
126 ; return
heinrichsweikamp
parents:
diff changeset
127
heinrichsweikamp
parents:
diff changeset
128 global surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
129 surf_customview_toggle:
heinrichsweikamp
parents:
diff changeset
130 bcf switch_right
heinrichsweikamp
parents:
diff changeset
131 incf menupos3,F ; Number of customview to show
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
132 movlw d'7' ; Max number of customsviews in surface mode
0
heinrichsweikamp
parents:
diff changeset
133 cpfsgt menupos3 ; Max reached?
heinrichsweikamp
parents:
diff changeset
134 bra surf_customview_mask ; No, show
heinrichsweikamp
parents:
diff changeset
135 movlw .1
heinrichsweikamp
parents:
diff changeset
136 movwf menupos3 ; Reset to one (Always one custom view visible)
heinrichsweikamp
parents:
diff changeset
137
heinrichsweikamp
parents:
diff changeset
138 global surf_customview_mask
heinrichsweikamp
parents:
diff changeset
139 surf_customview_mask:
48
7c7d7644ca37 Time and Date in normal (Not tiny) font
heinrichsweikamp
parents: 41
diff changeset
140 WIN_BOX_BLACK .50,surf_warning1_row-1, .0, surf_decotype_column-.1 ; top, bottom, left, right
0
heinrichsweikamp
parents:
diff changeset
141 call TFT_standard_color
heinrichsweikamp
parents:
diff changeset
142 movff menupos3,WREG ; Menupos3 holds number of customview function
heinrichsweikamp
parents:
diff changeset
143 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
144 bra surf_customview_init_view1 ; OC Gas list
heinrichsweikamp
parents:
diff changeset
145 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
146 bra surf_customview_init_view2 ; CC Dil list
heinrichsweikamp
parents:
diff changeset
147 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
148 bra surf_customview_init_view3 ; CC SP list
heinrichsweikamp
parents:
diff changeset
149 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
150 bra surf_customview_init_view4 ; Custom Text
heinrichsweikamp
parents:
diff changeset
151 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
152 bra surf_customview_init_view5 ; Tissue Diagram
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
153 dcfsnz WREG,F
0
heinrichsweikamp
parents:
diff changeset
154 bra surf_customview_init_view6 ; Compass
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
155 dcfsnz WREG,F
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
156 bra surf_customview_init_view7 ; Deco settings
0
heinrichsweikamp
parents:
diff changeset
157
heinrichsweikamp
parents:
diff changeset
158 call I2C_sleep_accelerometer ; Stop accelerometer
heinrichsweikamp
parents:
diff changeset
159 call I2C_sleep_compass ; Stop compass
heinrichsweikamp
parents:
diff changeset
160
heinrichsweikamp
parents:
diff changeset
161 movlw .1
heinrichsweikamp
parents:
diff changeset
162 movwf menupos3 ; Reset to one (Always one custom view visible)
heinrichsweikamp
parents:
diff changeset
163
heinrichsweikamp
parents:
diff changeset
164 surf_customview_init_view1: ; View1: OC Gas list
heinrichsweikamp
parents:
diff changeset
165 btfsc FLAG_ccr_mode
heinrichsweikamp
parents:
diff changeset
166 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
167 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
168 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
169 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
170 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
171 call TFT_gaslist_surfmode ; Show gas list
heinrichsweikamp
parents:
diff changeset
172 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
173
heinrichsweikamp
parents:
diff changeset
174 surf_customview_init_view2: ; View2: CC Dil list
heinrichsweikamp
parents:
diff changeset
175 btfss FLAG_ccr_mode
heinrichsweikamp
parents:
diff changeset
176 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
177 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
178 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
179 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
180 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
181 call TFT_dillist_surfmode ; Show diluent list
heinrichsweikamp
parents:
diff changeset
182 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
183
heinrichsweikamp
parents:
diff changeset
184 surf_customview_init_view3: ; View3: CC SP list
heinrichsweikamp
parents:
diff changeset
185 btfss FLAG_ccr_mode
heinrichsweikamp
parents:
diff changeset
186 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
187 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
188 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
189 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
190 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
191 call TFT_splist_surfmode ; Show Setpoint list
heinrichsweikamp
parents:
diff changeset
192 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
193
heinrichsweikamp
parents:
diff changeset
194 surf_customview_init_view4: ; View4: Custom text
heinrichsweikamp
parents:
diff changeset
195 call TFT_custom_text ; Show the custom text
heinrichsweikamp
parents:
diff changeset
196 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
197
heinrichsweikamp
parents:
diff changeset
198 surf_customview_init_view5: ; View5: Tissue Diagram
heinrichsweikamp
parents:
diff changeset
199 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
200 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
201 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
202 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
203 call TFT_surface_tissues ; Show Tissue diagram
heinrichsweikamp
parents:
diff changeset
204 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
205
heinrichsweikamp
parents:
diff changeset
206 surf_customview_init_view6: ; View6: Compass
heinrichsweikamp
parents:
diff changeset
207 call I2C_init_accelerometer ; Start accelerometer
heinrichsweikamp
parents:
diff changeset
208 call I2C_init_compass ; Start compass
heinrichsweikamp
parents:
diff changeset
209 call TFT_surface_compass_mask ; Show compass
heinrichsweikamp
parents:
diff changeset
210 bra customview_toggle_exit ; Done.
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
211 surf_customview_init_view7:
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
212 btfsc FLAG_gauge_mode
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
213 bra surf_customview_toggle
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
214 btfsc FLAG_apnoe_mode
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
215 bra surf_customview_toggle
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
216 extern deco_setup_dive
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
217 call deco_setup_dive
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
218 call TFT_surface_decosettings ; Show all deco settings
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
219 bra customview_toggle_exit ; Done.
0
heinrichsweikamp
parents:
diff changeset
220
heinrichsweikamp
parents:
diff changeset
221 global menuview_toggle
heinrichsweikamp
parents:
diff changeset
222 menuview_toggle: ; Show Menu or the simulator tasks
heinrichsweikamp
parents:
diff changeset
223 movlw divemode_menuview_timeout
heinrichsweikamp
parents:
diff changeset
224 movwf timeout_counter3
heinrichsweikamp
parents:
diff changeset
225 bsf menuview
heinrichsweikamp
parents:
diff changeset
226 bcf switch_left
heinrichsweikamp
parents:
diff changeset
227 incf menupos2,F ; Number of options to show
heinrichsweikamp
parents:
diff changeset
228 movlw d'6' ; Max number of options in divemode
heinrichsweikamp
parents:
diff changeset
229 cpfsgt menupos2 ; Max reached?
heinrichsweikamp
parents:
diff changeset
230 bra menuview_mask ; No, show
heinrichsweikamp
parents:
diff changeset
231 global menuview_toggle_reset
heinrichsweikamp
parents:
diff changeset
232 menuview_toggle_reset: ; Timeout occured
heinrichsweikamp
parents:
diff changeset
233 clrf menupos2
heinrichsweikamp
parents:
diff changeset
234 bcf menuview
heinrichsweikamp
parents:
diff changeset
235 menuview_mask:
heinrichsweikamp
parents:
diff changeset
236 WIN_BOX_BLACK divemode_simtext_row, divemode_simtext_row+.24, divemode_simtext_column, divemode_simtext_column+.49 ; top, bottom, left, right
heinrichsweikamp
parents:
diff changeset
237 btfss FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
238 bra menuview_mask2
heinrichsweikamp
parents:
diff changeset
239 ; Clear some more in gauge mode
heinrichsweikamp
parents:
diff changeset
240 WIN_BOX_BLACK divemode_simtext_row, divemode_simtext_row+.24, divemode_simtext_column+.50, divemode_simtext_column+.70 ; top, bottom, left, right
heinrichsweikamp
parents:
diff changeset
241 menuview_mask2:
heinrichsweikamp
parents:
diff changeset
242 movlw color_yellow
heinrichsweikamp
parents:
diff changeset
243 call TFT_set_color
heinrichsweikamp
parents:
diff changeset
244 WIN_SMALL_INVERT divemode_simtext_column,divemode_simtext_row
heinrichsweikamp
parents:
diff changeset
245 movff menupos2,WREG ; Menupos2 holds number of menu option to show
heinrichsweikamp
parents:
diff changeset
246 dcfsnz WREG,F
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
247 bra menuview_view_gaschange ; If a better gas is indicated
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
248 dcfsnz WREG,F
0
heinrichsweikamp
parents:
diff changeset
249 bra menuview_view1
heinrichsweikamp
parents:
diff changeset
250 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
251 bra menuview_view2
heinrichsweikamp
parents:
diff changeset
252 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
253 bra menuview_view3
heinrichsweikamp
parents:
diff changeset
254 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
255 bra menuview_view4
heinrichsweikamp
parents:
diff changeset
256 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
257 bra menuview_view5
heinrichsweikamp
parents:
diff changeset
258 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
259 bra menuview_view6
heinrichsweikamp
parents:
diff changeset
260 menuview_exit:
heinrichsweikamp
parents:
diff changeset
261 call TFT_standard_color
heinrichsweikamp
parents:
diff changeset
262 WIN_INVERT .0
heinrichsweikamp
parents:
diff changeset
263 return ; Menupos2 = 0, Show nothing
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
264
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
265
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
266 menuview_view_gaschange:
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
267 extern gaslist_strcat_gas_mod
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
268 btfss better_gas_available ; =1: A better gas is available
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
269 bra menuview_toggle ; No, call next option
138
2852b0bd6391 minor: some extra protection against wrong gas selection
heinrichsweikamp
parents: 137
diff changeset
270 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
271 bra menuview_toggle
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
272 bsf short_gas_decriptions ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
273 movff better_gas_number,PRODL ; number (1-5) of the "better gas" in divemode, =0: no better gas available
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
274 decf PRODL,F
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
275 call gaslist_strcat_gas_mod ; Append gas description of gas #PRODL (0-4) to current string
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
276 movlw .5
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
277 movwf FSR2L ; Point to char 6 (5 chars gas description only)
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
278 STRCAT_PRINT "?"
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
279 bra menuview_exit ; Done.
0
heinrichsweikamp
parents:
diff changeset
280 menuview_view1:
heinrichsweikamp
parents:
diff changeset
281 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
282 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
283 btfsc FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
284 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
285 STRCPY_TEXT_PRINT tDivePreMenu ; "Menu?"
heinrichsweikamp
parents:
diff changeset
286 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
287 menuview_view2:
heinrichsweikamp
parents:
diff changeset
288 btfss simulatormode_active ; View only for simulator mode
heinrichsweikamp
parents:
diff changeset
289 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
290 STRCPY_TEXT_PRINT tQuitSim ;"Quit Simulation?"
heinrichsweikamp
parents:
diff changeset
291 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
292 menuview_view3:
heinrichsweikamp
parents:
diff changeset
293 btfss simulatormode_active ; View only for simulator mode
heinrichsweikamp
parents:
diff changeset
294 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
295 STRCPY_TEXT_PRINT tDescent1m ; "Descent 1m"
heinrichsweikamp
parents:
diff changeset
296 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
297 menuview_view4:
heinrichsweikamp
parents:
diff changeset
298 btfss simulatormode_active ; View only for simulator mode
heinrichsweikamp
parents:
diff changeset
299 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
300 STRCPY_TEXT_PRINT tAscent1m ; "Ascend 1m"
heinrichsweikamp
parents:
diff changeset
301 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
302 menuview_view5:
heinrichsweikamp
parents:
diff changeset
303 btfss FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
304 bra menuview_toggle ; No, call next option
heinrichsweikamp
parents:
diff changeset
305 btfsc FLAG_active_descent ; Are we descending?
heinrichsweikamp
parents:
diff changeset
306 bra menuview_toggle ; Yes
heinrichsweikamp
parents:
diff changeset
307 ; We are at the surface:
148
022b886eddaf some cleanup
heinrichsweikamp
parents: 138
diff changeset
308 STRCPY_TEXT_PRINT tQuitSim ; "Quit Apnea mode?"
0
heinrichsweikamp
parents:
diff changeset
309 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
310 menuview_view6:
heinrichsweikamp
parents:
diff changeset
311 btfss FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
312 bra menuview_toggle ; No, call next option
heinrichsweikamp
parents:
diff changeset
313 STRCPY_TEXT_PRINT tDivemenu_ResetAvr ; "Reset Avr."
heinrichsweikamp
parents:
diff changeset
314 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
315
heinrichsweikamp
parents:
diff changeset
316
heinrichsweikamp
parents:
diff changeset
317 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
318 ; Show next customview (and delete this flag)
heinrichsweikamp
parents:
diff changeset
319 global customview_toggle
heinrichsweikamp
parents:
diff changeset
320 customview_toggle:
heinrichsweikamp
parents:
diff changeset
321 bcf switch_right
heinrichsweikamp
parents:
diff changeset
322 incf menupos3,F ; Number of customview to show
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
323 movlw d'9' ; Max number of customsviews in divemode
0
heinrichsweikamp
parents:
diff changeset
324 cpfsgt menupos3 ; Max reached?
heinrichsweikamp
parents:
diff changeset
325 bra customview_mask ; No, show
heinrichsweikamp
parents:
diff changeset
326 customview_toggle_reset: ; Timeout occured
heinrichsweikamp
parents:
diff changeset
327 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
328 global customview_mask
0
heinrichsweikamp
parents:
diff changeset
329 customview_mask:
heinrichsweikamp
parents:
diff changeset
330 call TFT_clear_customview_divemode
heinrichsweikamp
parents:
diff changeset
331 WIN_SMALL divemode_customview_column,divemode_customview_row
heinrichsweikamp
parents:
diff changeset
332 call TFT_standard_color
heinrichsweikamp
parents:
diff changeset
333 movff menupos3,WREG ; Menupos3 holds number of customview function
heinrichsweikamp
parents:
diff changeset
334 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
335 bra customview_init_view1
heinrichsweikamp
parents:
diff changeset
336 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
337 bra customview_init_view2
heinrichsweikamp
parents:
diff changeset
338 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
339 bra customview_init_view3
heinrichsweikamp
parents:
diff changeset
340 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
341 bra customview_init_view4
heinrichsweikamp
parents:
diff changeset
342 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
343 bra customview_init_view5 ; GF informations
heinrichsweikamp
parents:
diff changeset
344 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
345 bra customview_init_view6 ; Compass
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
346 dcfsnz WREG,F
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
347 bra customview_init_view7 ; Dynamic gaslist
105
0aaa4877ba25 Show HUD voltages only in CCR mode...
heinrichsweikamp
parents: 102
diff changeset
348 dcfsnz WREG,F
0aaa4877ba25 Show HUD voltages only in CCR mode...
heinrichsweikamp
parents: 102
diff changeset
349 bra customview_init_view8 ; HUD voltages
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
350 dcfsnz WREG,F
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
351 bra customview_init_view9 ; Ceiling
0
heinrichsweikamp
parents:
diff changeset
352 customview_init_nocustomview:
heinrichsweikamp
parents:
diff changeset
353 call I2C_sleep_accelerometer ; Stop accelerometer
heinrichsweikamp
parents:
diff changeset
354 call I2C_sleep_compass ; Stop compass
heinrichsweikamp
parents:
diff changeset
355 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
356
heinrichsweikamp
parents:
diff changeset
357 customview_init_view1:
heinrichsweikamp
parents:
diff changeset
358 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
359 bra customview_toggle ; yes, Call next view...
heinrichsweikamp
parents:
diff changeset
360 btfss FLAG_ccr_mode ; In CC mode?
heinrichsweikamp
parents:
diff changeset
361 bra customview_toggle ; no, Call next view...
heinrichsweikamp
parents:
diff changeset
362
heinrichsweikamp
parents:
diff changeset
363 bsf dive_hud1_displayed ; Set display flag
heinrichsweikamp
parents:
diff changeset
364 bsf dive_hud2_displayed ; Set display flag
heinrichsweikamp
parents:
diff changeset
365 bsf dive_hud3_displayed ; Set display flag
heinrichsweikamp
parents:
diff changeset
366 call TFT_hud_mask ; Setup HUD mask
heinrichsweikamp
parents:
diff changeset
367 call TFT_update_hud ; Update HUD data
heinrichsweikamp
parents:
diff changeset
368 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
369
heinrichsweikamp
parents:
diff changeset
370 customview_init_view2:
heinrichsweikamp
parents:
diff changeset
371 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
372 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
373 call TFT_mask_avr_stopwatch ; Show mask for average depth and stopwatch
heinrichsweikamp
parents:
diff changeset
374 call TFT_update_avr_stopwatch ; Update average depth and stopwatch
heinrichsweikamp
parents:
diff changeset
375 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
376
heinrichsweikamp
parents:
diff changeset
377 customview_init_view3:
heinrichsweikamp
parents:
diff changeset
378 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
379 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
380 btfsc FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
381 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
382 call TFT_decoplan ; Show decoplan
heinrichsweikamp
parents:
diff changeset
383 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
384
heinrichsweikamp
parents:
diff changeset
385 customview_init_view4:
heinrichsweikamp
parents:
diff changeset
386 call TFT_ead_end_tissues_clock_mask ; Setup Mask
heinrichsweikamp
parents:
diff changeset
387 call TFT_ead_end_tissues_clock ; Show EAD/END, Tissues and clock
heinrichsweikamp
parents:
diff changeset
388 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
389
heinrichsweikamp
parents:
diff changeset
390 customview_init_view5:
heinrichsweikamp
parents:
diff changeset
391 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
392 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
393 btfsc FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
394 bra customview_toggle ; Yes, Call next view...
119
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
395
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
396 extern char_I_deco_model
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
397 TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
398 bra customview_toggle ; No GF info for non-GF modes
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
399
0
heinrichsweikamp
parents:
diff changeset
400 call TFT_gf_mask ; Setup Mask
heinrichsweikamp
parents:
diff changeset
401 call TFT_gf_info ; Show GF informations
heinrichsweikamp
parents:
diff changeset
402 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
403
heinrichsweikamp
parents:
diff changeset
404 customview_init_view6: ; Compass (View 6)
heinrichsweikamp
parents:
diff changeset
405 call I2C_init_accelerometer ; Start accelerometer
heinrichsweikamp
parents:
diff changeset
406 call I2C_init_compass ; Start compass
heinrichsweikamp
parents:
diff changeset
407 call TFT_dive_compass_mask ; Show compass
heinrichsweikamp
parents:
diff changeset
408 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
409
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
410 customview_init_view7: ; Dynamic gaslist (View 7)
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
411 btfsc FLAG_apnoe_mode ; In Apnoe mode?
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
412 bra customview_toggle ; Yes, Call next view...
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
413 btfsc FLAG_ccr_mode ; In CC mode?
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
414 bra customview_toggle ; Yes, Call next view...
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
415 call TFT_dyn_gaslist ; Show the dyn gaslist
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
416 bra customview_toggle_exit
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
417
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
418 customview_init_view8: ; Sensor millivolts
136
9a637c9bb19a rename Deco Planner to Simulator
heinrichsweikamp
parents: 134
diff changeset
419 btfsc FLAG_gauge_mode ; In Gauge mode?
9a637c9bb19a rename Deco Planner to Simulator
heinrichsweikamp
parents: 134
diff changeset
420 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
421 btfsc FLAG_apnoe_mode ; In Apnoe mode?
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
422 bra customview_toggle ; yes, Call next view...
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
423 btfss FLAG_ccr_mode ; In CC mode?
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
424 bra customview_toggle ; no, Call next view...
136
9a637c9bb19a rename Deco Planner to Simulator
heinrichsweikamp
parents: 134
diff changeset
425 TSTOSS opt_ccr_mode ; =0: Fixed SP, =1: Sensor
9a637c9bb19a rename Deco Planner to Simulator
heinrichsweikamp
parents: 134
diff changeset
426 bra customview_toggle ; no, Call next view...
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
427 call TFT_hud_mask ; Setup HUD mask
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
428 call TFT_hud_voltages ; Show HUD details
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
429 bra customview_toggle_exit
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
430
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
431 customview_init_view9: ; Ceiling
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
432 btfsc FLAG_apnoe_mode ; In Apnoe mode?
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
433 bra customview_toggle ; yes, Call next view...
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
434 btfsc FLAG_gauge_mode ; In Gauge mode?
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
435 bra customview_toggle ; Yes, Call next view...
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
436 call TFT_ceiling_mask ; Setup mask
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
437 call TFT_ceiling ; Show Ceiling
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
438 bra customview_toggle_exit
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
439
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
440
0
heinrichsweikamp
parents:
diff changeset
441 customview_toggle_exit:
heinrichsweikamp
parents:
diff changeset
442 call TFT_standard_color
heinrichsweikamp
parents:
diff changeset
443 bcf toggle_customview ; Clear flag
heinrichsweikamp
parents:
diff changeset
444 return
heinrichsweikamp
parents:
diff changeset
445
heinrichsweikamp
parents:
diff changeset
446 global customview_show_change_depth
heinrichsweikamp
parents:
diff changeset
447 customview_show_change_depth: ; Put " lom" or " loft" into Postinc2
heinrichsweikamp
parents:
diff changeset
448 PUTC " "
heinrichsweikamp
parents:
diff changeset
449 TSTOSS opt_units ; 0=m, 1=ft
heinrichsweikamp
parents:
diff changeset
450 bra customview_show_mix_metric
heinrichsweikamp
parents:
diff changeset
451 movf lo,W
heinrichsweikamp
parents:
diff changeset
452 mullw .100 ; convert meters to mbar
heinrichsweikamp
parents:
diff changeset
453 movff PRODL,lo
heinrichsweikamp
parents:
diff changeset
454 movff PRODH,hi
heinrichsweikamp
parents:
diff changeset
455 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
heinrichsweikamp
parents:
diff changeset
456 bsf leftbind
heinrichsweikamp
parents:
diff changeset
457 output_16 ; Change depth in lo:hi
heinrichsweikamp
parents:
diff changeset
458 bcf leftbind
heinrichsweikamp
parents:
diff changeset
459 STRCAT_TEXT tFeets
heinrichsweikamp
parents:
diff changeset
460 return
heinrichsweikamp
parents:
diff changeset
461 customview_show_mix_metric:
heinrichsweikamp
parents:
diff changeset
462 output_99 ; Change depth in lo
heinrichsweikamp
parents:
diff changeset
463 STRCAT_TEXT tMeters
heinrichsweikamp
parents:
diff changeset
464 return
heinrichsweikamp
parents:
diff changeset
465
heinrichsweikamp
parents:
diff changeset
466
heinrichsweikamp
parents:
diff changeset
467 global customview_show_mix
heinrichsweikamp
parents:
diff changeset
468 customview_show_mix: ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2
heinrichsweikamp
parents:
diff changeset
469 tstfsz hi ; He=0?
heinrichsweikamp
parents:
diff changeset
470 bra customview_show_mix5 ; No, Show a TX
heinrichsweikamp
parents:
diff changeset
471 movlw .21
heinrichsweikamp
parents:
diff changeset
472 cpfseq lo ; Air?
heinrichsweikamp
parents:
diff changeset
473 bra customview_show_mix2 ; No
heinrichsweikamp
parents:
diff changeset
474 STRCAT_TEXT tSelectAir ; Yes, show "Air"
heinrichsweikamp
parents:
diff changeset
475 bra customview_show_mix4b
heinrichsweikamp
parents:
diff changeset
476 customview_show_mix2:
heinrichsweikamp
parents:
diff changeset
477 movlw .100
heinrichsweikamp
parents:
diff changeset
478 cpfseq lo ; O2?
heinrichsweikamp
parents:
diff changeset
479 bra customview_show_mix3 ; No
heinrichsweikamp
parents:
diff changeset
480 STRCAT_TEXT tSelectO2 ; Yes, show "O2"
heinrichsweikamp
parents:
diff changeset
481 bra customview_show_mix4b
heinrichsweikamp
parents:
diff changeset
482
heinrichsweikamp
parents:
diff changeset
483 customview_show_mix3:
heinrichsweikamp
parents:
diff changeset
484 movlw .21
heinrichsweikamp
parents:
diff changeset
485 cpfslt lo ; < Nx21?
heinrichsweikamp
parents:
diff changeset
486 bra customview_show_mix4 ; No
heinrichsweikamp
parents:
diff changeset
487 STRCAT_TEXT tGasErr ; Yes, show "Err"
heinrichsweikamp
parents:
diff changeset
488 output_99 ; O2 ratio is still in "lo"
heinrichsweikamp
parents:
diff changeset
489 bra customview_show_mix4c
heinrichsweikamp
parents:
diff changeset
490
heinrichsweikamp
parents:
diff changeset
491 customview_show_mix4:
heinrichsweikamp
parents:
diff changeset
492 STRCAT_TEXT tSelectNx ; Show "Nx"
heinrichsweikamp
parents:
diff changeset
493 output_99 ; O2 ratio is still in "lo"
heinrichsweikamp
parents:
diff changeset
494 customview_show_mix4b:
heinrichsweikamp
parents:
diff changeset
495 STRCAT " "
heinrichsweikamp
parents:
diff changeset
496 customview_show_mix4c:
heinrichsweikamp
parents:
diff changeset
497 btfsc divemode ; In divemode
heinrichsweikamp
parents:
diff changeset
498 return ; Yes
heinrichsweikamp
parents:
diff changeset
499 STRCAT " "
heinrichsweikamp
parents:
diff changeset
500 return
heinrichsweikamp
parents:
diff changeset
501
heinrichsweikamp
parents:
diff changeset
502 customview_show_mix5:
heinrichsweikamp
parents:
diff changeset
503 btfsc divemode
heinrichsweikamp
parents:
diff changeset
504 bra customview_show_mix6
heinrichsweikamp
parents:
diff changeset
505 STRCAT_TEXT tSelectTx ; Show "Tx"
heinrichsweikamp
parents:
diff changeset
506 customview_show_mix6:
heinrichsweikamp
parents:
diff changeset
507 output_99 ; O2 ratio is still in "lo"
heinrichsweikamp
parents:
diff changeset
508 PUTC "/"
heinrichsweikamp
parents:
diff changeset
509 movff hi,lo
heinrichsweikamp
parents:
diff changeset
510 output_99 ; He ratio
heinrichsweikamp
parents:
diff changeset
511 return
heinrichsweikamp
parents:
diff changeset
512
heinrichsweikamp
parents:
diff changeset
513 END