annotate src/customview.asm @ 572:0039f057b90f

Fix time of dive in internal logbook
author heinrichsweikamp
date Mon, 12 Feb 2018 16:24:58 +0100
parents b7eb98dbd800
children 690bfb76911c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
3 ; File customview.asm REFACTORED VERSION V2.95
0
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
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 256
diff changeset
14 #include "hwos.inc" ; Mandatory header
0
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"
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
24 #include "start.inc"
0
heinrichsweikamp
parents:
diff changeset
25
heinrichsweikamp
parents:
diff changeset
26 gui CODE
heinrichsweikamp
parents:
diff changeset
27
heinrichsweikamp
parents:
diff changeset
28 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
29 ; Do every-second tasks for the custom view area (Dive mode)
heinrichsweikamp
parents:
diff changeset
30
heinrichsweikamp
parents:
diff changeset
31 global customview_second
heinrichsweikamp
parents:
diff changeset
32 customview_second:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
33 movff menupos3,WREG ; copy current view (1-...)
0
heinrichsweikamp
parents:
diff changeset
34 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
35 goto TFT_update_ppo2_sensors ; Update Sensor data ; and return
0
heinrichsweikamp
parents:
diff changeset
36 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
37 goto TFT_update_avr_stopwatch ; Update average depth and stopwatch; and return
0
heinrichsweikamp
parents:
diff changeset
38 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
39 goto TFT_decoplan ; Show decoplan ; and return
0
heinrichsweikamp
parents:
diff changeset
40 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
41 goto TFT_battinfo_tissues_clock ; Update Battery, Tissues and clock ; and return
0
heinrichsweikamp
parents:
diff changeset
42 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
43 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
44 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
45 return ; Compass updated separately (faster) in divemode;
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
46 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
47 nop ; ex goto TFT_dyn_gaslist
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
48 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
49 goto TFT_CNS ; Show CNS values for end-of-dive, ex goto TFT_hud_voltages
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
50 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
51 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
52 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
53 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
54 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
55 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
56 dcfsnz WREG,F
c0ee33f1f399 New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents: 476
diff changeset
57 goto TFT_pscr_info ; Show ppO2, drop and lung ratio; and return
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
58 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
59 goto TFT_gas_needs ; Show gas needs
482
c0ee33f1f399 New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents: 476
diff changeset
60
0
heinrichsweikamp
parents:
diff changeset
61 ; Menupos3=0, do nothing
heinrichsweikamp
parents:
diff changeset
62 return
heinrichsweikamp
parents:
diff changeset
63
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
64 customview_1sec_view9: ; Ceiling
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
65 call TFT_ceiling ; Show Ceiling
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
66 call TFT_display_pure_ppo2 ; ppO2 value
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
67 extern char_I_deco_model ; current GF value
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
68 TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
69 return ; No GF info for non-GF modes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
70 goto TFT_gf_info ; Update GF informations ; and return
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
71
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
72 global customview_alternative_second
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
73 customview_alternative_second:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
74 movff menupos3,WREG ; copy current view (1-...)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
75 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
76 bra customview_alt_second_view1 ; View 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
77 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
78 nop ; View 2
413
12e85930d95c NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents: 376
diff changeset
79
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
80 ; Menupos3=0, do nothing
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
81 return
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
82
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
83 customview_alt_second_view1:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
84 bsf FLAG_TFT_max_depth_alt
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
85 bsf FLAG_TFT_big_deco_alt
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
86 return
0
heinrichsweikamp
parents:
diff changeset
87
heinrichsweikamp
parents:
diff changeset
88 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
89 ; Do every-minute tasks for the custom view area
heinrichsweikamp
parents:
diff changeset
90
heinrichsweikamp
parents:
diff changeset
91 global customview_minute
heinrichsweikamp
parents:
diff changeset
92 customview_minute:
heinrichsweikamp
parents:
diff changeset
93 return
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
94 ; movff menupos3,WREG ; copy
0
heinrichsweikamp
parents:
diff changeset
95 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
96 ; bra customview_1min_view1
heinrichsweikamp
parents:
diff changeset
97 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
98 ; bra customview_1min_view2
heinrichsweikamp
parents:
diff changeset
99 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
100 ; bra customview_1min_view3
heinrichsweikamp
parents:
diff changeset
101 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
102 ; bra customview_1min_view4
heinrichsweikamp
parents:
diff changeset
103 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
104 ; bra customview_1min_view5
heinrichsweikamp
parents:
diff changeset
105 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
106 ; bra customview_1min_view6
heinrichsweikamp
parents:
diff changeset
107 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
108 ; bra customview_1min_view7
heinrichsweikamp
parents:
diff changeset
109 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
110 ; bra customview_1min_view8
heinrichsweikamp
parents:
diff changeset
111 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
112 ; bra customview_1min_view9
heinrichsweikamp
parents:
diff changeset
113 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
114 ; bra customview_1min_view10
heinrichsweikamp
parents:
diff changeset
115 ; dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
116 ; bra customview_1min_view11
heinrichsweikamp
parents:
diff changeset
117 ; ; Menupos3=0, do nothing
heinrichsweikamp
parents:
diff changeset
118 ; return
heinrichsweikamp
parents:
diff changeset
119 ;
heinrichsweikamp
parents:
diff changeset
120 ;customview_1min_view1:
heinrichsweikamp
parents:
diff changeset
121 ;customview_1min_view2:
heinrichsweikamp
parents:
diff changeset
122 ;customview_1min_view3:
heinrichsweikamp
parents:
diff changeset
123 ;customview_1min_view4:
heinrichsweikamp
parents:
diff changeset
124 ;customview_1min_view5:
heinrichsweikamp
parents:
diff changeset
125 ;customview_1min_view6:
heinrichsweikamp
parents:
diff changeset
126 ;customview_1min_view7:
heinrichsweikamp
parents:
diff changeset
127 ;customview_1min_view8:
heinrichsweikamp
parents:
diff changeset
128 ;customview_1min_view9:
heinrichsweikamp
parents:
diff changeset
129 ;customview_1min_view10:
heinrichsweikamp
parents:
diff changeset
130 ;customview_1min_view11:
heinrichsweikamp
parents:
diff changeset
131 ; return
heinrichsweikamp
parents:
diff changeset
132
heinrichsweikamp
parents:
diff changeset
133 global surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
134 surf_customview_toggle:
heinrichsweikamp
parents:
diff changeset
135 bcf switch_right
heinrichsweikamp
parents:
diff changeset
136 incf menupos3,F ; Number of customview to show
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
137 movlw d'9' ; Max number of customsviews in surface mode
0
heinrichsweikamp
parents:
diff changeset
138 cpfsgt menupos3 ; Max reached?
heinrichsweikamp
parents:
diff changeset
139 bra surf_customview_mask ; No, show
heinrichsweikamp
parents:
diff changeset
140 movlw .1
heinrichsweikamp
parents:
diff changeset
141 movwf menupos3 ; Reset to one (Always one custom view visible)
heinrichsweikamp
parents:
diff changeset
142
heinrichsweikamp
parents:
diff changeset
143 global surf_customview_mask
heinrichsweikamp
parents:
diff changeset
144 surf_customview_mask:
48
7c7d7644ca37 Time and Date in normal (Not tiny) font
heinrichsweikamp
parents: 41
diff changeset
145 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
146 ; Prepare title
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
147 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
148 WIN_COLOR color_greenish
0
heinrichsweikamp
parents:
diff changeset
149 movff menupos3,WREG ; Menupos3 holds number of customview function
heinrichsweikamp
parents:
diff changeset
150 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
151 bra surf_customview_init_view1 ; OC Gas list
heinrichsweikamp
parents:
diff changeset
152 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
153 bra surf_customview_init_view2 ; CC Dil list
heinrichsweikamp
parents:
diff changeset
154 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
155 bra surf_customview_init_view3 ; CC SP list
heinrichsweikamp
parents:
diff changeset
156 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
157 bra surf_customview_init_view4 ; Custom Text
heinrichsweikamp
parents:
diff changeset
158 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
159 bra surf_customview_init_view5 ; Tissue Diagram
503
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
160 dcfsnz WREG,F
0
heinrichsweikamp
parents:
diff changeset
161 bra surf_customview_init_view6 ; Compass
503
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
162 dcfsnz WREG,F
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
163 bra surf_customview_init_view7 ; Deco settings
503
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
164 dcfsnz WREG,F
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
165 bra surf_customview_init_view8 ; Last Dive info
530
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
166 dcfsnz WREG,F
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
167 bra surf_customview_init_view9 ; Sensor mV readings
0
heinrichsweikamp
parents:
diff changeset
168
heinrichsweikamp
parents:
diff changeset
169 call I2C_sleep_accelerometer ; Stop accelerometer
heinrichsweikamp
parents:
diff changeset
170 call I2C_sleep_compass ; Stop compass
heinrichsweikamp
parents:
diff changeset
171
heinrichsweikamp
parents:
diff changeset
172 movlw .1
heinrichsweikamp
parents:
diff changeset
173 movwf menupos3 ; Reset to one (Always one custom view visible)
heinrichsweikamp
parents:
diff changeset
174
heinrichsweikamp
parents:
diff changeset
175 surf_customview_init_view1: ; View1: OC Gas list
heinrichsweikamp
parents:
diff changeset
176 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
177 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
178 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
179 bra surf_customview_toggle
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
180 btfsc FLAG_ccr_mode
502
0910c227018f BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents: 485
diff changeset
181 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
182 btfsc FLAG_pscr_mode
0910c227018f BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents: 485
diff changeset
183 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
184 STRCPY_TEXT_PRINT tGaslist ; Title of customview
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
185 call TFT_standard_color
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
186 call TFT_gaslist_surfmode ; Show gas list
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
187 bra customview_toggle_exit ; Done.
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
189 surf_customview_init_view1_bail:
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
190 STRCPY_TEXT_PRINT tDiveBailout ; Title of customview
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
191 call TFT_standard_color
0
heinrichsweikamp
parents:
diff changeset
192 call TFT_gaslist_surfmode ; Show gas list
heinrichsweikamp
parents:
diff changeset
193 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
194
heinrichsweikamp
parents:
diff changeset
195 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
196 btfsc FLAG_pscr_mode
0910c227018f BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents: 485
diff changeset
197 bra surf_customview_init_view2_2
0
heinrichsweikamp
parents:
diff changeset
198 btfss FLAG_ccr_mode
heinrichsweikamp
parents:
diff changeset
199 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
200 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
201 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
202 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
203 bra surf_customview_toggle
502
0910c227018f BUGFIX: PSCR mode showed bailout gaslist instead of diluent gaslist
heinrichsweikamp
parents: 485
diff changeset
204 surf_customview_init_view2_2:
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
205 STRCPY_TEXT_PRINT tGaslistCC ; Title of customview
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
206 call TFT_standard_color
0
heinrichsweikamp
parents:
diff changeset
207 call TFT_dillist_surfmode ; Show diluent list
heinrichsweikamp
parents:
diff changeset
208 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
209
heinrichsweikamp
parents:
diff changeset
210 surf_customview_init_view3: ; View3: CC SP list
heinrichsweikamp
parents:
diff changeset
211 btfss FLAG_ccr_mode
heinrichsweikamp
parents:
diff changeset
212 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
213 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
214 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
215 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
216 bra surf_customview_toggle
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
217 STRCPY_TEXT_PRINT tFixedSetpoints ; Title of customview
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
218 call TFT_standard_color
0
heinrichsweikamp
parents:
diff changeset
219 call TFT_splist_surfmode ; Show Setpoint list
heinrichsweikamp
parents:
diff changeset
220 bra customview_toggle_exit ; Done.
530
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
221
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
222 surf_customview_init_view9: ; View 9: Sensor mV on the surface
530
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
223 btfsc FLAG_ccr_mode
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
224 bra surf_customview_init_view9a ; we are in CCR mode
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
225 btfsc FLAG_pscr_mode
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
226 bra surf_customview_init_view9a ; we are in PSCR mode
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
227 bra surf_customview_toggle ; we are not in any rebreather mode, so skip
530
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
228 surf_customview_init_view9a:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
229 movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
230 sublw .1 ; opt_ccr_mode = 1 (Sensor)?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
231 bnz surf_customview_toggle ; sorry, no sensors, skip again
530
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
232 STRCPY_TEXT_PRINT tSensorMilliVolt ; Title of customview
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
233 call TFT_standard_color
d36f9fca10ae 2.20beta release
heinrichsweikamp
parents: 525
diff changeset
234 extern TFT_sensor_mV
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
235 call TFT_sensor_mV ; write sensor mV readings to screen
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
236 bra customview_toggle_exit ; Done.
0
heinrichsweikamp
parents:
diff changeset
237
heinrichsweikamp
parents:
diff changeset
238 surf_customview_init_view4: ; View4: Custom text
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
239 call TFT_standard_color
0
heinrichsweikamp
parents:
diff changeset
240 call TFT_custom_text ; Show the custom text
heinrichsweikamp
parents:
diff changeset
241 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
242
heinrichsweikamp
parents:
diff changeset
243 surf_customview_init_view5: ; View5: Tissue Diagram
heinrichsweikamp
parents:
diff changeset
244 btfsc FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
245 bra surf_customview_toggle
heinrichsweikamp
parents:
diff changeset
246 btfsc FLAG_apnoe_mode
heinrichsweikamp
parents:
diff changeset
247 bra surf_customview_toggle
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
248 call TFT_standard_color
0
heinrichsweikamp
parents:
diff changeset
249 call TFT_surface_tissues ; Show Tissue diagram
heinrichsweikamp
parents:
diff changeset
250 bra customview_toggle_exit ; Done.
heinrichsweikamp
parents:
diff changeset
251
heinrichsweikamp
parents:
diff changeset
252 surf_customview_init_view6: ; View6: Compass
heinrichsweikamp
parents:
diff changeset
253 call I2C_init_accelerometer ; Start accelerometer
heinrichsweikamp
parents:
diff changeset
254 call I2C_init_compass ; Start compass
256
5b4ef0b9090d place compass display code into compass_ops.asm
heinrichsweikamp
parents: 254
diff changeset
255 extern TFT_surface_compass_mask
0
heinrichsweikamp
parents:
diff changeset
256 call TFT_surface_compass_mask ; Show compass
heinrichsweikamp
parents:
diff changeset
257 bra customview_toggle_exit ; Done.
503
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
258
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
259 surf_customview_init_view7:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
260 btfsc FLAG_gauge_mode ; View7: Deco settings
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
261 bra surf_customview_toggle
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
262 btfsc FLAG_apnoe_mode
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
263 bra surf_customview_toggle
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
264
41
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
265 call TFT_surface_decosettings ; Show all deco settings
5041477eee79 Surface customview with important deco settings
mh@mh-THINK
parents: 39
diff changeset
266 bra customview_toggle_exit ; Done.
0
heinrichsweikamp
parents:
diff changeset
267
503
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
268 surf_customview_init_view8: ; View8: Last dive info
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
269 call TFT_surface_lastdive ; Show last dive interval
503
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
270 bra customview_toggle_exit ; Done.
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
271
4542d03f748a NEW: Last Dive customviews in surface mode with divetime, depth and interval
heinrichsweikamp
parents: 502
diff changeset
272
0
heinrichsweikamp
parents:
diff changeset
273 global menuview_toggle
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
274 menuview_toggle: ; Show Menu or the simulator tasks
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
275 btfss alternative_divelayout ; In alternative layout mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
276 bra menuview_toggle2 ; No
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
277 ; Switch back to normal mode for any menu tasks
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
278 bcf alternative_divelayout ; clear flag
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
279 bsf FLAG_TFT_divemode_mask ; Set flag for mask
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
280 bsf FLAG_TFT_max_depth ; set flag
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
281 btfss decostop_active ; deco?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
282 bsf FLAG_TFT_display_ndl_mask ; NDL
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
283 btfsc decostop_active ; deco?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
284 bsf FLAG_TFT_display_deko_mask ; Deco
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
285 call TFT_ClearScreen ; Clear screen
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
286 rcall customview_mask ; Re-Draw customview
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
287
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
288 menuview_toggle2:
0
heinrichsweikamp
parents:
diff changeset
289 movlw divemode_menuview_timeout
heinrichsweikamp
parents:
diff changeset
290 movwf timeout_counter3
heinrichsweikamp
parents:
diff changeset
291 bsf menuview
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
292 bcf switch_left
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
293 incf menupos2,F ; Number of options to show
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
294 movlw d'10' ; Max number of options in divemode
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
295 cpfsgt menupos2 ; Max reached?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
296 bra menuview_mask ; No, show
0
heinrichsweikamp
parents:
diff changeset
297 global menuview_toggle_reset
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
298 menuview_toggle_reset: ; Timeout occurred
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
299 clrf menupos2
0
heinrichsweikamp
parents:
diff changeset
300 bcf menuview
heinrichsweikamp
parents:
diff changeset
301 menuview_mask:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
302 WIN_BOX_BLACK dm_simtext_row, dm_simtext_row+.23, dm_simtext_column, dm_simtext_column+.45 ; top, bottom, left, right - old value was .49
0
heinrichsweikamp
parents:
diff changeset
303 btfss FLAG_gauge_mode
heinrichsweikamp
parents:
diff changeset
304 bra menuview_mask2
315
4f83470dcece VSIbar #3: remaining changes for the split style bar
Janos Kovacs <kovjanos@gmail.com>
parents: 300
diff changeset
305 ; 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
306 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
307 menuview_mask2:
315
4f83470dcece VSIbar #3: remaining changes for the split style bar
Janos Kovacs <kovjanos@gmail.com>
parents: 300
diff changeset
308 call TFT_draw_gassep_line
0
heinrichsweikamp
parents:
diff changeset
309 movlw color_yellow
heinrichsweikamp
parents:
diff changeset
310 call TFT_set_color
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
311 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
312 WIN_SMALL dm_simtext_column,dm_simtext_row
0
heinrichsweikamp
parents:
diff changeset
313 movff menupos2,WREG ; Menupos2 holds number of menu option to show
heinrichsweikamp
parents:
diff changeset
314 dcfsnz WREG,F
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
315 bra menuview_view_gaschange ; If a better gas is indicated
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
316 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
317 bra menuview_view1 ; "Menu?" (Not in Gauge and Anpnoe)
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
318 dcfsnz WREG,F
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
319 bra menuview_view2 ; "Quit Simulation?" (Sim only)
0
heinrichsweikamp
parents:
diff changeset
320 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
321 bra menuview_view3 ; "Descent 1m" (Sim only)
0
heinrichsweikamp
parents:
diff changeset
322 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
323 bra menuview_view4 ; "Ascend 1m" (Sim only)
0
heinrichsweikamp
parents:
diff changeset
324 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
325 bra menuview_view5 ; "Quit Apnea mode?" (Apnea only)
0
heinrichsweikamp
parents:
diff changeset
326 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
327 bra menuview_view6 ; "Reset Avr." (Gauge only)
0
heinrichsweikamp
parents:
diff changeset
328 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
329 bra menuview_view7 ; "Sim:+5mins" (Sim only)
216
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
330 dcfsnz WREG,F
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
331 bra menuview_view8 ; "Heading" (When compass is shown)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
332 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
333 bra menuview_view9 ; "Layout" (Alternative Layout, aka Blind mode)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
334
0
heinrichsweikamp
parents:
diff changeset
335 menuview_exit:
heinrichsweikamp
parents:
diff changeset
336 call TFT_standard_color
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
337 bcf win_invert ; Reset invert flag
0
heinrichsweikamp
parents:
diff changeset
338 return ; Menupos2 = 0, Show nothing
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
339
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
340
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
341 menuview_view_gaschange:
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
342 extern gaslist_strcat_gas_mod
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
343 btfss better_gas_available ; =1: A better gas is available
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
344 bra menuview_toggle ; No, call next option
138
2852b0bd6391 minor: some extra protection against wrong gas selection
heinrichsweikamp
parents: 137
diff changeset
345 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
346 bra menuview_toggle
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
347 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
348 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
349 decf PRODL,F
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
350 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
351 movlw .5
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
352 movwf FSR2L ; Point to char 6 (5 chars gas description only)
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
353 STRCAT_PRINT "?"
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
354 bra menuview_exit ; Done.
0
heinrichsweikamp
parents:
diff changeset
355 menuview_view1:
heinrichsweikamp
parents:
diff changeset
356 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
357 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
358 btfsc FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
359 bra menuview_toggle ; Call next option
heinrichsweikamp
parents:
diff changeset
360 STRCPY_TEXT_PRINT tDivePreMenu ; "Menu?"
heinrichsweikamp
parents:
diff changeset
361 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
362 menuview_view2:
heinrichsweikamp
parents:
diff changeset
363 btfss simulatormode_active ; View only for simulator mode
heinrichsweikamp
parents:
diff changeset
364 bra menuview_toggle ; Call next option
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
365 STRCPY_TEXT_PRINT tQuitSim ; "Quit Simulation?"
0
heinrichsweikamp
parents:
diff changeset
366 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
367 menuview_view3:
heinrichsweikamp
parents:
diff changeset
368 btfss simulatormode_active ; View only for simulator mode
heinrichsweikamp
parents:
diff changeset
369 bra menuview_toggle ; Call next option
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
370 STRCPY_PRINT "Sim-1m" ; CHANGED, now "-" for going down
0
heinrichsweikamp
parents:
diff changeset
371 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
372 menuview_view4:
heinrichsweikamp
parents:
diff changeset
373 btfss simulatormode_active ; View only for simulator mode
heinrichsweikamp
parents:
diff changeset
374 bra menuview_toggle ; Call next option
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
375 STRCPY_PRINT "Sim+1m" ; CHANGED, now "+" for going up
0
heinrichsweikamp
parents:
diff changeset
376 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
377 menuview_view5:
heinrichsweikamp
parents:
diff changeset
378 btfss FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
379 bra menuview_toggle ; No, call next option
184
faa06c58e977 BUGFIX: Quit Apnea mode on the surface manually
heinrichsweikamp
parents: 148
diff changeset
380 btfss FLAG_active_descent ; Are we descending?
0
heinrichsweikamp
parents:
diff changeset
381 bra menuview_toggle ; Yes
heinrichsweikamp
parents:
diff changeset
382 ; We are at the surface:
148
022b886eddaf some cleanup
heinrichsweikamp
parents: 138
diff changeset
383 STRCPY_TEXT_PRINT tQuitSim ; "Quit Apnea mode?"
0
heinrichsweikamp
parents:
diff changeset
384 bra menuview_exit ; Done.
heinrichsweikamp
parents:
diff changeset
385 menuview_view6:
heinrichsweikamp
parents:
diff changeset
386 btfss FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
387 bra menuview_toggle ; No, call next option
437
23b58c4bc6aa CHANGE: Language fixes, 2.08 release
heinrichsweikamp
parents: 428
diff changeset
388 STRCPY_TEXT_PRINT tDivemenu_ResetAvg ; "Reset Avg."
0
heinrichsweikamp
parents:
diff changeset
389 bra menuview_exit ; Done.
216
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
390 menuview_view7:
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
391 btfss simulatormode_active ; View only for simulator mode
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
392 bra menuview_toggle ; Call next option
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
393 btfsc FLAG_gauge_mode ; In Gauge mode?
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
394 bra menuview_toggle ; Yes, call next option
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
395 btfsc FLAG_apnoe_mode ; In Apnoe mode?
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
396 bra menuview_toggle ; Yes, call next option
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
397 STRCPY_PRINT "Sim+5'"
216
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
398 bra menuview_exit ; Done.
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
399 menuview_view8:
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
400 movlw .6
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
401 cpfseq menupos3 ; in compass view?
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
402 bra menuview_toggle ; No, call next option
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
403 STRCPY_TEXT_PRINT tSetHeading ; "Heading"
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
404 bra menuview_exit ; Done.
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
405 menuview_view9:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
406 STRCPY_PRINT "Layout"
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
407 bra menuview_exit ; Done.
0
heinrichsweikamp
parents:
diff changeset
408
heinrichsweikamp
parents:
diff changeset
409
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
410
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
411
0
heinrichsweikamp
parents:
diff changeset
412 ;=============================================================================
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
413
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
414 customview_toggle_alternative:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
415 movlw d'1' ; Max number of customviews in divemode, alternative layout
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
416 cpfsgt menupos3 ; Max reached?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
417 bra customview_mask_alternative ; No, show
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
418 movlw .1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
419 movwf menupos3 ; Reset to one, always one customview visible in alternative layout
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
420 customview_mask_alternative:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
421 ; Clear custom view area in divemode
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
422 WIN_BOX_BLACK dm_customview_row, .239, .0, .159 ; top, bottom, left, right
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
423 call TFT_standard_color
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
424 movff menupos3,WREG ; Menupos3 holds number of customview function
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
425 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
426 bra customview_alt_init_view1 ; View 1: Big deco/ndl and max. depth
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
427 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
428 bra customview_alt_init_view2 ; View 2:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
429
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
430 ;bra customview_alternative_toggle_exit ; No view (menupos3=0)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
431
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
432 customview_alt_toggle_exit:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
433 call TFT_standard_color
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
434 bcf toggle_customview ; Clear flag
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
435 return
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
436
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
437 customview_alt_init_view1: ; View 1: Big deco/ndl and max. depth
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
438 call TFT_max_depth_alternative
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
439 call TFT_big_deco_alt
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
440 bra customview_alt_toggle_exit
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
441
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
442 customview_alt_init_view2:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
443 ; /* Just for test...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
444 call TFT_mask_avr_stopwatch ; Show mask for average depth and stopwatch
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
445 call TFT_update_avr_stopwatch ; Update average depth and stopwatch
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
446 ; ...Just for test */
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
447
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
448 bra customview_alt_toggle_exit
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
449
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
450
0
heinrichsweikamp
parents:
diff changeset
451 ; Show next customview (and delete this flag)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
452 global customview_toggle
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
453 customview_toggle:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
454 bcf switch_right
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
455 incf menupos3,F ; Number of customview to show
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
456
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
457 btfsc alternative_divelayout ; In alternative layout mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
458 bra customview_toggle_alternative ; Yes, use the big ones instead
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
459
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
460 movlw d'13' ; Max number of customviews in divemode
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
461 cpfsgt menupos3 ; Max reached?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
462 bra customview_mask ; No, show
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
463 clrf menupos3 ; Reset to zero (Zero=no custom view)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
464
39
e4e91fe8b09d remember last customview in dive and surface mode
mh@mh-THINK.fritz.box
parents: 0
diff changeset
465 global customview_mask
0
heinrichsweikamp
parents:
diff changeset
466 customview_mask:
353
573f2251cf49 NEW: Quit Simulator automatically when starting a real dive
heinrichsweikamp
parents: 337
diff changeset
467 ; Clear custom view area in divemode
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
468 WIN_BOX_BLACK dm_customview_row, dm_customview_bot-.2, 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
469 WIN_SMALL dm_customview_column,dm_customview_row
0
heinrichsweikamp
parents:
diff changeset
470 call TFT_standard_color
heinrichsweikamp
parents:
diff changeset
471 movff menupos3,WREG ; Menupos3 holds number of customview function
heinrichsweikamp
parents:
diff changeset
472 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
473 bra customview_init_view1 ; Update Sensor data
0
heinrichsweikamp
parents:
diff changeset
474 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
475 bra customview_init_view2 ; average depth and stopwatch
0
heinrichsweikamp
parents:
diff changeset
476 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
477 bra customview_init_view3 ; Decoplan
0
heinrichsweikamp
parents:
diff changeset
478 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
479 bra customview_init_view4 ; Battery info, Tissues and clock
0
heinrichsweikamp
parents:
diff changeset
480 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
481 bra customview_init_view5 ; GF informations
heinrichsweikamp
parents:
diff changeset
482 dcfsnz WREG,F
heinrichsweikamp
parents:
diff changeset
483 bra customview_init_view6 ; Compass
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
484 dcfsnz WREG,F
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
485 bra customview_init_view7 ; Dynamic gaslist
105
0aaa4877ba25 Show HUD voltages only in CCR mode...
heinrichsweikamp
parents: 102
diff changeset
486 dcfsnz WREG,F
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
487 bra customview_init_view8 ; HIJACKED for CNS (ex HUD voltages)
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
488 dcfsnz WREG,F
471
9edb1359ce43 NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents: 437
diff changeset
489 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
490 dcfsnz WREG,F
12e85930d95c NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents: 376
diff changeset
491 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
492 dcfsnz WREG,F
9edb1359ce43 NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents: 437
diff changeset
493 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
494 dcfsnz WREG,F
c0ee33f1f399 New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents: 476
diff changeset
495 bra customview_init_view12 ; PSCR Info
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
496 ; NEW ## bailout gas needs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
497 dcfsnz WREG,F
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
498 bra customview_init_view13 ; Gas needs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
499
0
heinrichsweikamp
parents:
diff changeset
500 customview_init_nocustomview:
heinrichsweikamp
parents:
diff changeset
501 call I2C_sleep_accelerometer ; Stop accelerometer
heinrichsweikamp
parents:
diff changeset
502 call I2C_sleep_compass ; Stop compass
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
503 bra customview_toggle_exit
0
heinrichsweikamp
parents:
diff changeset
504
heinrichsweikamp
parents:
diff changeset
505 customview_init_view1:
485
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
506 btfsc FLAG_apnoe_mode ; In Apnoe mode?
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
507 bra customview_toggle ; yes, Call next view...
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
508 btfsc FLAG_pscr_mode ; In PSCR mode?
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
509 bra customview_init_view1a ; Yes
485
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
510 btfss FLAG_ccr_mode ; In CC mode?
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
511 bra customview_toggle ; no, Call next view...
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
512
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
513 customview_init_view1a:
249
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 216
diff changeset
514 movf hardware_flag,W
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 216
diff changeset
515 sublw 0x11 ; 2 with BLE
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 216
diff changeset
516 btfsc STATUS,Z
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 216
diff changeset
517 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
518 movf hardware_flag,W
7c10557c248e no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents: 472
diff changeset
519 sublw 0x13 ; +
7c10557c248e no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents: 472
diff changeset
520 btfsc STATUS,Z
7c10557c248e no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents: 472
diff changeset
521 bra customview_toggle ; no, Call next view...
0
heinrichsweikamp
parents:
diff changeset
522
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
523 call TFT_hud_mask ; Setup HUD mask
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
524 call TFT_update_ppo2_sensors ; Update Sensor data
485
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
525 bra customview_toggle_exit
0
heinrichsweikamp
parents:
diff changeset
526
heinrichsweikamp
parents:
diff changeset
527 customview_init_view2:
heinrichsweikamp
parents:
diff changeset
528 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
529 bra customview_toggle ; Yes, Call next view...
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
530 call TFT_mask_avr_stopwatch ; Show mask for average depth and stopwatch
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
531 call TFT_update_avr_stopwatch ; Update average depth and stopwatch
0
heinrichsweikamp
parents:
diff changeset
532 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
533
heinrichsweikamp
parents:
diff changeset
534 customview_init_view3:
heinrichsweikamp
parents:
diff changeset
535 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
536 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
537 btfsc FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
538 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
539 call TFT_decoplan ; Show decoplan
heinrichsweikamp
parents:
diff changeset
540 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
541
heinrichsweikamp
parents:
diff changeset
542 customview_init_view4:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
543 call TFT_battinfo_tissues_clock_mask ; Setup Mask
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
544 call TFT_battinfo_tissues_clock ; Show Battery info, Tissues and clock
0
heinrichsweikamp
parents:
diff changeset
545 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
546
heinrichsweikamp
parents:
diff changeset
547 customview_init_view5:
heinrichsweikamp
parents:
diff changeset
548 btfsc FLAG_apnoe_mode ; In Apnoe mode?
heinrichsweikamp
parents:
diff changeset
549 bra customview_toggle ; Yes, Call next view...
heinrichsweikamp
parents:
diff changeset
550 btfsc FLAG_gauge_mode ; In Gauge mode?
heinrichsweikamp
parents:
diff changeset
551 bra customview_toggle ; Yes, Call next view...
119
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
552
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
553 extern char_I_deco_model
2acf3d068fae Do not show "GF info" for non-GF modes
heinrichsweikamp
parents: 105
diff changeset
554 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
555 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
556
0
heinrichsweikamp
parents:
diff changeset
557 call TFT_gf_mask ; Setup Mask
heinrichsweikamp
parents:
diff changeset
558 call TFT_gf_info ; Show GF informations
heinrichsweikamp
parents:
diff changeset
559 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
560
heinrichsweikamp
parents:
diff changeset
561 customview_init_view6: ; Compass (View 6)
heinrichsweikamp
parents:
diff changeset
562 call I2C_init_accelerometer ; Start accelerometer
heinrichsweikamp
parents:
diff changeset
563 call I2C_init_compass ; Start compass
256
5b4ef0b9090d place compass display code into compass_ops.asm
heinrichsweikamp
parents: 254
diff changeset
564 extern TFT_dive_compass_mask
0
heinrichsweikamp
parents:
diff changeset
565 call TFT_dive_compass_mask ; Show compass
heinrichsweikamp
parents:
diff changeset
566 bra customview_toggle_exit
heinrichsweikamp
parents:
diff changeset
567
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
568 ; MODIFIED - view disabled ## memory
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
569 customview_init_view7: ; Dynamic gaslist (View 7)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
570 ; btfsc FLAG_apnoe_mode ; In Apnoe mode?
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
571 bra customview_toggle ; Yes, Call next view...
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
572 ; btfsc FLAG_ccr_mode ; In CC mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
573 ; bra customview_toggle ; Yes, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
574 ; call TFT_dyn_gaslist ; Show the dyn gaslist
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
575 ; bra customview_toggle_exit
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
576
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
577 customview_init_view8: ; HIJACKED for CNS outputs (ex Sensor millivolts)
136
9a637c9bb19a rename Deco Planner to Simulator
heinrichsweikamp
parents: 134
diff changeset
578 btfsc FLAG_gauge_mode ; In Gauge mode?
9a637c9bb19a rename Deco Planner to Simulator
heinrichsweikamp
parents: 134
diff changeset
579 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
580 btfsc FLAG_apnoe_mode ; In Apnoe mode?
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
581 bra customview_toggle ; yes, Call next view...
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
582 ; REPLACE ## CNS at end-of-dive
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
583 ; btfsc FLAG_pscr_mode ; In PSCR mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
584 ; bra customview_init_view8a ; Yes
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
585 ; btfss FLAG_ccr_mode ; In CC mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
586 ; bra customview_toggle ; no, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
587 ; customview_init_view8a:
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
588 ; movf hardware_flag,W
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
589 ; sublw 0x13 ; +
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
590 ; btfsc STATUS,Z
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
591 ; bra customview_toggle ; no, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
592 ; movff opt_ccr_mode,WREG ; =0: Fixed SP, =1: Sensor, =2: Auto SP
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
593 ; sublw .1 ; opt_ccr_mode = 1 (Sensor)?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
594 ; bnz customview_toggle ; no, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
595 ; call TFT_hud_mask ; Setup HUD mask
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
596 ; call TFT_hud_voltages ; Show HUD details
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
597 ; BY
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
598 call TFT_CNS_mask
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
599 call TFT_CNS
476
7c10557c248e no sensors in surface mode if the computer has no sensor inputs
heinrichsweikamp
parents: 472
diff changeset
600
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
601 goto customview_toggle_exit
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
602
471
9edb1359ce43 NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents: 437
diff changeset
603 customview_init_view9: ; ppO2, Ceiling and current GF
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
604 btfsc FLAG_apnoe_mode ; In Apnoe mode?
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
605 bra customview_toggle ; yes, Call next view...
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
606 btfsc FLAG_gauge_mode ; In Gauge mode?
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
607 bra customview_toggle ; Yes, Call next view...
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
608 call TFT_ceiling_mask ; Setup mask
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
609 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
610
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
611 ; ppO2 value
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
612 call TFT_mask_ppo2
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
613 call TFT_display_pure_ppo2
333
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
614
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
615 ; current GF value
525
00df86a5ac01 BUGFIX: Do not show GF in divemode for non-GF deco mode
heinrichsweikamp
parents: 517
diff changeset
616 extern char_I_deco_model
00df86a5ac01 BUGFIX: Do not show GF in divemode for non-GF deco mode
heinrichsweikamp
parents: 517
diff changeset
617 TSTOSS char_I_deco_model ; 0 = ZH-L16, 1 = ZH-L16-GF
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
618 bra customview_toggle_exit ; No GF info for non-GF modes
525
00df86a5ac01 BUGFIX: Do not show GF in divemode for non-GF deco mode
heinrichsweikamp
parents: 517
diff changeset
619 ; current GF value
333
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
620 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
621 call TFT_gf_info ; Show GF informations
525
00df86a5ac01 BUGFIX: Do not show GF in divemode for non-GF deco mode
heinrichsweikamp
parents: 517
diff changeset
622 bra customview_toggle_exit
00df86a5ac01 BUGFIX: Do not show GF in divemode for non-GF deco mode
heinrichsweikamp
parents: 517
diff changeset
623
413
12e85930d95c NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents: 376
diff changeset
624 customview_init_view10: ; Sensor check
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
625 btfsc FLAG_apnoe_mode ; In Apnoe mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
626 bra customview_toggle ; yes, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
627 btfsc FLAG_gauge_mode ; In Gauge mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
628 bra customview_toggle ; Yes, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
629 btfss FLAG_ccr_mode ; In CC mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
630 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
631
12e85930d95c NEW: New Customview shows ppO2(O2) and ppO2(Diluent) during CCR mode
heinrichsweikamp
parents: 376
diff changeset
632 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
633 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
634 bra customview_toggle_exit
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
635
471
9edb1359ce43 NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents: 437
diff changeset
636 customview_init_view11: ; ppO2, END/EAD and CNS
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
637 btfsc FLAG_apnoe_mode ; In Apnoe mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
638 bra customview_toggle ; yes, Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
639 btfsc FLAG_gauge_mode ; In Gauge mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
640 bra customview_toggle ; Yes, Call next view...
471
9edb1359ce43 NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents: 437
diff changeset
641
9edb1359ce43 NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS
heinrichsweikamp
parents: 437
diff changeset
642 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
643 call TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS
485
18e047102e49 3.14 BETA release
heinrichsweikamp
parents: 482
diff changeset
644 goto customview_toggle_exit
482
c0ee33f1f399 New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents: 476
diff changeset
645
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
646 customview_init_view12: ; PSCR Info
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
647 btfss FLAG_pscr_mode ; In PSCR mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
648 bra customview_toggle ; No, Call next view...
482
c0ee33f1f399 New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents: 476
diff changeset
649
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
650 call TFT_pscr_info_mask ; Show ppO2, drop and lung ratio
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
651 call TFT_pscr_info ; Show ppO2, drop and lung ratio
482
c0ee33f1f399 New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
heinrichsweikamp
parents: 476
diff changeset
652 bra customview_toggle_exit
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
653
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
654 ; NEW ## bailout gas needs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
655 customview_init_view13: ; Gas Needs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
656 TSTOSS opt_calc_asc_gasvolume ; check if gas volume calculations is switched on
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
657 bra customview_toggle ; NO - Call next view...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
658 call TFT_gas_needs_mask ; YES - Show the mask for gas needs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
659 call TFT_gas_needs ; Show the gas needs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
660 bra customview_toggle_exit
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
661
0
heinrichsweikamp
parents:
diff changeset
662 customview_toggle_exit:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
663 btfsc divemode ; In Dive Mode?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
664 bsf FLAG_TFT_temp_divemode ; Set flag to redraw temp
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
665 call TFT_standard_color
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
666 bcf toggle_customview ; Clear flag
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
667 return
0
heinrichsweikamp
parents:
diff changeset
668
heinrichsweikamp
parents:
diff changeset
669 global customview_show_change_depth
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
670 customview_show_change_depth: ; Put " lom" or " loft" into Postinc2
0
heinrichsweikamp
parents:
diff changeset
671 PUTC " "
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
672 TSTOSS opt_units ; 0=m, 1=ft
0
heinrichsweikamp
parents:
diff changeset
673 bra customview_show_mix_metric
heinrichsweikamp
parents:
diff changeset
674 movf lo,W
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
675 mullw .100 ; convert meters to mbar
0
heinrichsweikamp
parents:
diff changeset
676 movff PRODL,lo
heinrichsweikamp
parents:
diff changeset
677 movff PRODH,hi
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
678 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
0
heinrichsweikamp
parents:
diff changeset
679 bsf leftbind
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
680 output_16 ; Change depth in lo:hi
0
heinrichsweikamp
parents:
diff changeset
681 bcf leftbind
heinrichsweikamp
parents:
diff changeset
682 STRCAT_TEXT tFeets
heinrichsweikamp
parents:
diff changeset
683 return
heinrichsweikamp
parents:
diff changeset
684 customview_show_mix_metric:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
685 output_99 ; Change depth in lo
0
heinrichsweikamp
parents:
diff changeset
686 STRCAT_TEXT tMeters
heinrichsweikamp
parents:
diff changeset
687 return
heinrichsweikamp
parents:
diff changeset
688
heinrichsweikamp
parents:
diff changeset
689
heinrichsweikamp
parents:
diff changeset
690 global customview_show_mix
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
691 customview_show_mix: ; Put "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
692 tstfsz hi ; He=0?
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
693 bra customview_show_mix5 ; No, Show a TX
0
heinrichsweikamp
parents:
diff changeset
694 movlw .21
heinrichsweikamp
parents:
diff changeset
695 cpfseq lo ; Air?
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
696 bra customview_show_mix2 ; No
0
heinrichsweikamp
parents:
diff changeset
697 STRCAT_TEXT tSelectAir ; Yes, show "Air"
heinrichsweikamp
parents:
diff changeset
698 bra customview_show_mix4b
heinrichsweikamp
parents:
diff changeset
699 customview_show_mix2:
heinrichsweikamp
parents:
diff changeset
700 movlw .100
heinrichsweikamp
parents:
diff changeset
701 cpfseq lo ; O2?
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
702 bra customview_show_mix3 ; No
0
heinrichsweikamp
parents:
diff changeset
703 STRCAT_TEXT tSelectO2 ; Yes, show "O2"
heinrichsweikamp
parents:
diff changeset
704 bra customview_show_mix4b
heinrichsweikamp
parents:
diff changeset
705
heinrichsweikamp
parents:
diff changeset
706 customview_show_mix3:
heinrichsweikamp
parents:
diff changeset
707 movlw .21
heinrichsweikamp
parents:
diff changeset
708 cpfslt lo ; < Nx21?
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
709 bra customview_show_mix4 ; No
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
710 STRCAT_TEXT tGasErr ; Yes, show "Err"
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
711 output_99 ; O2 ratio is still in "lo"
0
heinrichsweikamp
parents:
diff changeset
712 bra customview_show_mix4c
heinrichsweikamp
parents:
diff changeset
713
heinrichsweikamp
parents:
diff changeset
714 customview_show_mix4:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
715 STRCAT_TEXT tSelectNx ; Show "Nx"
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
716 output_99 ; O2 ratio is still in "lo"
0
heinrichsweikamp
parents:
diff changeset
717 customview_show_mix4b:
heinrichsweikamp
parents:
diff changeset
718 STRCAT " "
heinrichsweikamp
parents:
diff changeset
719 customview_show_mix4c:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
720 btfsc divemode ; In divemode
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
721 return ; Yes
0
heinrichsweikamp
parents:
diff changeset
722 STRCAT " "
heinrichsweikamp
parents:
diff changeset
723 return
heinrichsweikamp
parents:
diff changeset
724
heinrichsweikamp
parents:
diff changeset
725 customview_show_mix5:
heinrichsweikamp
parents:
diff changeset
726 btfsc divemode
heinrichsweikamp
parents:
diff changeset
727 bra customview_show_mix6
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
728 STRCAT_TEXT tSelectTx ; Show "Tx"
0
heinrichsweikamp
parents:
diff changeset
729 customview_show_mix6:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
730 output_99 ; O2 ratio is still in "lo"
0
heinrichsweikamp
parents:
diff changeset
731 PUTC "/"
heinrichsweikamp
parents:
diff changeset
732 movff hi,lo
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
733 output_99 ; He ratio
0
heinrichsweikamp
parents:
diff changeset
734 return
heinrichsweikamp
parents:
diff changeset
735
heinrichsweikamp
parents:
diff changeset
736 END