annotate src/customview.asm @ 629:237931377539

3.07 stable release
author heinrichsweikamp
date Fri, 29 Nov 2019 18:48:11 +0100
parents cd58f7fc86db
children 185ba2f91f59
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
3 ; File customview.asm combined next generation V3.03.5
0
heinrichsweikamp
parents:
diff changeset
4 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
5 ; Custom Views in Surface and Dive Mode
0
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
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
14 #include "hwos.inc" ; mandatory header
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
15 #include "tft_outputs.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
16 #include "strings.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
17 #include "tft.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
18 #include "wait.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
19 #include "surfmode.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
20 #include "convert.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
21 #include "divemode.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
22 #include "i2c.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
23 #include "start.inc"
0
heinrichsweikamp
parents:
diff changeset
24
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
25
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
26 extern gaslist_strcat_gas_cd
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
27 extern char_I_deco_model
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
28
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
29 IFDEF _compass
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
30 extern TFT_surface_compass_mask
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
31 extern TFT_dive_compass_mask
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
32 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
33
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
34
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
35 custview CODE
0
heinrichsweikamp
parents:
diff changeset
36
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
37 ;-----------------------------------------------------------------------------
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
38
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
39
0
heinrichsweikamp
parents:
diff changeset
40 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
41 ; Jump table for the every-second tasks for the custom view area (dive mode)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
42 ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
43 ; Attention: the ordering must be in line with the init jump table and the
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
44 ; index numbers defined in hwos.inc!
0
heinrichsweikamp
parents:
diff changeset
45
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
46 global dive_customview_second
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
47 dive_customview_second:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
48 movf active_customview,W ; get current view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
49 dcfsnz WREG,F ; 1:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
50 goto TFT_avr_stopwatch ; average depth and stopwatch
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
51 dcfsnz WREG,F ; 2:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
52 return ; compass - will be updated separately (faster) in dive mode
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
53 dcfsnz WREG,F ; 3:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
54 IFDEF _external_sensor
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
55 goto TFT_ppo2_sensors ; ppO2 sensors
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
56 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
57 return ; not available without external sensors
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
58 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
59 dcfsnz WREG,F ; 4:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
60 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
61 goto TFT_sensor_check ; sensor check
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
62 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
63 return ; not available without CCR / pSCR mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
64 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
65 dcfsnz WREG,F ; 5;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
66 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
67 goto TFT_pscr_info ; pSCR data
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
68 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
69 return ; not available without CCR / pSCR mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
70 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
71 dcfsnz WREG,F ; 6:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
72 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
73 goto TFT_pressures_SAC ; tank pressure and SAC rate
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
74 ELSE
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
75 return ; not available without RX functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
76 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
77 dcfsnz WREG,F ; 7:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
78 goto TFT_gas_needs_ascent ; gas needs for ascent / cave return
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
79 dcfsnz WREG,F ; 8:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
80 goto TFT_decoplan ; deco plan
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
81 dcfsnz WREG,F ; 9:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
82 goto TFT_ceiling_GF_tissue ; ceiling, current GF and tissues
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
83 dcfsnz WREG,F ; 10:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
84 goto TFT_CNS ; CNS values
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
85 dcfsnz WREG,F ; 11:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
86 goto TFT_ppo2_ead_end_cns ; ppO2, END/EAD and CNS
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
87 dcfsnz WREG,F ; 12:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
88 return ; GF factors - static only
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
89 dcfsnz WREG,F ; 13:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
90 goto TFT_clock_batt_surfpress ; clock, battery and surface pressure
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
91 return ; active_customview = 0 -> do nothing
0
heinrichsweikamp
parents:
diff changeset
92
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
93 ;-----------------------------------------------------------------------------
0
heinrichsweikamp
parents:
diff changeset
94
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
95 global surf_customview_toggle
0
heinrichsweikamp
parents:
diff changeset
96 surf_customview_toggle:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
97 bcf switch_right ; clear button event
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
98 incf active_customview,F ; number of custom view to show
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
99
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
100 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
101 movlw .6 ; index of surface custom view compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
102 cpfseq active_customview ; will compass be shown in custom view?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
103 call I2C_sleep_compass ; NO - stop compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
104 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
105
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
106 movlw d'10' ; max number of custom views in surface mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
107 cpfsgt active_customview ; max reached?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
108 bra surf_customview_mask ; NO - show
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
109 movlw .1 ; YES - wrap around to 1st view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
110 movwf active_customview ; - ...
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
111 ;bra surf_customview_mask ; - show
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
112
0
heinrichsweikamp
parents:
diff changeset
113
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
114 global surf_customview_mask
0
heinrichsweikamp
parents:
diff changeset
115 surf_customview_mask:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
116 WIN_BOX_BLACK .50,surf_warning1_row-1, .0, surf_decotype_column-.1 ; top, bottom, left, right
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
117 WIN_TINY surf_customview_title_column,surf_customview_title_row ; set title position
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
118 WIN_COLOR color_greenish ; set title color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
119
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
120 movf active_customview,W ; get custom view to show
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
121 movff WREG,customview_surfmode ; save number for later recall
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
122 dcfsnz WREG,F ; 1:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
123 bra surf_customview_init_view1 ; OC gas list
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
124 dcfsnz WREG,F ; 2:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
125 bra surf_customview_init_view2 ; CC dil list
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
126 dcfsnz WREG,F ; 3:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
127 bra surf_customview_init_view3 ; CC SP list
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
128 dcfsnz WREG,F ; 4:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
129 bra surf_customview_init_view4 ; custom text
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
130 dcfsnz WREG,F ; 5:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
131 bra surf_customview_init_view5 ; tissue diagram
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
132 dcfsnz WREG,F ; 6:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
133 bra surf_customview_init_view6 ; compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
134 dcfsnz WREG,F ; 7:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
135 bra surf_customview_init_view7 ; deco settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
136 dcfsnz WREG,F ; 8:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
137 bra surf_customview_init_view8 ; last dive info
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
138 dcfsnz WREG,F ; 9:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
139 bra surf_customview_init_view9 ; sensor mV readings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
140 dcfsnz WREG,F ; 10:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
141 bra surf_customview_init_view10 ; tank data
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
142 bra surf_customview_init_view4 ; default view after restart and loading of new firmware
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
143
0
heinrichsweikamp
parents:
diff changeset
144
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
145 surf_customview_init_view1: ; view 1: OC Gas list
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
146 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
147 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
148 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
149 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
150 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
151 btfss FLAG_oc_mode ; in OC mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
152 bra surf_customview_init_view1a ; NO - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
153 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
154 STRCPY_TEXT_PRINT tGaslist ; YES - title of custom view / OC mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
155 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
156 bra surf_customview_init_view1b ; - continue with common part
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
157 surf_customview_init_view1a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
158 STRCPY_TEXT_PRINT tDiveBailout ; (1) - title of custom view / CCR & pSCR mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
159 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
160 surf_customview_init_view1b:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
161 call TFT_standard_color ; set color
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
162 call TFT_gaslist_surfmode ; show gas list
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
163 bra customview_toggle_exit ; done
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
164
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
165
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
166 surf_customview_init_view2: ; view 2: CCR / pSCR diluent list
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
167 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
168 btfsc FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
169 bra surf_customview_init_view2a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
170 btfsc FLAG_pscr_mode ; in pSCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
171 bra surf_customview_init_view2a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
172 bra surf_customview_toggle ; NO - not available if not in CCR or pSCR mode, goto next view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
173 surf_customview_init_view2a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
174 STRCPY_TEXT_PRINT tGaslistCC ; (1) - title of custom view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
175 call TFT_standard_color ; - set color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
176 call TFT_dillist_surfmode ; - show diluent list
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
177 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
178 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
179 bra surf_customview_toggle ; not available without CCR/pSCR mode compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
180 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
181
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
182
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
183 surf_customview_init_view3: ; view 3: CC SP list
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
184 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
185 btfss FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
186 bra surf_customview_toggle ; NO - not available if not in CCR mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
187 STRCPY_TEXT_PRINT tFixedSetpoints ; YES - title of custom view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
188 call TFT_standard_color ; - set color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
189 call TFT_splist_surfmode ; - show setpoint list
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
190 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
191 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
192 bra surf_customview_toggle ; not available without CCR/pSCR mode compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
193 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
194
0
heinrichsweikamp
parents:
diff changeset
195
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
196 surf_customview_init_view9: ; view 9: sensor mV at the surface
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
197 IFDEF _external_sensor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
198 btfsc FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
199 bra surf_customview_init_view9a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
200 btfsc FLAG_pscr_mode ; in pSCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
201 bra surf_customview_init_view9a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
202 bra surf_customview_toggle ; NO - not available if not in CCR or pSCR mode, goto next view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
203 surf_customview_init_view9a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
204 movff opt_ccr_mode,WREG ; (1) - get SP mode (0: fixed SP, 1: Sensor, 2: auto SP)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
205 sublw .1 ; - opt_ccr_mode = 1 (sensor)?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
206 bnz surf_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
207 STRCPY_TEXT_PRINT tSensorMilliVolt ; YES - title of custom view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
208 call TFT_standard_color ; - set color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
209 call TFT_sensor_mV ; - write sensor mV readings to screen
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
210 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
211 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
212 bra surf_customview_toggle ; not available without CCR/pSCR mode compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
213 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
214
0
heinrichsweikamp
parents:
diff changeset
215
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
216 surf_customview_init_view4: ; view 4: custom text
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
217 call TFT_standard_color ; set color
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
218 call TFT_custom_text ; show the custom text
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
219 bra customview_toggle_exit ; done
0
heinrichsweikamp
parents:
diff changeset
220
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
221
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
222 surf_customview_init_view5: ; view 5: tissue diagram
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
223 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
224 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
225 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
226 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
227 call TFT_standard_color ; set color
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
228 call TFT_surface_tissues ; show tissue diagram
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
229 bra customview_toggle_exit ; done
0
heinrichsweikamp
parents:
diff changeset
230
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
231
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
232 surf_customview_init_view6: ; view 6: compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
233 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
234 call I2C_init_compass ; start compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
235 call TFT_surface_compass_mask ; show compass mask
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
236 bra customview_toggle_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
237 ELSE
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
238 bra surf_customview_toggle ; not available without compass compiled in, goto next view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
239 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
240
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
241
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
242 surf_customview_init_view7: ; view 7: deco settings
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
243 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
244 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
245 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
246 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
247 call TFT_surface_decosettings ; show all deco settings
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
248 bra customview_toggle_exit ; done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
249
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
250
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
251 surf_customview_init_view8: ; view 8: last dive info
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
252 call TFT_standard_color ; set color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
253 call TFT_surface_lastdive ; show last dive info
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
254 bra customview_toggle_exit ; done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
255
0
heinrichsweikamp
parents:
diff changeset
256
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
257 surf_customview_init_view10: ; view 10: transmitter data / debug
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
258 IFDEF _rx_functions
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
259 btfss tr_functions_activated ; TR functions activated?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
260 bra surf_customview_toggle ; NO - show next view in list
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
261 STRCAT_PRINT "ID bar Volt" ; YES - title of custom view (none language-dependent)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
262 call TFT_surface_tankdata ; - show received data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
263 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
264 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
265 bra surf_customview_toggle ; not available without RX functions compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
266 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
267
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
268 ;-----------------------------------------------------------------------------
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
269
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
270 global menuview_toggle
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
271 menuview_toggle: ; show main menu or the pre-menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
272 bcf switch_left ; clear button event
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
273 movlw divemode_timeout_premenu ; get timeout for dive mode pre-menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
274 call reset_timeout_time ; reset timeout
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
275 bsf dive_options_menu ; flag that the dive options menu is shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
276 incf active_premenu,F ; current number of pre-menu item
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
277 movlw d'10' ; max number of pre-menu items
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
278 cpfsgt active_premenu ; max reached?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
279 bra menuview_mask ; NO - show item
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
280 ;bra menuview_toggle_reset ; YES - reset selector
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
281
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
282 global menuview_toggle_reset
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
283 menuview_toggle_reset: ; timeout occurred, beyond max number of options, or item executed
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
284 clrf active_premenu ; reset pre-menu selector
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
285 bcf dive_options_menu ; the dive options menu is not shown anymore
0
heinrichsweikamp
parents:
diff changeset
286 menuview_mask:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
287 WIN_BOX_BLACK dm_premenu_row, dm_premenu_bot, dm_premenu_col, dm_premenu_rgt ; top, bottom, left, right
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
288 tstfsz active_premenu ; any pre-menu selected?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
289 bra menuview_items ; YES - display menu item
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
290 bcf win_invert ; NO - end inverse printing
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
291 btfss FLAG_apnoe_mode ; - in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
292 goto TFT_show_temp_divemode ; YES - restore temperature and done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
293 goto TFT_standard_color ; NO - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
294 menuview_items:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
295 call TFT_attention_color ; set color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
296 bsf win_invert ; set inverse printing
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
297 WIN_SMALL dm_premenu_col,dm_premenu_row
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
298 movf active_premenu,W ; get active pre-menu item
0
heinrichsweikamp
parents:
diff changeset
299 dcfsnz WREG,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
300 bra menuview_view_gaschange ; check if a better gas/diluent is advised and prompt for switching if yes
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
301 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
302 bra menuview_view1 ; "Menu?" (skipped in gauge and apnoe modes)
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
303 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
304 bra menuview_view2 ; "Quit?" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
305 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
306 bra menuview_view3 ; "Sim-1m" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
307 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
308 bra menuview_view4 ; "Sim+1m" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
309 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
310 bra menuview_view5 ; "Quit?" (in apnoe mode only)
0
heinrichsweikamp
parents:
diff changeset
311 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
312 bra menuview_view6 ; "Reset Avr" (in gauge mode only)
0
heinrichsweikamp
parents:
diff changeset
313 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
314 bra menuview_view7 ; "Sim+5'" (in simulation mode only)
216
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
315 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
316 bra menuview_view8 ; "Course" (only when compass is shown)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
317 dcfsnz WREG,F
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
318 bra menuview_view9 ; "Layout" (offer alternative layout, aka blind mode)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
319
0
heinrichsweikamp
parents:
diff changeset
320 menuview_exit:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
321 call TFT_standard_color
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
322 bcf win_invert ; reset invert flag
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
323 return ; active pre-menu = 0, i.e. show nothing
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
324
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
325
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
326 menuview_view_gaschange:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
327 btfsc request_gaschange ; last gas change request executed yet?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
328 bra menuview_toggle ; NO - call next option
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
329 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
330 btfsc FLAG_oc_mode ; in OC mode?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
331 bra menuview_view_gaschange_OC ; YES
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
332 btfsc bailout_mode ; in bailout?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
333 bra menuview_view_gaschange_OC ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
334 menuview_view_gaschange_DIL:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
335 btfss better_dil_available ; is the better diluent still available?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
336 bra menuview_toggle ; NO - call next option
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
337 movff best_dil_number,PRODL ; number (1-5) of the "best diluent"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
338 bsf is_diluent_menu ; setting up diluents
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
339 bra menuview_view_gaschange_com
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
340 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
341 menuview_view_gaschange_OC:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
342 btfss better_gas_available ; is the better gas still available?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
343 bra menuview_toggle ; NO - call next option
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
344 movff best_gas_number,PRODL ; number (1-5) of the "best gas"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
345 bcf is_diluent_menu ; setting up OC gases
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
346 menuview_view_gaschange_com:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
347 decf PRODL,F ; (1-5) -> (0-4)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
348 bsf short_gas_descriptions ; use short version of gaslist_strcat_gas_cd and gaslist_strcat_setpoint
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
349 bsf better_gas_hint ; color-code as best gas/diluent
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
350 call gaslist_strcat_gas_cd ; append gas description of gas #PRODL (0-4) to current string
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
351 movlw .5
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
352 movwf FSR2L ; point to 6th character (5 chars are used for the gas/dil description)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
353 STRCAT_PRINT "?"
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
354 bra menuview_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
355
0
heinrichsweikamp
parents:
diff changeset
356 menuview_view1:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
357 btfsc FLAG_apnoe_mode ; in apnoe mode?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
358 bra menuview_toggle ; YES - goto next option
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
359 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
360 bra menuview_toggle ; YES - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
361 PUTC "\xb7" ; NO - print '->' symbol
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
362 STRCAT_TEXT_PRINT tDivePreMenu ; - print "Menu?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
363 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
364
0
heinrichsweikamp
parents:
diff changeset
365 menuview_view2:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
366 btfss simulatormode ; in simulator mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
367 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
368 STRCPY_TEXT_PRINT tQuitSim ; YES - print "Quit Simulation?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
369 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
370
0
heinrichsweikamp
parents:
diff changeset
371 menuview_view3:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
372 btfss simulatormode ; in simulator mode?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
373 bra menuview_toggle ; NO - goto next option
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
374 STRCPY_PRINT "Sim\xb8" ; print down arrow for going down
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
375 bra menuview_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
376
0
heinrichsweikamp
parents:
diff changeset
377 menuview_view4:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
378 btfss simulatormode ; in simulator mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
379 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
380 STRCPY_PRINT "Sim\xb9" ; YES - print up arrow for going up
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
381 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
382
0
heinrichsweikamp
parents:
diff changeset
383 menuview_view5:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
384 btfss FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
385 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
386 btfss apnoe_at_surface ; YES - at the surface?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
387 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
388 STRCPY_TEXT_PRINT tQuitSim ; YES - print "Quit Apnea mode?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
389 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
390
0
heinrichsweikamp
parents:
diff changeset
391 menuview_view6:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
392 btfss FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
393 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
394 STRCPY_TEXT_PRINT tResetAvg ; YES - print "Reset Avg."
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
395 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
396
216
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
397 menuview_view7:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
398 btfss simulatormode ; in simulator mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
399 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
400 btfsc FLAG_gauge_mode ; YES - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
401 bra menuview_toggle ; YES - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
402 btfsc FLAG_apnoe_mode ; NO - in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
403 bra menuview_toggle ; YES - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
404 STRCPY_PRINT "Sim+5'" ; NO - print "Sim+5'"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
405 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
406
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
407 menuview_view8:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
408 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
409 movlw index_compass_dm ; index of compass view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
410 cpfseq active_customview ; in compass view?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
411 bra menuview_toggle ; NO - goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
412 STRCPY_TEXT_PRINT tSetHeading ; YES - print "Heading"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
413 bra menuview_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
414 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
415 bra menuview_toggle ; not available without compass compiled in, goto next option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
416 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
417
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
418 menuview_view9:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
419 btfsc FLAG_apnoe_mode ; in apnoe mode?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
420 bra menuview_toggle ; YES - goto next option
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
421 STRCPY_TEXT_PRINT tDiveLayout ; NO - print "Layout"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
422 bra menuview_exit ; - done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
423
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
424 ;-----------------------------------------------------------------------------
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
425
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
426 ; Show next dive mode custom view (and delete this flag)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
427 global dive_customview_toggle
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
428 dive_customview_toggle:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
429 incf active_customview,F ; increment number of custom view to show
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
430
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
431 movlw index_compass_dm ; index of custom view compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
432 cpfseq active_customview ; will compass be shown in custom view?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
433 call I2C_sleep_compass ; NO - stop compass
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
434
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
435 movlw index_cv_dm_max ; highest index in use in dive mode custom view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
436 cpfsgt active_customview ; max reached?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
437 bra dive_customview_mask ; NO - show
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
438 clrf active_customview ; YES - reset to zero (zero = no custom view)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
439 ;bra dive_customview_mask ; - show
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
440
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
441 ;----------------------------------------------------------------------------------
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
442 ; Jump table for initialization of the every-second tasks in custom view area (dive mode)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
443 ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
444 ; Attention: the ordering must be in line with the every-second update jump table
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
445 ; and the index numbers defined in hwos.inc!
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
446 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
447 global dive_customview_mask
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
448 dive_customview_mask:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
449 ; clear custom view area in dive mode
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
450 WIN_BOX_BLACK dm_customview_row, dm_customview_bot-.2, dm_customview_column, dm_customview_rgt ; top, bottom, left, right
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
451 movf active_customview,W ; get custom view to show
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
452 dcfsnz WREG,F ; 1:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
453 bra init_avr_stopwatch ; average depth and stopwatch
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
454 dcfsnz WREG,F ; 2:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
455 bra init_TFT_dive_compass ; compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
456 dcfsnz WREG,F ; 3:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
457 bra init_ppo2_sensors ; ppO2 sensors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
458 dcfsnz WREG,F ; 4:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
459 bra init_sensor_check ; sensor check
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
460 dcfsnz WREG,F ; 5:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
461 bra init_pscr_info ; pSCR data
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
462 dcfsnz WREG,F ; 6:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
463 bra init_pressures_SAC ; tank pressure and SAC rate
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
464 dcfsnz WREG,F ; 7:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
465 bra init_gas_needs_ascent ; gas needs for ascent / cave return
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
466 dcfsnz WREG,F ; 8:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
467 bra init_decoplan ; deco plan
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
468 dcfsnz WREG,F ; 9:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
469 bra init_ceiling_GF_tissue ; ceiling, current GF and tissues
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
470 dcfsnz WREG,F ; 10:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
471 bra init_CNS ; CNS values
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
472 dcfsnz WREG,F ; 11:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
473 bra init_ppo2_ead_end_cns ; ppO2, END/EAD and CNS
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
474 dcfsnz WREG,F ; 12:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
475 bra init_gf_factors ; GF factors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
476 dcfsnz WREG,F ; 13:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
477 bra init_clock_batt_surfpress ; clock, battery and surface pressure
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
478 bra customview_toggle_exit ; no view (blank screen in custom view area)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
479
0
heinrichsweikamp
parents:
diff changeset
480
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
481 init_ppo2_sensors:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
482 IFDEF _external_sensor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
483 bsf trigger_temp_changed ; fake a change of the temperature to have the resettable dive time overwritten which was shown with the compass view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
484 btfsc FLAG_ccr_mode ; in CC mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
485 bra customview_init_view1a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
486 btfsc FLAG_pscr_mode ; in pSCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
487 bra customview_init_view1a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
488 bra dive_customview_toggle ; NO to both, goto next view
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
489 customview_init_view1a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
490 btfsc analog_o2_input ; (1) - do we have an analog input?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
491 bra customview_init_view1b ; YES - (2)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
492 btfsc s8_digital_avail ; NO - do we have a digital S8 interface?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
493 bra customview_init_view1b ; YES - (2)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
494 btfss optical_input ; NO - do we have an optical input?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
495 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
496 ; YES - (2)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
497 customview_init_view1b:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
498 call TFT_ppo2_sensors_mask ; (2) - mask for ppO2 sensors
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
499 call TFT_ppo2_sensors ; - data for ppO2 sensors
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
500 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
501 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
502 bra dive_customview_toggle ; not available without external sensors, got next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
503 ENDIF
0
heinrichsweikamp
parents:
diff changeset
504
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
505 init_avr_stopwatch:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
506 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
507 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
508 call TFT_avr_stopwatch_mask ; NO - mask for average depth and stopwatch
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
509 call TFT_avr_stopwatch ; - data for average depth and stopwatch
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
510 bra customview_toggle_exit ; - done
0
heinrichsweikamp
parents:
diff changeset
511
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
512 init_decoplan:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
513 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
514 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
515 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
516 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
517 call TFT_decoplan_mask ; NO - mask for deco plan
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
518 call TFT_decoplan ; - data for deco plan
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
519 bra customview_toggle_exit ; - done
0
heinrichsweikamp
parents:
diff changeset
520
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
521 init_clock_batt_surfpress:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
522 call TFT_clock_batt_surfpress_mask ; mask for clock, battery and surface pressure
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
523 call TFT_clock_batt_surfpress ; data for clock, battery and surface pressure
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
524 bra customview_toggle_exit ; done
0
heinrichsweikamp
parents:
diff changeset
525
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
526 init_gf_factors:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
527 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
528 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
529 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
530 bra dive_customview_toggle ; YES - call next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
531 TSTOSS char_I_deco_model ; NO - in GF mode (0 = ZH-L16, 1 = ZH-L16-GF)?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
532 bra dive_customview_toggle ; NO - no GF info for non-GF modes
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
533 call TFT_gf_factors_mask ; YES - mask for GF factors (static only)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
534 bra customview_toggle_exit ; - done
0
heinrichsweikamp
parents:
diff changeset
535
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
536 init_TFT_dive_compass: ; compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
537 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
538 call I2C_init_compass ; start compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
539 call TFT_dive_compass_mask ; show compass mask
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
540 bra customview_toggle_exit ; done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
541 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
542 bra dive_customview_toggle ; not available without compass compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
543 ENDIF
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
544
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
545 init_pressures_SAC: ; tank pressure and SAC rate
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
546 IFDEF _rx_functions
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
547 btfss tr_functions_activated ; TR functions activated?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
548 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
549 call TFT_pressures_SAC_mask ; YES - mask for pressures and SAC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
550 call TFT_pressures_SAC ; - data for pressures and SAC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
551 bra customview_toggle_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
552 ELSE
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
553 bra dive_customview_toggle ; not available without RX functions, got next view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
554 ENDIF
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
555
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
556 init_CNS: ; CNS at end of dive
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
557 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
558 bra dive_customview_toggle ; YES - call next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
559 btfsc FLAG_apnoe_mode ; NO - in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
560 bra dive_customview_toggle ; YES - call next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
561 call TFT_CNS_mask ; NO - mask for CNS values
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
562 call TFT_CNS ; - data for CNS values
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
563 bra customview_toggle_exit ; - done
333
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
564
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
565 init_ceiling_GF_tissue: ; ceiling, tissues and current GF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
566 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
567 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
568 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
569 bra dive_customview_toggle ; YES - call next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
570 call TFT_ceiling_GF_tissue_mask ; NO - mask for ceiling, current GF and tissues
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
571 call TFT_ceiling_GF_tissue ; - data for ceiling, current GF and tissues
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
572 bra customview_toggle_exit ; - done
525
00df86a5ac01 BUGFIX: Do not show GF in divemode for non-GF deco mode
heinrichsweikamp
parents: 517
diff changeset
573
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
574 init_sensor_check: ; sensor check
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
575 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
576 btfss FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
577 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
578 call TFT_sensor_check_mask ; YES - mask for sensor check
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
579 call TFT_sensor_check ; - data for sensor check
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
580 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
581 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
582 bra dive_customview_toggle ; not available without CCR mode compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
583 ENDIF
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 119
diff changeset
584
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
585 init_ppo2_ead_end_cns: ; ppO2, END/EAD and CNS
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
586 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
587 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
588 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
589 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
590 call TFT_ppo2_ead_end_cns_mask ; NO - mask for ppO2, END/EAD and CNS
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
591 call TFT_ppo2_ead_end_cns ; - data for ppO2, END/EAD and CNS
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
592 bra customview_toggle_exit ; - done
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 530
diff changeset
593
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
594 init_pscr_info: ; pSCR information
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
595 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
596 btfss FLAG_pscr_mode ; in pSCR mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
597 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
598 call TFT_pscr_info_mask ; YES - mask for pSCR info
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
599 call TFT_pscr_info ; - data for pSCR info
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
600 bra customview_toggle_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
601 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
602 bra dive_customview_toggle ; not available without CCR / pSCR mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
603 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
605 init_gas_needs_ascent: ; gas needs for ascent
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
606 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
607 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
608 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
609 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
610 TSTOSS opt_calc_asc_gasvolume ; NO - check if gas volume calculation is switched on
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
611 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
612 call TFT_gas_needs_ascent_mask ; YES - mask for gas needs ascent
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
613 call TFT_gas_needs_ascent ; - data for gas needs ascent
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
614 bra customview_toggle_exit ; - done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
615
0
heinrichsweikamp
parents:
diff changeset
616 customview_toggle_exit:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
617 bcf request_next_custview ; clear request flag
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
618 return ; done
0
heinrichsweikamp
parents:
diff changeset
619
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
620 ;-----------------------------------------------------------------------------
0
heinrichsweikamp
parents:
diff changeset
621
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
622 END