annotate src/customview.asm @ 646:5b7fe7777425

3.16 release
author heinrichs weikamp
date Thu, 14 Oct 2021 12:03:24 +0200
parents 4050675965ea
children 75e90cd0c2c3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
3 ; File customview.asm * combined next generation V3.09.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"
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
24 #include "colorschemes.inc"
0
heinrichsweikamp
parents:
diff changeset
25
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
26
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
27 extern gaslist_strcat_gas_PRODL
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
28 extern char_I_model
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
29
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
30 IFDEF _compass
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
31 extern TFT_surface_compass_mask
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
32 extern TFT_dive_compass_mask
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
33 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
34
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
35
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
36 #DEFINE num_premenu_items .12 ; overall number of pre-menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
37 #DEFINE num_surface_cv .10 ; overall number of surface custom views
623
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 ;=============================================================================
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
41 custview1 CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
42 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
43
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
44 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
45 ; Jump Table for the every-second Tasks for the Custom View Area (Dive Mode)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
46 ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
47 ; 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
48 ; index numbers defined in hwos.inc!
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
49 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
50 global dive_customview_second
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
51 dive_customview_second:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
52 movf active_customview,W ; get current view
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
53 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
54 goto TFT_avr_stopwatch ; 1: average depth and stopwatch
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
55 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
56 IFDEF _compass
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
57 return ; 2: compass - will be updated separately (faster) in dive mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
58 ELSE
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
59 return ; 2: not available without compass
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
60 ENDIF
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
61 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
62 IFDEF _external_sensor
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
63 goto TFT_ppo2_sensors ; 3: ppO2 sensors
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
64 ELSE
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
65 return ; 3: not available without external sensors
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
66 ENDIF
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
67 dcfsnz WREG,F ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
68 IFDEF _ccr_pscr
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
69 goto TFT_sensor_check ; 4: sensor check
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
70 ELSE
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
71 return ; 4: not available without CCR / pSCR mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
72 ENDIF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
73 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
74 IFDEF _ccr_pscr
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
75 goto TFT_pscr_info ; 5: pSCR data
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
76 ELSE
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
77 return ; 5: not available without CCR / pSCR mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
78 ENDIF
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
79 dcfsnz WREG,F ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
80 IFDEF _rx_functions
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
81 goto TFT_pressures_SAC ; 6: tank pressure and SAC rate
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
82 ELSE
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
83 return ; 6: not available without RX functions
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
84 ENDIF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
85 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
86 goto TFT_gas_needs ; 7: gas needs for ascent / cave return
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
87 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
88 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
89 goto TFT_cave_tts ; 8: cave mode TTS
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
90 ELSE
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
91 return ; 8: not available without cave mode functions
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
92 ENDIF
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
93 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
94 goto TFT_decoplan ; 9: deco plan
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
95 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
96 goto TFT_ceiling_GF_tissue ; 10: ceiling, current GF and tissues
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
97 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
98 goto TFT_CNS ; 11: CNS values
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
99 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
100 goto TFT_ppo2_ead_end_cns ; 12: ppO2, END/EAD and CNS / gas density
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
101 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
102 goto TFT_clock_batt_surfpress ; 13: clock, battery and surface pressure
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
103 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
104 return ; 14: GF factors - static only
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
105 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
106 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
107 goto TFT_cave_waypoints ; 15: cave waypoints
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
108 ELSE
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
109 return ; 15: not available without cave mode functions
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
110 ENDIF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
111 return ; 0: do nothing
0
heinrichsweikamp
parents:
diff changeset
112
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
113
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
114 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
115 custview2 CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
116 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
117
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
118
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
119 ;-----------------------------------------------------------------------------
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
120 ; Show next Surface Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
121 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
122 global surf_customview_toggle
0
heinrichsweikamp
parents:
diff changeset
123 surf_customview_toggle:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
124 bcf switch_right ; clear button event
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
125 incf active_customview,F ; set number of the next custom view to show
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
126
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
127 IFDEF _compass
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
128 movlw .6 ; load index of surface custom view compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
129 cpfseq active_customview ; will the compass be shown in custom view?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
130 call I2C_sleep_compass ; NO - can stop the compass to save on energy
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
131 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
132
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
133 movlw num_surface_cv ; load number of custom views available
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
134 cpfsgt active_customview ; beyond last view?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
135 bra surf_customview_mask ; NO - show view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
136 movlw .1 ; YES - wrap around to 1st view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
137 movwf active_customview ; - ...
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
138 ;bra surf_customview_mask ; - show view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
139
0
heinrichsweikamp
parents:
diff changeset
140
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
141 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
142 ; Show Surface Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
143 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
144 global surf_customview_mask
0
heinrichsweikamp
parents:
diff changeset
145 surf_customview_mask:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
146
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
147 ; prepare output of custom view title
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
148 WIN_BOX_BLACK .50,surf_warning1_row-1, .0, surf_decotype_column-.1 ; top, bottom, left, right
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
149 WIN_TINY surf_customview_title_column,surf_customview_title_row ; set title position
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
150 FONT_COLOR color_greenish ; set title color
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
151
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
152 ; jump table
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
153 movf active_customview,W ; get custom view to show
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
154 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
155 dcfsnz WREG,F ; 1:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
156 bra surf_customview_init_view1 ; OC gas list
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
157 dcfsnz WREG,F ; 2:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
158 bra surf_customview_init_view2 ; CC dil list
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
159 dcfsnz WREG,F ; 3:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
160 bra surf_customview_init_view3 ; CC SP list
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
161 dcfsnz WREG,F ; 4:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
162 bra surf_customview_init_view4 ; custom text
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
163 dcfsnz WREG,F ; 5:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
164 bra surf_customview_init_view5 ; tissue diagram
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
165 dcfsnz WREG,F ; 6:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
166 bra surf_customview_init_view6 ; compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
167 dcfsnz WREG,F ; 7:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
168 bra surf_customview_init_view7 ; deco settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
169 dcfsnz WREG,F ; 8:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
170 bra surf_customview_init_view8 ; last dive info
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
171 dcfsnz WREG,F ; 9:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
172 bra surf_customview_init_view9 ; sensor mV readings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
173 dcfsnz WREG,F ; 10:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
174 bra surf_customview_init_view10 ; tank data
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
175 bra surf_customview_init_view4 ; 0: default view after restart and loading of new firmware
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
176
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
177 surf_cv_toggle_exit:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
178 bcf request_next_custview ; clear request flag
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
179 return ; done
0
heinrichsweikamp
parents:
diff changeset
180
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
181 ; ---- view 1: OC Gas list ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
182 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
183 surf_customview_init_view1:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
184 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
185 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
186 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
187 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
188 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
189 btfss FLAG_oc_mode ; in OC mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
190 bra surf_customview_init_view1a ; NO - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
191 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
192 STRCPY_TEXT_PRINT tGaslist ; YES - title of custom view / OC mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
193 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
194 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
195 surf_customview_init_view1a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
196 STRCPY_TEXT_PRINT tDiveBailout ; (1) - title of custom view / CCR & pSCR mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
197 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
198 surf_customview_init_view1b:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
199 call TFT_surf_cv_list_gas ; show gas list
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
200 bra surf_cv_toggle_exit ; done
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
201
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
202
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
203 ; ---- view 2: CCR / pSCR diluent list ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
204 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
205 surf_customview_init_view2:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
206 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
207 btfsc FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
208 bra surf_customview_init_view2a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
209 btfsc FLAG_pscr_mode ; in pSCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
210 bra surf_customview_init_view2a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
211 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
212 surf_customview_init_view2a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
213 STRCPY_TEXT_PRINT tGaslistCC ; (1) - title of custom view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
214 call TFT_surf_cv_list_dil ; - show diluent list
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
215 bra surf_cv_toggle_exit ; - done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
216 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
217 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
218 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
219
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
220
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
221 ; ---- view 3: CC SP list ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
222 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
223 surf_customview_init_view3:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
224 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
225 btfss FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
226 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
227 STRCPY_TEXT_PRINT tFixedSetpoints ; YES - title of custom view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
228 call TFT_surf_cv_list_sp ; - show setpoint list
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
229 bra surf_cv_toggle_exit ; - done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
230 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
231 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
232 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
233
0
heinrichsweikamp
parents:
diff changeset
234
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
235 ; ---- view 4: custom text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
236 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
237 surf_customview_init_view4:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
238 call TFT_surf_cv_text ; show the custom text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
239 bra surf_cv_toggle_exit ; done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
240
0
heinrichsweikamp
parents:
diff changeset
241
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
242 ; ---- view 5: tissue diagram
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
243 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
244 surf_customview_init_view5:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
245 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
246 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
247 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
248 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
249 call TFT_surf_cv_tissues ; show tissue diagram
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
250 bra surf_cv_toggle_exit ; done
0
heinrichsweikamp
parents:
diff changeset
251
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
252
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
253 ; ---- view 6: compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
254 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
255 surf_customview_init_view6:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
256 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
257 call I2C_init_compass ; start compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
258 call TFT_surface_compass_mask ; show compass mask
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
259 bra surf_cv_toggle_exit ; done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
260 ELSE
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
261 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
262 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
263
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
264
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
265 ; ---- view 7: deco settings ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
266 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
267 surf_customview_init_view7:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
268 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
269 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
270 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
271 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
272 call TFT_surf_cv_settings ; show all deco settings
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
273 bra surf_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
274
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
275
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
276 ; ---- view 8: last dive info ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
277 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
278 surf_customview_init_view8:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
279 call TFT_surf_cv_lastdive ; show last dive info
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
280 bra surf_cv_toggle_exit ; done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
281
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
282
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
283 ; ---- view 9: sensor mV at the surface ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
284 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
285 surf_customview_init_view9:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
286 IFDEF _external_sensor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
287 btfsc FLAG_ccr_mode ; in CCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
288 bra surf_customview_init_view9a ; YES - show view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
289 btfsc FLAG_pscr_mode ; NO - in pSCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
290 bra surf_customview_init_view9a ; YES - show view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
291 bra surf_customview_toggle ; NO - not available if not in CCR or pSCR mode, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
292
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
293 surf_customview_init_view9a:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
294 movff opt_ccr_mode,WREG ; get SP mode (0: fixed SP, 1: Sensor, 2: auto SP)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
295 decfsz WREG,W ; opt_ccr_mode = 1 (sensor)?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
296 bra surf_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
297 STRCPY_TEXT_PRINT tSensorMilliVolt ; YES - title of custom view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
298 call TFT_imprint_surf_mV ; - write sensor mV readings to screen
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
299 bra surf_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
300 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
301 bra surf_customview_toggle ; not available without CCR/pSCR mode compiled in, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
302 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
303
0
heinrichsweikamp
parents:
diff changeset
304
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
305 ; ---- view 10: transmitter data / debug ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
306 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
307 surf_customview_init_view10:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
308 IFDEF _rx_functions
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
309 btfss tr_functions_activated ; TR functions activated?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
310 bra surf_customview_toggle ; NO - show next view in list
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
311 STRCAT_PRINT "ID bar Volt" ; YES - title of custom view (none language-dependent)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
312 call TFT_surf_cv_tankdata ; - show received data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
313 bra surf_cv_toggle_exit ; - done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
314 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
315 bra surf_customview_toggle ; not available without RX functions compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
316 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
317
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
318
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
319 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
320 custview3 CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
321 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
322
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
323
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
324 ;-----------------------------------------------------------------------------
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
325 ; Show next Pre-Menu Item / Clear the Pre-Menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
326 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
327 global menuview_toggle
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
328 menuview_toggle:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
329 bcf switch_left ; clear button event
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
330 movlw divemode_timeout_premenu ; get timeout for dive mode pre-menu
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
331 call restart_timeout_time ; restart the timeout
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
332 bsf dive_pre_menu ; flag that the pre-menu is shown
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
333 menuview_next_item:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
334 incf active_premenu,F ; increment pre-menu item number
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
335 movlw num_premenu_items ; get number of pre-menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
336 cpfsgt active_premenu ; beyond last item?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
337 bra menuview_mask ; NO - show item
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
338 ;bra menuview_toggle_reset ; YES - reset to first item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
339
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
340 global menuview_toggle_reset
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
341 menuview_toggle_reset:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
342 clrf active_premenu ; reset pre-menu item number
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
343 bcf dive_pre_menu ; flag that the pre-menu is not shown anymore
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
344 ;bra menuview_mask ; clear last item from display
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
345
0
heinrichsweikamp
parents:
diff changeset
346 menuview_mask:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
347 WIN_BOX_BLACK dm_premenu_row, dm_premenu_bot, dm_premenu_col, dm_premenu_rgt ; top, bottom, left, right
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
348 btfsc dive_pre_menu ; shall show pre-menu?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
349 bra menuview_show_item ; YES - show menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
350 ;bra menuview_exit ; NO - done with pre-menu
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
351
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
352 menuview_exit:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
353 bcf win_invert ; clear inverse printing
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
354 btfss dive_pre_menu ; showing pre-menu?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
355 goto TFT_show_temp_divemode ; NO - restore temperature display and return
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
356 return ; YES - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
357
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
358 menuview_show_item:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
359 WIN_SMALL dm_premenu_col,dm_premenu_row
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
360 FONT_COLOR_ATTENTION ; set color
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
361 bsf win_invert ; set inverse printing
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
362 movf active_premenu,W ; get active pre-menu item
0
heinrichsweikamp
parents:
diff changeset
363 dcfsnz WREG,F
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
364 bra menuview_view_gaschange ; 1: gas change (skipped if no better gas/dil cued)
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
365 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
366 bra menuview_view_ackn ; 2: "Ackn?" (skipped if no active advice/attention/warning sign)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
367 dcfsnz WREG,F
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
368 bra menuview_view_divemenu ; 3: "Menu?" (skipped in gauge and apnoe modes)
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 249
diff changeset
369 dcfsnz WREG,F
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
370 IFDEF _cave_mode
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
371 bra menuview_view_cavemenu ; 4: "Cave?" (skipped if not in cave mode)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
372 ELSE
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
373 bra menuview_next_item ; 4: cave mode not implemented, goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
374 ENDIF
0
heinrichsweikamp
parents:
diff changeset
375 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
376 bra menuview_view_sim_quit ; 5: "Quit?" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
377 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
378 bra menuview_view_sim_down ; 6: "Sim down" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
379 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
380 bra menuview_view_sim_up ; 7: "Sim up" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
381 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
382 bra menuview_view_sim_time ; 8: "Sim+5'" (in simulation mode only)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
383 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
384 bra menuview_view_apnoe_quit ; 9: "Quit?" (in apnoe mode only)
0
heinrichsweikamp
parents:
diff changeset
385 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
386 bra menuview_view_gauge_reset ; 10: "Reset Avr" (in gauge mode only)
216
973a0969e0ac NEW: On-board simulator can increase divetime in 5min steps
heinrichsweikamp
parents: 192
diff changeset
387 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
388 IFDEF _compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
389 bra menuview_view_course ; 11: "Course" (only when compass is shown)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
390 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
391 bra menuview_next_item ; 11: compass not implemented, goto next item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
392 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
393 dcfsnz WREG,F
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
394 bra menuview_view_layout ; 12: "Layout" (offer alternative layout, aka blind mode)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
395 bra menuview_exit ; catch illegal item number
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
396 ; when adding or removing items, adjust the value num_premenu_items in the #DEFINE !
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
397
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
398
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
399 ; --- item 1: gas change advice ---
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
400 ;
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
401 menuview_view_gaschange:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
402 btfsc request_gas_change ; last gas change request already executed?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
403 bra menuview_next_item ; YES - goto next option
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
404 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
405 btfsc FLAG_oc_mode ; in OC mode?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
406 bra menuview_view_gaschange_OC ; YES
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
407 btfsc bailout_mode ; in bailout?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
408 bra menuview_view_gaschange_OC ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
409 menuview_view_gaschange_DIL:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
410 btfss better_dil_available ; is the better diluent still available?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
411 bra menuview_next_item ; NO - goto next item
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
412 movff best_dil_number,PRODL ; number (1-5) of the "best diluent"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
413 bsf is_diluent_menu ; setting up diluents
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
414 bra menuview_view_gaschange_com ; continue with common part
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
415 ENDIF ; _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
416 menuview_view_gaschange_OC:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
417 btfss better_gas_available ; is the better gas still available?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
418 bra menuview_next_item ; NO - goto next item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
419 movff best_gas_number,PRODL ; YES - number (1-5) of the "best gas"
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
420 bcf is_diluent_menu ; - setting up OC gases
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
421 menuview_view_gaschange_com:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
422 decf PRODL,F ; (1-5) -> (0-4)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
423 bsf short_gas_descriptions ; use short version of gaslist_strcat_gas_PRODL and gaslist_strcat_setpoint
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
424 bsf better_gas_hint ; color-code as best gas/diluent
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
425 call gaslist_strcat_gas_PRODL ; append gas description of gas #PRODL (0-4) to current string
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
426 movlw .5 ; point to 6th character (5 chars are used for the gas/dil description)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
427 movwf FSR2L ; ...
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
428 PUTC_PRINT "?" ; append question and dump buffer to screen
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
429 bra menuview_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
430
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
431 ; ---- item 2: acknowledge ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
432 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
433 menuview_view_ackn:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
434 btfss sign_shown ; advice, attention or warning sign shown?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
435 bra menuview_next_item ; NO - goto next item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
436 STRCAT_TEXT_PRINT tDiveAckn ; YES - print "Ackn?"
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
437 bra menuview_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
438
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
439
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
440 ; ---- item 3: dive menu ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
441 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
442 menuview_view_divemenu:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
443 btfsc FLAG_apnoe_mode ; in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
444 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
445 btfsc FLAG_gauge_mode ; NO - in gauge mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
446 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
447 PUTC "\xb7" ; NO - print '->' symbol
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
448 STRCAT_TEXT_PRINT tDivePreMenu ; - print "Menu?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
449 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
450
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
451
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
452 ; ---- item 4: cave menu ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
453 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
454 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
455 menuview_view_cavemenu:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
456 TSTOSS opt_cave_mode ; cave mode switched on?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
457 bra menuview_next_item ; NO - goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
458 PUTC "\xb7" ; YES - print '->' symbol
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
459 STRCAT_TEXT_PRINT tDivePreCave ; - print "Cave?"
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
460 bra menuview_exit ; - done
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
461 ENDIF ; _cave_mode
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
462
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
463
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
464 ; ---- item 5: quit simulator ---
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
465 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
466 menuview_view_sim_quit:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
467 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
468 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
469 STRCPY_TEXT_PRINT tQuitSim ; YES - print "Quit Simulation?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
470 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
471
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
472
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
473 ; ---- item 6: simulator - go down ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
474 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
475 menuview_view_sim_down:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
476 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
477 bra menuview_next_item ; NO - goto next item
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
478 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
479 bra menuview_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
480
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
481
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
482 ; ---- item 7: simulator - go up ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
483 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
484 menuview_view_sim_up:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
485 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
486 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
487 STRCPY_PRINT "Sim\xb9" ; YES - print up arrow for going up
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
488 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
489
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
490
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
491 ; ---- item 8: simulator - advance time ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
492 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
493 menuview_view_sim_time:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
494 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
495 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
496 btfsc FLAG_gauge_mode ; YES - in gauge mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
497 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
498 btfsc FLAG_apnoe_mode ; NO - in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
499 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
500 STRCPY_PRINT "Sim+5'" ; NO - print "Sim+5'"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
501 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
502
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
503
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
504 ; ---- item 9: apnoe mode - quit ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
505 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
506 menuview_view_apnoe_quit:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
507 btfss FLAG_apnoe_mode ; in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
508 bra menuview_next_item ; NO - goto next option
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
509 btfss apnoe_at_surface ; YES - at the surface?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
510 bra menuview_next_item ; NO - goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
511 STRCPY_TEXT_PRINT tQuitSim ; YES - print "Quit Apnea mode?"
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
512 bra menuview_exit ; - done
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
513
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
514
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
515 ; ---- item 10: gauge mode - reset average ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
516 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
517 menuview_view_gauge_reset:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
518 btfss FLAG_gauge_mode ; in gauge mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
519 bra menuview_next_item ; NO - goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
520 STRCPY_TEXT_PRINT tResetAvg ; YES - print "Reset Avg."
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
521 bra menuview_exit ; - done
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
522
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
523
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
524 ; ---- item 11: set bearing ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
525 IFDEF _compass
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
526 menuview_view_course:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
527 movlw index_compass_dm ; index of compass view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
528 cpfseq active_customview ; in compass view?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
529 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
530 STRCPY_TEXT_PRINT tSetHeading ; YES - print "Heading"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
531 bra menuview_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
532 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
533
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
534
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
535 ; ---- item 12: switch layout ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
536 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
537 menuview_view_layout:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
538 btfsc FLAG_apnoe_mode ; in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
539 bra menuview_next_item ; YES - goto next item
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
540 STRCPY_TEXT_PRINT tDiveLayout ; NO - print "Layout"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
541 bra menuview_exit ; - done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
542
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
543
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
544 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
545 custview4 CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
546 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
547
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
548
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
549 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
550 ; Show a specific Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
551 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
552 global dive_customview_show
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
553 dive_customview_show:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
554 btfss custom_view_locked ; custom view locked?
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
555 bra dive_customview_show_1 ; NO - call-up the view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
556 movwf backup_customview ; YES - store requested custom view for later recall
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
557 return ; - done
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
558 dive_customview_show_1:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
559 movwf active_customview ; set the requested custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
560 bra dive_customview_callup ; call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
561
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
562
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
563 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
564 ; Show again last Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
565 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
566 global dive_customview_recall
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
567 dive_customview_recall:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
568 movff backup_customview,active_customview ; recall the saved custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
569 bra dive_customview_callup ; call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
570
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
571
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
572 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
573 ; Show next Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
574 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
575 global dive_customview_toggle
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
576 dive_customview_toggle:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
577 incf active_customview,F ; increment number of custom view to show
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
578 movlw index_cv_dm_max ; get highest index in use in dive mode custom view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
579 cpfsgt active_customview ; beyond last view?
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
580 bra dive_customview_callup ; NO - call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
581 clrf active_customview ; YES - reset to zero (zero = blank custom view)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
582 ;bra dive_customview_callup ; call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
583
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
584
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
585 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
586 ; Show current Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
587 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
588 global dive_customview_callup
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
589 dive_customview_callup:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
590 movlw index_compass_dm ; get index of compass custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
591 cpfseq active_customview ; will compass be shown?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
592 call I2C_sleep_compass ; NO - stop compass to save on energy
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
593
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
594 ; clear custom view area in dive mode
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
595 WIN_BOX_BLACK dm_customview_row, dm_customview_bot-.2, dm_customview_column, dm_customview_rgt ; top, bottom, left, right
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
596
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
597 ; jump table
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
598 movf active_customview,W ; get custom view to show
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
599 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
600 bra init_avr_stopwatch ; 1: average depth and stopwatch
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
601 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
602 bra init_TFT_dive_compass ; 2: compass
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
603 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
604 bra init_ppo2_sensors ; 3: ppO2 sensors
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
605 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
606 bra init_sensor_check ; 4: sensor check
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
607 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
608 bra init_pscr_info ; 5: pSCR data
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
609 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
610 bra init_pressures_SAC ; 6: tank pressure and SAC rate
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
611 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
612 bra init_gas_needs_ascent ; 7: gas needs for ascent / cave return
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
613 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
614 bra init_cave_tts ; 8: cave mode TTS
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
615 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
616 bra init_decoplan ; 9: deco plan (next stops)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
617 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
618 bra init_ceiling_GF_tissue ; 10: ceiling, current GF and tissues
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
619 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
620 bra init_CNS ; 11: CNS values
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
621 dcfsnz WREG,F ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
622 bra init_ppo2_ead_end_cns ; 12: ppO2, END/EAD and CNS/gas density
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
623 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
624 bra init_clock_batt_surfpress ; 13: clock, battery and surface pressure
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
625 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
626 bra init_gf_factors ; 14: GF factors
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
627 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
628 bra init_cave_waypoints ; 15: cave waypoints
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
629 ;bra dive_cv_toggle_exit ; 0: no view (blank screen in custom view area)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
630
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
631 dive_cv_toggle_exit:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
632 bcf request_next_custview ; clear request flag
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
633 return ; done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
634
0
heinrichsweikamp
parents:
diff changeset
635
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
636 ; ---- view 1: average depth and stopwatch ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
637 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
638 init_avr_stopwatch:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
639 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
640 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
641 call TFT_avr_stopwatch_mask ; NO - mask for average depth and stopwatch
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
642 call TFT_avr_stopwatch ; - data for average depth and stopwatch
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
643 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
644
0
heinrichsweikamp
parents:
diff changeset
645
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
646 ; ---- view 2: compass ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
647 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
648 init_TFT_dive_compass:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
649 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
650 call I2C_init_compass ; start compass
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
651 call TFT_dive_compass_mask ; mask for compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
652 bra dive_cv_toggle_exit ; done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
653 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
654 bra dive_customview_toggle ; not available without compass compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
655 ENDIF
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
656
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
657
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
658 ; ---- view 3: ppO2 sensors ---
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
659 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
660 init_ppo2_sensors:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
661 IFDEF _external_sensor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
662 bsf trigger_temp_changed ; fake a change of the temperature to have the resettable dive time overwritten which was shown with the compass view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
663 btfsc FLAG_ccr_mode ; in CC mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
664 bra init_ppo2_sensors_1 ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
665 btfsc FLAG_pscr_mode ; in pSCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
666 bra init_ppo2_sensors_1 ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
667 bra dive_customview_toggle ; NO to both, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
668 init_ppo2_sensors_1:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
669 btfsc ext_input_s8_ana ; do we have an S8/analog input?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
670 bra init_ppo2_sensors_2 ; YES - show this view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
671 btfsc ext_input_optical ; NO - do we have an optical input?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
672 bra init_ppo2_sensors_2 ; YES - show this view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
673 bra dive_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
674
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
675 init_ppo2_sensors_2:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
676 call TFT_ppo2_sensors_mask ; mask for ppO2 sensors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
677 call TFT_ppo2_sensors ; data for ppO2 sensors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
678 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
679 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
680 bra dive_customview_toggle ; not available without external sensors, got next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
681 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
682
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
683 ; ---- view 4: sensor check ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
684 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
685 init_sensor_check:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
686 IFDEF _ccr_pscr
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
687 btfss FLAG_ccr_mode ; in CCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
688 bra dive_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
689 call TFT_sensor_check_mask ; YES - mask for sensor check
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
690 call TFT_sensor_check ; - data for sensor check
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
691 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
692 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
693 bra dive_customview_toggle ; not available without CCR mode compiled in, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
694 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
695
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
696
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
697 ; ---- view 5: pSCR data ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
698 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
699 init_pscr_info:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
700 IFDEF _ccr_pscr
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
701 btfss FLAG_pscr_mode ; in pSCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
702 bra dive_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
703 call TFT_pscr_info_mask ; YES - mask for pSCR info
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
704 call TFT_pscr_info ; - data for pSCR info
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
705 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
706 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
707 bra dive_customview_toggle ; not available without CCR / pSCR mode, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
708 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
709
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
710
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
711 ; view 6: tank pressure and SAC rate ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
712 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
713 init_pressures_SAC:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
714 IFDEF _rx_functions
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
715 btfss tr_functions_activated ; TR functions activated?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
716 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
717 call TFT_pressures_SAC_mask ; YES - mask for pressures and SAC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
718 call TFT_pressures_SAC ; - data for pressures and SAC
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
719 bra dive_cv_toggle_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
720 ELSE
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
721 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
722 ENDIF
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
723
333
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
724
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
725 ; ---- view 7: gas needs ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
726 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
727 init_gas_needs_ascent:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
728 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
729 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
730 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
731 bra dive_customview_toggle ; YES - goto next view
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
732 TSTOSS opt_calc_gasvolume ; NO - check if gas volume calculation is switched on
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
733 bra dive_customview_toggle ; NO - goto next view
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
734 call TFT_gas_needs_mask ; YES - mask for gas needs ascent
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
735 call TFT_gas_needs ; - data for gas needs ascent
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
736 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
737
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
738
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
739 ; ---- view 8: cave mode TTS ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
740 init_cave_tts:
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
741 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
742 btfss cave_mode ; in cave mode?
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
743 bra dive_customview_toggle ; NO - goto next view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
744 call TFT_cave_tts_mask ; YES - show mask
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
745 call TFT_cave_tts ; - show data
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
746 bra dive_cv_toggle_exit ; - done
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
747 ELSE
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
748 bra dive_customview_toggle ; not available without cave mode, goto next view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
749 ENDIF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
750
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
751
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
752 ; ---- view 9: deco plan ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
753 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
754 init_decoplan:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
755 btfsc FLAG_apnoe_mode ; in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
756 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
757 btfsc FLAG_gauge_mode ; NO - in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
758 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
759 call TFT_decoplan_mask ; NO - mask for deco plan
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
760 call TFT_decoplan ; - data for deco plan
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
761 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
762
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
763
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
764 ; ---- view 10: ceiling, tissues and current GF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
765 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
766 init_ceiling_GF_tissue:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
767 btfsc FLAG_apnoe_mode ; in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
768 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
769 btfsc FLAG_gauge_mode ; NO - in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
770 bra dive_customview_toggle ; YES - call next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
771 call TFT_ceiling_GF_tissue_mask ; NO - mask for ceiling, current GF and tissues
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
772 call TFT_ceiling_GF_tissue ; - data for ceiling, current GF and tissues
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
773 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
774
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
775
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
776 ; ---- view 11: CNS values ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
777 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
778 init_CNS: ; CNS at end of dive
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
779 btfsc FLAG_gauge_mode ; in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
780 bra dive_customview_toggle ; YES - call next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
781 btfsc FLAG_apnoe_mode ; NO - in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
782 bra dive_customview_toggle ; YES - call next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
783 call TFT_CNS_mask ; NO - mask for CNS values
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
784 call TFT_CNS ; - data for CNS values
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
785 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
786
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
787
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
788 ; ---- view 12: ppO2, END/EAD and CNS/gas density ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
789 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
790 init_ppo2_ead_end_cns: ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
791 btfsc FLAG_apnoe_mode ; in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
792 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
793 btfsc FLAG_gauge_mode ; NO - in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
794 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
795 call TFT_ppo2_ead_end_cns_mask ; NO - mask for ppO2, END/EAD and CNS
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
796 call TFT_ppo2_ead_end_cns ; - data for ppO2, END/EAD and CNS
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
797 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
798
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
799
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
800 ; ---- view 13: clock, battery and surface pressure
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
801 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
802 init_clock_batt_surfpress:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
803 call TFT_clock_batt_surfpress_mask ; mask for clock, battery and surface pressure
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
804 call TFT_clock_batt_surfpress ; data for clock, battery and surface pressure
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
805 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
806
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
807
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
808 ; ---- view 14: GF factors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
809 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
810 init_gf_factors:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
811 call TFT_gf_factors_mask ; show GF factors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
812 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
813
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
814
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
815 ; ---- view 15: cave waypoints ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
816 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
817 init_cave_waypoints:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
818 IFDEF _cave_mode
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
819 call TFT_cave_waypoints ; show waypoint graphics
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
820 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
821 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
822 bra dive_customview_toggle ; not available without cave mode, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
823 ENDIF
0
heinrichsweikamp
parents:
diff changeset
824
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
825 ;-----------------------------------------------------------------------------
0
heinrichsweikamp
parents:
diff changeset
826
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
827 END