annotate src/customview.asm @ 623:c40025d8e750

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