annotate src/customview.asm @ 654:75e90cd0c2c3

hwOS sport 10.77 release
author heinrichsweikamp
date Thu, 14 Mar 2024 16:56:46 +0100
parents 4050675965ea
children
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 ;
654
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, heinrichs weikamp gmbh, all right reserved.
0
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
654
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
37 #DEFINE num_surface_cv .11 ; 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
654
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
175 dcfsnz WREG,F ; 11:
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
176 bra surf_customview_init_view11 ; Desat, noFly, CNS screen
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
177 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
178
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
179 surf_cv_toggle_exit:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
180 bcf request_next_custview ; clear request flag
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
181 return ; done
0
heinrichsweikamp
parents:
diff changeset
182
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
183 ; ---- view 1: OC Gas list ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
184 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
185 surf_customview_init_view1:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
186 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
187 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
188 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
189 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
190 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
191 btfss FLAG_oc_mode ; in OC mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
192 bra surf_customview_init_view1a ; NO - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
193 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
194 STRCPY_TEXT_PRINT tGaslist ; YES - title of custom view / OC mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
195 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
196 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
197 surf_customview_init_view1a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
198 STRCPY_TEXT_PRINT tDiveBailout ; (1) - title of custom view / CCR & pSCR mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
199 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
200 surf_customview_init_view1b:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
201 call TFT_surf_cv_list_gas ; show gas list
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
202 bra surf_cv_toggle_exit ; done
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 184
diff changeset
203
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
204
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
205 ; ---- view 2: CCR / pSCR diluent list ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
206 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
207 surf_customview_init_view2:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
208 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
209 btfsc FLAG_ccr_mode ; in CCR 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 btfsc FLAG_pscr_mode ; in pSCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
212 bra surf_customview_init_view2a ; YES - (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
213 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
214 surf_customview_init_view2a:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
215 STRCPY_TEXT_PRINT tGaslistCC ; (1) - title of custom view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
216 call TFT_surf_cv_list_dil ; - show diluent list
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
217 bra surf_cv_toggle_exit ; - done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
218 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
219 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
220 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
221
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
222
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
223 ; ---- view 3: CC SP list ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
224 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
225 surf_customview_init_view3:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
226 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
227 btfss FLAG_ccr_mode ; in CCR mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
228 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
229 STRCPY_TEXT_PRINT tFixedSetpoints ; YES - title of custom view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
230 call TFT_surf_cv_list_sp ; - show setpoint list
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
231 bra surf_cv_toggle_exit ; - done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
232 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
233 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
234 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
235
0
heinrichsweikamp
parents:
diff changeset
236
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
237 ; ---- view 4: custom text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
238 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
239 surf_customview_init_view4:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
240 call TFT_surf_cv_text ; show the custom text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
241 bra surf_cv_toggle_exit ; done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
242
0
heinrichsweikamp
parents:
diff changeset
243
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
244 ; ---- view 5: tissue diagram
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
245 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
246 surf_customview_init_view5:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
247 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
248 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
249 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
250 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
251 call TFT_surf_cv_tissues ; show tissue diagram
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
252 bra surf_cv_toggle_exit ; done
0
heinrichsweikamp
parents:
diff changeset
253
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
254
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
255 ; ---- view 6: compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
256 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
257 surf_customview_init_view6:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
258 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
259 call I2C_init_compass ; start compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
260 call TFT_surface_compass_mask ; show compass mask
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
261 bra surf_cv_toggle_exit ; done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
262 ELSE
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
263 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
264 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
265
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
266
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
267 ; ---- view 7: deco settings ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
268 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
269 surf_customview_init_view7:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
270 btfsc FLAG_gauge_mode ; in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
271 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
272 btfsc FLAG_apnoe_mode ; in apnoe mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
273 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
274 call TFT_surf_cv_settings ; show all deco settings
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
275 bra surf_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
276
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
277
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
278 ; ---- view 8: last dive info ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
279 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
280 surf_customview_init_view8:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
281 call TFT_surf_cv_lastdive ; show last dive info
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
282 bra surf_cv_toggle_exit ; done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
283
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
284
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
285 ; ---- view 9: sensor mV at the surface ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
286 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
287 surf_customview_init_view9:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
288 IFDEF _external_sensor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
289 btfsc FLAG_ccr_mode ; in CCR 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 btfsc FLAG_pscr_mode ; NO - in pSCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
292 bra surf_customview_init_view9a ; YES - show view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
293 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
294
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
295 surf_customview_init_view9a:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
296 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
297 decfsz WREG,W ; opt_ccr_mode = 1 (sensor)?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
298 bra surf_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
299 STRCPY_TEXT_PRINT tSensorMilliVolt ; YES - title of custom view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
300 call TFT_imprint_surf_mV ; - write sensor mV readings to screen
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
301 bra surf_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
302 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
303 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
304 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
305
0
heinrichsweikamp
parents:
diff changeset
306
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
307 ; ---- view 10: transmitter data / debug ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
308 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
309 surf_customview_init_view10:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
310 IFDEF _rx_functions
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
311 btfss tr_functions_activated ; TR functions activated?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
312 bra surf_customview_toggle ; NO - show next view in list
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
313 STRCAT_PRINT "ID bar Volt" ; YES - title of custom view (none language-dependent)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
314 call TFT_surf_cv_tankdata ; - show received data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
315 bra surf_cv_toggle_exit ; - done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
316 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
317 bra surf_customview_toggle ; not available without RX functions compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
318 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
319
654
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
320 ; ---- view 11: Desat, NoFly, CNS ----
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
321 ;
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
322 surf_customview_init_view11:
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
323 btfsc FLAG_gauge_mode ; in gauge mode?
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
324 bra surf_customview_toggle ; YES - not available in gauge mode, goto next view
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
325 btfsc FLAG_apnoe_mode ; in apnoe mode?
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
326 bra surf_customview_toggle ; YES - not available in apnoe mode, goto next view
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
327 call TFT_surf_desat_nofly_cns ; Desat, NoFly, CNS
75e90cd0c2c3 hwOS sport 10.77 release
heinrichsweikamp
parents: 634
diff changeset
328 bra surf_cv_toggle_exit ; done
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
329
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
330 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
331 custview3 CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
332 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
333
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
334
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
335 ;-----------------------------------------------------------------------------
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
336 ; Show next Pre-Menu Item / Clear the Pre-Menu
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
337 ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
338 global menuview_toggle
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
339 menuview_toggle:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
340 bcf switch_left ; clear button event
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
341 movlw divemode_timeout_premenu ; get timeout for dive mode pre-menu
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
342 call restart_timeout_time ; restart the timeout
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
343 bsf dive_pre_menu ; flag that the pre-menu is shown
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
344 menuview_next_item:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
345 incf active_premenu,F ; increment pre-menu item number
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
346 movlw num_premenu_items ; get number of pre-menu items
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
347 cpfsgt active_premenu ; beyond last item?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
348 bra menuview_mask ; NO - show item
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
349 ;bra menuview_toggle_reset ; YES - reset to first item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
350
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
351 global menuview_toggle_reset
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
352 menuview_toggle_reset:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
353 clrf active_premenu ; reset pre-menu item number
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
354 bcf dive_pre_menu ; flag that the pre-menu is not shown anymore
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
355 ;bra menuview_mask ; clear last item from display
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
356
0
heinrichsweikamp
parents:
diff changeset
357 menuview_mask:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
358 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
359 btfsc dive_pre_menu ; shall show pre-menu?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
360 bra menuview_show_item ; YES - show menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
361 ;bra menuview_exit ; NO - done with pre-menu
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
362
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
363 menuview_exit:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
364 bcf win_invert ; clear inverse printing
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
365 btfss dive_pre_menu ; showing pre-menu?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
366 goto TFT_show_temp_divemode ; NO - restore temperature display and return
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
367 return ; YES - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
368
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
369 menuview_show_item:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
370 WIN_SMALL dm_premenu_col,dm_premenu_row
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
371 FONT_COLOR_ATTENTION ; set color
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
372 bsf win_invert ; set inverse printing
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
373 movf active_premenu,W ; get active pre-menu item
0
heinrichsweikamp
parents:
diff changeset
374 dcfsnz WREG,F
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
375 bra menuview_view_gaschange ; 1: gas change (skipped if no better gas/dil cued)
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
376 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
377 bra menuview_view_ackn ; 2: "Ackn?" (skipped if no active advice/attention/warning sign)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
378 dcfsnz WREG,F
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
379 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
380 dcfsnz WREG,F
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
381 IFDEF _cave_mode
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
382 bra menuview_view_cavemenu ; 4: "Cave?" (skipped if not in cave mode)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
383 ELSE
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
384 bra menuview_next_item ; 4: cave mode not implemented, goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
385 ENDIF
0
heinrichsweikamp
parents:
diff changeset
386 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
387 bra menuview_view_sim_quit ; 5: "Quit?" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
388 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
389 bra menuview_view_sim_down ; 6: "Sim down" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
390 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
391 bra menuview_view_sim_up ; 7: "Sim up" (in simulation mode only)
0
heinrichsweikamp
parents:
diff changeset
392 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
393 bra menuview_view_sim_time ; 8: "Sim+5'" (in simulation mode only)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
394 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
395 bra menuview_view_apnoe_quit ; 9: "Quit?" (in apnoe mode only)
0
heinrichsweikamp
parents:
diff changeset
396 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
397 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
398 dcfsnz WREG,F
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
399 IFDEF _compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
400 bra menuview_view_course ; 11: "Course" (only when compass is shown)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
401 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
402 bra menuview_next_item ; 11: compass not implemented, goto next item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
403 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
404 dcfsnz WREG,F
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
405 bra menuview_view_layout ; 12: "Layout" (offer alternative layout, aka blind mode)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
406 bra menuview_exit ; catch illegal item number
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
407 ; when adding or removing items, adjust the value num_premenu_items in the #DEFINE !
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
408
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
409
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
410 ; --- item 1: gas change advice ---
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
411 ;
137
28b057aa9f75 Simplify gas change
heinrichsweikamp
parents: 136
diff changeset
412 menuview_view_gaschange:
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
413 btfsc request_gas_change ; last gas change request already executed?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
414 bra menuview_next_item ; YES - goto next option
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
415 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
416 btfsc FLAG_oc_mode ; in OC mode?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
417 bra menuview_view_gaschange_OC ; YES
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
418 btfsc bailout_mode ; in bailout?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
419 bra menuview_view_gaschange_OC ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
420 menuview_view_gaschange_DIL:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
421 btfss better_dil_available ; is the better diluent still available?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
422 bra menuview_next_item ; NO - goto next item
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
423 movff best_dil_number,PRODL ; number (1-5) of the "best diluent"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
424 bsf is_diluent_menu ; setting up diluents
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
425 bra menuview_view_gaschange_com ; continue with common part
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
426 ENDIF ; _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
427 menuview_view_gaschange_OC:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
428 btfss better_gas_available ; is the better gas still available?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
429 bra menuview_next_item ; NO - goto next item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
430 movff best_gas_number,PRODL ; YES - number (1-5) of the "best gas"
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
431 bcf is_diluent_menu ; - setting up OC gases
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
432 menuview_view_gaschange_com:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
433 decf PRODL,F ; (1-5) -> (0-4)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
434 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
435 bsf better_gas_hint ; color-code as best gas/diluent
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
436 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
437 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
438 movwf FSR2L ; ...
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
439 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
440 bra menuview_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
441
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
442 ; ---- item 2: acknowledge ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
443 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
444 menuview_view_ackn:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
445 btfss sign_shown ; advice, attention or warning sign shown?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
446 bra menuview_next_item ; NO - goto next item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
447 STRCAT_TEXT_PRINT tDiveAckn ; YES - print "Ackn?"
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
448 bra menuview_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
449
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
450
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
451 ; ---- item 3: dive menu ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
452 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
453 menuview_view_divemenu:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
454 btfsc FLAG_apnoe_mode ; in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
455 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
456 btfsc FLAG_gauge_mode ; NO - in gauge mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
457 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
458 PUTC "\xb7" ; NO - print '->' symbol
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
459 STRCAT_TEXT_PRINT tDivePreMenu ; - print "Menu?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
460 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
461
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
462
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
463 ; ---- item 4: cave menu ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
464 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
465 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
466 menuview_view_cavemenu:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
467 TSTOSS opt_cave_mode ; cave mode switched on?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
468 bra menuview_next_item ; NO - goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
469 PUTC "\xb7" ; YES - print '->' symbol
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
470 STRCAT_TEXT_PRINT tDivePreCave ; - print "Cave?"
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
471 bra menuview_exit ; - done
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
472 ENDIF ; _cave_mode
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
473
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
474
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
475 ; ---- item 5: quit simulator ---
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
476 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
477 menuview_view_sim_quit:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
478 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
479 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
480 STRCPY_TEXT_PRINT tQuitSim ; YES - print "Quit Simulation?"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
481 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
482
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
483
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
484 ; ---- item 6: simulator - go down ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
485 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
486 menuview_view_sim_down:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
487 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
488 bra menuview_next_item ; NO - goto next item
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
489 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
490 bra menuview_exit ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
491
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
492
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
493 ; ---- item 7: simulator - go up ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
494 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
495 menuview_view_sim_up:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
496 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
497 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
498 STRCPY_PRINT "Sim\xb9" ; YES - print up arrow for going up
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
499 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
500
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
501
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
502 ; ---- item 8: simulator - advance time ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
503 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
504 menuview_view_sim_time:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
505 btfss simulatormode ; in simulator mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
506 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
507 btfsc FLAG_gauge_mode ; YES - in gauge mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
508 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
509 btfsc FLAG_apnoe_mode ; NO - in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
510 bra menuview_next_item ; YES - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
511 STRCPY_PRINT "Sim+5'" ; NO - print "Sim+5'"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
512 bra menuview_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
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 9: apnoe mode - quit ----
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_apnoe_quit:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
518 btfss FLAG_apnoe_mode ; in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
519 bra menuview_next_item ; NO - goto next option
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
520 btfss apnoe_at_surface ; YES - at the surface?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
521 bra menuview_next_item ; NO - goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
522 STRCPY_TEXT_PRINT tQuitSim ; YES - print "Quit Apnea mode?"
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
523 bra menuview_exit ; - done
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
524
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
525
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
526 ; ---- item 10: gauge mode - reset average ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
527 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
528 menuview_view_gauge_reset:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
529 btfss FLAG_gauge_mode ; in gauge mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
530 bra menuview_next_item ; NO - goto next item
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
531 STRCPY_TEXT_PRINT tResetAvg ; YES - print "Reset Avg."
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
532 bra menuview_exit ; - done
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
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 11: set bearing ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
536 IFDEF _compass
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
537 menuview_view_course:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
538 movlw index_compass_dm ; index of compass view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
539 cpfseq active_customview ; in compass view?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
540 bra menuview_next_item ; NO - goto next item
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
541 STRCPY_TEXT_PRINT tSetHeading ; YES - print "Heading"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
542 bra menuview_exit ; - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
543 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
544
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
545
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
546 ; ---- item 12: switch layout ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
547 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
548 menuview_view_layout:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
549 btfsc FLAG_apnoe_mode ; in apnoe mode?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
550 bra menuview_next_item ; YES - goto next item
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 623
diff changeset
551 STRCPY_TEXT_PRINT tDiveLayout ; NO - print "Layout"
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
552 bra menuview_exit ; - done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
553
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
554
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
555 ;=============================================================================
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
556 custview4 CODE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
557 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
558
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
559
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
560 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
561 ; Show a specific Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
562 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
563 global dive_customview_show
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
564 dive_customview_show:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
565 btfss custom_view_locked ; custom view locked?
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
566 bra dive_customview_show_1 ; NO - call-up the view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
567 movwf backup_customview ; YES - store requested custom view for later recall
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
568 return ; - done
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
569 dive_customview_show_1:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
570 movwf active_customview ; set the requested custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
571 bra dive_customview_callup ; call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
572
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
573
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
574 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
575 ; Show again last Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
576 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
577 global dive_customview_recall
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
578 dive_customview_recall:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
579 movff backup_customview,active_customview ; recall the saved custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
580 bra dive_customview_callup ; call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
581
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
582
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
583 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
584 ; Show next Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
585 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
586 global dive_customview_toggle
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
587 dive_customview_toggle:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
588 incf active_customview,F ; increment number of custom view to show
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
589 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
590 cpfsgt active_customview ; beyond last view?
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
591 bra dive_customview_callup ; NO - call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
592 clrf active_customview ; YES - reset to zero (zero = blank custom view)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
593 ;bra dive_customview_callup ; call-up the custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
594
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
595
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
596 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
597 ; Show current Dive Mode Custom View
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
598 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
599 global dive_customview_callup
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
600 dive_customview_callup:
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
601 movlw index_compass_dm ; get index of compass custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
602 cpfseq active_customview ; will compass be shown?
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
603 call I2C_sleep_compass ; NO - stop compass to save on energy
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
604
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
605 ; clear custom view area in dive mode
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
606 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
607
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
608 ; jump table
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
609 movf active_customview,W ; get custom view to show
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
610 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
611 bra init_avr_stopwatch ; 1: average depth and stopwatch
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
612 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
613 bra init_TFT_dive_compass ; 2: compass
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
614 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
615 bra init_ppo2_sensors ; 3: ppO2 sensors
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
616 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
617 bra init_sensor_check ; 4: sensor check
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
618 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
619 bra init_pscr_info ; 5: pSCR data
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
620 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
621 bra init_pressures_SAC ; 6: tank pressure and SAC rate
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
622 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
623 bra init_gas_needs_ascent ; 7: gas needs for ascent / cave return
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
624 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
625 bra init_cave_tts ; 8: cave mode TTS
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
626 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
627 bra init_decoplan ; 9: deco plan (next stops)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
628 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
629 bra init_ceiling_GF_tissue ; 10: ceiling, current GF and tissues
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
630 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
631 bra init_CNS ; 11: CNS values
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
632 dcfsnz WREG,F ;
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
633 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
634 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
635 bra init_clock_batt_surfpress ; 13: clock, battery and surface pressure
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
636 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
637 bra init_gf_factors ; 14: GF factors
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
638 dcfsnz WREG,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
639 bra init_cave_waypoints ; 15: cave waypoints
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
640 ;bra dive_cv_toggle_exit ; 0: no view (blank screen in custom view area)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
641
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
642 dive_cv_toggle_exit:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
643 bcf request_next_custview ; clear request flag
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
644 return ; done
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
645
0
heinrichsweikamp
parents:
diff changeset
646
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
647 ; ---- view 1: average depth and stopwatch ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
648 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
649 init_avr_stopwatch:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
650 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
651 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
652 call TFT_avr_stopwatch_mask ; NO - mask for average depth and stopwatch
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
653 call TFT_avr_stopwatch ; - data for average depth and stopwatch
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
654 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
655
0
heinrichsweikamp
parents:
diff changeset
656
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
657 ; ---- view 2: compass ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
658 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
659 init_TFT_dive_compass:
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
660 IFDEF _compass
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
661 call I2C_init_compass ; start compass
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
662 call TFT_dive_compass_mask ; mask for compass
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
663 bra dive_cv_toggle_exit ; done
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
664 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
665 bra dive_customview_toggle ; not available without compass compiled in, goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
666 ENDIF
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 48
diff changeset
667
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
668
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
669 ; ---- view 3: ppO2 sensors ---
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
670 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
671 init_ppo2_sensors:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
672 IFDEF _external_sensor
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
673 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
674 btfsc FLAG_ccr_mode ; in CC mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
675 bra init_ppo2_sensors_1 ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
676 btfsc FLAG_pscr_mode ; in pSCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
677 bra init_ppo2_sensors_1 ; YES
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
678 bra dive_customview_toggle ; NO to both, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
679 init_ppo2_sensors_1:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
680 btfsc ext_input_s8_ana ; do we have an S8/analog input?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
681 bra init_ppo2_sensors_2 ; YES - show this view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
682 btfsc ext_input_optical ; NO - do we have an optical input?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
683 bra init_ppo2_sensors_2 ; YES - show this view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
684 bra dive_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
685
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
686 init_ppo2_sensors_2:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
687 call TFT_ppo2_sensors_mask ; mask for ppO2 sensors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
688 call TFT_ppo2_sensors ; data for ppO2 sensors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
689 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
690 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
691 bra dive_customview_toggle ; not available without external sensors, got next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
692 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
693
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
694 ; ---- view 4: sensor check ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
695 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
696 init_sensor_check:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
697 IFDEF _ccr_pscr
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
698 btfss FLAG_ccr_mode ; in CCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
699 bra dive_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
700 call TFT_sensor_check_mask ; YES - mask for sensor check
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
701 call TFT_sensor_check ; - data for sensor check
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
702 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
703 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
704 bra dive_customview_toggle ; not available without CCR mode compiled in, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
705 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
706
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
707
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
708 ; ---- view 5: pSCR data ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
709 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
710 init_pscr_info:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
711 IFDEF _ccr_pscr
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
712 btfss FLAG_pscr_mode ; in pSCR mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
713 bra dive_customview_toggle ; NO - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
714 call TFT_pscr_info_mask ; YES - mask for pSCR info
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
715 call TFT_pscr_info ; - data for pSCR info
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
716 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
717 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
718 bra dive_customview_toggle ; not available without CCR / pSCR mode, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
719 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
720
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
721
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
722 ; view 6: tank pressure and SAC rate ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
723 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
724 init_pressures_SAC:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
725 IFDEF _rx_functions
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
726 btfss tr_functions_activated ; TR functions activated?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
727 bra dive_customview_toggle ; NO - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
728 call TFT_pressures_SAC_mask ; YES - mask for pressures and SAC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
729 call TFT_pressures_SAC ; - data for pressures and SAC
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
730 bra dive_cv_toggle_exit ; - done
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
731 ELSE
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
732 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
733 ENDIF
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 53
diff changeset
734
333
14b466f66a7f Extend the Ceiling custom-view with ppO2 and current GF
Janos Kovacs <kovjanos@gmail.com>
parents: 327
diff changeset
735
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
736 ; ---- view 7: gas needs ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
737 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
738 init_gas_needs_ascent:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 583
diff changeset
739 btfsc FLAG_apnoe_mode ; in apnoe mode?
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
740 bra dive_customview_toggle ; YES - goto next view
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
741 btfsc FLAG_gauge_mode ; NO - in gauge mode?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
742 bra dive_customview_toggle ; YES - goto next view
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
743 TSTOSS opt_calc_gasvolume ; NO - check if gas volume calculation is switched on
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
744 bra dive_customview_toggle ; NO - goto next view
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
745 call TFT_gas_needs_mask ; YES - mask for gas needs ascent
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
746 call TFT_gas_needs ; - data for gas needs ascent
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
747 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
748
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 576
diff changeset
749
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
750 ; ---- view 8: cave mode TTS ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
751 init_cave_tts:
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
752 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
753 btfss cave_mode ; in cave mode?
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
754 bra dive_customview_toggle ; NO - goto next view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
755 call TFT_cave_tts_mask ; YES - show mask
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
756 call TFT_cave_tts ; - show data
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
757 bra dive_cv_toggle_exit ; - done
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
758 ELSE
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
759 bra dive_customview_toggle ; not available without cave mode, goto next view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
760 ENDIF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
761
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 628
diff changeset
762
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
763 ; ---- view 9: deco plan ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
764 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
765 init_decoplan:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
766 btfsc FLAG_apnoe_mode ; in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
767 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
768 btfsc FLAG_gauge_mode ; NO - in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
769 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
770 call TFT_decoplan_mask ; NO - mask for deco plan
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
771 call TFT_decoplan ; - data for deco plan
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
772 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
773
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
774
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
775 ; ---- view 10: ceiling, tissues and current GF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
776 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
777 init_ceiling_GF_tissue:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
778 btfsc FLAG_apnoe_mode ; in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
779 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
780 btfsc FLAG_gauge_mode ; NO - in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
781 bra dive_customview_toggle ; YES - call next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
782 call TFT_ceiling_GF_tissue_mask ; NO - mask for ceiling, current GF and tissues
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
783 call TFT_ceiling_GF_tissue ; - data for ceiling, current GF and tissues
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
784 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
785
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
786
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
787 ; ---- view 11: CNS values ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
788 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
789 init_CNS: ; CNS at end of dive
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
790 btfsc FLAG_gauge_mode ; in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
791 bra dive_customview_toggle ; YES - call next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
792 btfsc FLAG_apnoe_mode ; NO - in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
793 bra dive_customview_toggle ; YES - call next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
794 call TFT_CNS_mask ; NO - mask for CNS values
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
795 call TFT_CNS ; - data for CNS values
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
796 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
797
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
798
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
799 ; ---- view 12: ppO2, END/EAD and CNS/gas density ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
800 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
801 init_ppo2_ead_end_cns: ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
802 btfsc FLAG_apnoe_mode ; in apnoe mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
803 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
804 btfsc FLAG_gauge_mode ; NO - in gauge mode?
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
805 bra dive_customview_toggle ; YES - goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
806 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
807 call TFT_ppo2_ead_end_cns ; - data for ppO2, END/EAD and CNS
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
808 bra dive_cv_toggle_exit ; - done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
809
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
810
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
811 ; ---- view 13: clock, battery and surface pressure
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
812 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
813 init_clock_batt_surfpress:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
814 call TFT_clock_batt_surfpress_mask ; mask for clock, battery and surface pressure
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
815 call TFT_clock_batt_surfpress ; data for clock, battery and surface pressure
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
816 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
817
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
818
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
819 ; ---- view 14: GF factors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
820 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
821 init_gf_factors:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
822 call TFT_gf_factors_mask ; show GF factors
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
823 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
824
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
825
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
826 ; ---- view 15: cave waypoints ----
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
827 ;
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
828 init_cave_waypoints:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
829 IFDEF _cave_mode
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
830 call TFT_cave_waypoints ; show waypoint graphics
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
831 bra dive_cv_toggle_exit ; done
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
832 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
833 bra dive_customview_toggle ; not available without cave mode, goto next view
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
834 ENDIF
0
heinrichsweikamp
parents:
diff changeset
835
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
836 ;-----------------------------------------------------------------------------
0
heinrichsweikamp
parents:
diff changeset
837
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 608
diff changeset
838 END