annotate src/divemenu_tree.asm @ 389:9175429bdeba

CHANGE: Logbook now shows end-of-dive date and time for dives made with firmware <1.92 indicated by an icon in the logbook CHANGE: Logbook shows start-of-dive date and time for dives made with firmware >=1.92 BUGFIX: Text alignment in logbook
author heinrichsweikamp
date Tue, 27 Oct 2015 13:45:10 +0100
parents f0828110d864
children 7be43d886bb1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
heinrichsweikamp
parents:
diff changeset
3 ; File divemenu_tree.asm
heinrichsweikamp
parents:
diff changeset
4 ;
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 249
diff changeset
5 ; OSTC dive mode menu
0
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
heinrichsweikamp
parents:
diff changeset
10 ; 2013-02-02 : [mH] Made out of menu_tree.asm
heinrichsweikamp
parents:
diff changeset
11
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 249
diff changeset
12 #include "hwos.inc" ; Mandatory header
0
heinrichsweikamp
parents:
diff changeset
13 #include "menu_processor.inc"
heinrichsweikamp
parents:
diff changeset
14 #include "shared_definitions.h" ; Mailbox from/to p2_deco.c
heinrichsweikamp
parents:
diff changeset
15 #include "tft_outputs.inc"
heinrichsweikamp
parents:
diff changeset
16 #include "customview.inc"
heinrichsweikamp
parents:
diff changeset
17 #include "strings.inc"
195
bca0f054f023 allow auto-return from setpoint fallback
heinrichsweikamp
parents: 193
diff changeset
18 #include "calibrate.inc"
0
heinrichsweikamp
parents:
diff changeset
19
heinrichsweikamp
parents:
diff changeset
20 divegui CODE
heinrichsweikamp
parents:
diff changeset
21 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
22 ; Main Menu
heinrichsweikamp
parents:
diff changeset
23 global do_main_divemenu
heinrichsweikamp
parents:
diff changeset
24 do_main_divemenu:
heinrichsweikamp
parents:
diff changeset
25 call menu_processor_reset ; restart from first icon.
heinrichsweikamp
parents:
diff changeset
26
heinrichsweikamp
parents:
diff changeset
27 do_continue_main_divemenu:
heinrichsweikamp
parents:
diff changeset
28 call menu_processor_pop ; drop exit line.
heinrichsweikamp
parents:
diff changeset
29 call menu_processor_pop ; drop exit line.
heinrichsweikamp
parents:
diff changeset
30
heinrichsweikamp
parents:
diff changeset
31 btfsc FLAG_ccr_mode
heinrichsweikamp
parents:
diff changeset
32 bra main_divemenu_ccr ; CCR Menu
heinrichsweikamp
parents:
diff changeset
33
heinrichsweikamp
parents:
diff changeset
34 bcf ccr_diluent_setup ; For OC gases
heinrichsweikamp
parents:
diff changeset
35 bcf is_bailout_menu
heinrichsweikamp
parents:
diff changeset
36 movlw .1
heinrichsweikamp
parents:
diff changeset
37 movwf menupos ; Set to first option in divemode menu
heinrichsweikamp
parents:
diff changeset
38 MENU_BEGIN tMainMenu, .4
heinrichsweikamp
parents:
diff changeset
39 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist
heinrichsweikamp
parents:
diff changeset
40 MENU_CALL tDivemenu_ResetAvr, do_divemode_resetavr
heinrichsweikamp
parents:
diff changeset
41 MENU_CALL tDivemenu_ToggleGF, do_divemode_togglegf
heinrichsweikamp
parents:
diff changeset
42 MENU_CALL tExit, do_exit_divemode_menu
heinrichsweikamp
parents:
diff changeset
43 MENU_END
heinrichsweikamp
parents:
diff changeset
44
heinrichsweikamp
parents:
diff changeset
45 main_divemenu_ccr:
heinrichsweikamp
parents:
diff changeset
46 bsf ccr_diluent_setup ; For diluents
heinrichsweikamp
parents:
diff changeset
47 movlw .1
heinrichsweikamp
parents:
diff changeset
48 movwf menupos ; Set to first option in divemode menu
heinrichsweikamp
parents:
diff changeset
49 MENU_BEGIN tMainMenu, .6
heinrichsweikamp
parents:
diff changeset
50 MENU_CALL tDiveBailout, do_divemode_gaslist_bail
heinrichsweikamp
parents:
diff changeset
51 MENU_CALL tDivemenu_Setpoint, do_divemode_splist
heinrichsweikamp
parents:
diff changeset
52 MENU_CALL tDivemenu_Gaslist, do_divemode_gaslist
heinrichsweikamp
parents:
diff changeset
53 MENU_CALL tDivemenu_ResetAvr, do_divemode_resetavr
heinrichsweikamp
parents:
diff changeset
54 MENU_CALL tDivemenu_ToggleGF, do_divemode_togglegf
heinrichsweikamp
parents:
diff changeset
55 MENU_CALL tExit, do_exit_divemode_menu
heinrichsweikamp
parents:
diff changeset
56 MENU_END
heinrichsweikamp
parents:
diff changeset
57
heinrichsweikamp
parents:
diff changeset
58
heinrichsweikamp
parents:
diff changeset
59 do_togglegf:
heinrichsweikamp
parents:
diff changeset
60 TSTOSS opt_enable_aGF ; =1: aGF can be selected underwater
heinrichsweikamp
parents:
diff changeset
61 bra do_exit_divemode_menu ; exit
heinrichsweikamp
parents:
diff changeset
62 bsf toggle_gf ; Set flag...
heinrichsweikamp
parents:
diff changeset
63 bra do_exit_divemode_menu ; ...and exit
heinrichsweikamp
parents:
diff changeset
64
heinrichsweikamp
parents:
diff changeset
65 do_switch_to_sensor:
heinrichsweikamp
parents:
diff changeset
66 movlw .1 ; Switch to Sensor
heinrichsweikamp
parents:
diff changeset
67 movff WREG,opt_ccr_mode ; =0: Fixed SP, =1: Sensor
192
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 182
diff changeset
68 bsf voting_logic_sensor1
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 182
diff changeset
69 bsf voting_logic_sensor2
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 182
diff changeset
70 bsf voting_logic_sensor3
193
901c10831e4e reset voting logic on sensor switch
heinrichsweikamp
parents: 192
diff changeset
71 extern divemode_setup_sensor_values
901c10831e4e reset voting logic on sensor switch
heinrichsweikamp
parents: 192
diff changeset
72 call divemode_setup_sensor_values ; Setup sensor values
195
bca0f054f023 allow auto-return from setpoint fallback
heinrichsweikamp
parents: 193
diff changeset
73 call check_sensors ; Check O2 sensor thresholds for fallback
0
heinrichsweikamp
parents:
diff changeset
74 bra do_switch_sp2
heinrichsweikamp
parents:
diff changeset
75
heinrichsweikamp
parents:
diff changeset
76 do_divemode_resetavr:
heinrichsweikamp
parents:
diff changeset
77 bsf reset_average_depth ; Set Flag
heinrichsweikamp
parents:
diff changeset
78 bra do_exit_divemode_menu ; And exit
heinrichsweikamp
parents:
diff changeset
79
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 0
diff changeset
80
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 0
diff changeset
81 do_switch_gas6:
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 0
diff changeset
82 movlw .6
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 0
diff changeset
83 movwf active_gas ; Gas6 selected
377
f0828110d864 set char_I_current_gas for gas6 use
heinrichsweikamp
parents: 352
diff changeset
84 movff WREG,char_I_current_gas ; for p2_deco.c
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 0
diff changeset
85 bra do_switch_gasX
0
heinrichsweikamp
parents:
diff changeset
86 extern diveloop_loop4
heinrichsweikamp
parents:
diff changeset
87 extern timeout_divemode_menu2
heinrichsweikamp
parents:
diff changeset
88 do_switch_gas:
heinrichsweikamp
parents:
diff changeset
89 bsf divemode_gaschange ; Set flag
heinrichsweikamp
parents:
diff changeset
90 do_switch_gasX:
heinrichsweikamp
parents:
diff changeset
91 btfsc is_bailout_menu ; Bailout confirmed?
heinrichsweikamp
parents:
diff changeset
92 bsf is_bailout ; =1: Bailout
heinrichsweikamp
parents:
diff changeset
93 do_exit_divemode_menu:
heinrichsweikamp
parents:
diff changeset
94 call timeout_divemode_menu2
heinrichsweikamp
parents:
diff changeset
95 clrf STKPTR
heinrichsweikamp
parents:
diff changeset
96 goto diveloop_loop4
heinrichsweikamp
parents:
diff changeset
97
heinrichsweikamp
parents:
diff changeset
98 do_switch_sp:
heinrichsweikamp
parents:
diff changeset
99 decf menupos,W ; 1-5 -> 0-4
heinrichsweikamp
parents:
diff changeset
100 lfsr FSR1,char_I_setpoint_cbar
heinrichsweikamp
parents:
diff changeset
101 movff PLUSW1,char_I_const_ppO2; Setup fixed Setpoint
352
5c6da9fa5cb0 add setpoint change to first sample in CCR mode
heinrichsweikamp
parents: 275
diff changeset
102 movff char_I_const_ppO2,WREG
5c6da9fa5cb0 add setpoint change to first sample in CCR mode
heinrichsweikamp
parents: 275
diff changeset
103 call transmit_setpoint ; Transmit current setpoint from WREG (in cbar) to external electronics
0
heinrichsweikamp
parents:
diff changeset
104 bsf setpoint_changed ; Set flag (For profile)
99
87cc1adfe4da show event "bailout" in the internal logbook
heinrichsweikamp
parents: 97
diff changeset
105 bsf event_occured ; Set global event byte
0
heinrichsweikamp
parents:
diff changeset
106
97
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
107 ; Reconfigure last diluent
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
108 extern setup_dil_registers
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
109 bcf is_bailout ; =1: Bailout
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
110 movff active_diluent,WREG ; As a backup when switching back from Bailout to CCR
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
111 decf WREG ; 0-4
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
112 call setup_dil_registers ; With WREG=Gas 0-4
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 53
diff changeset
113
0
heinrichsweikamp
parents:
diff changeset
114 clrf WREG ; Switch to fixed SP
heinrichsweikamp
parents:
diff changeset
115 movff WREG,opt_ccr_mode ; =0: Fixed SP, =1: Sensor
heinrichsweikamp
parents:
diff changeset
116 clrf WREG
heinrichsweikamp
parents:
diff changeset
117 movff WREG,char_O_deco_status ; Restart decoplan computation
heinrichsweikamp
parents:
diff changeset
118
heinrichsweikamp
parents:
diff changeset
119 do_switch_sp2:
heinrichsweikamp
parents:
diff changeset
120 ; Clear some flags in case we were in bailout before...
heinrichsweikamp
parents:
diff changeset
121 bcf is_bailout ; =1: Bailout
heinrichsweikamp
parents:
diff changeset
122 bcf is_bailout_menu ;
heinrichsweikamp
parents:
diff changeset
123 bcf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode
heinrichsweikamp
parents:
diff changeset
124 bcf blinking_better_gas ; Clear blinking flag
heinrichsweikamp
parents:
diff changeset
125 bra do_exit_divemode_menu ; And exit
heinrichsweikamp
parents:
diff changeset
126
heinrichsweikamp
parents:
diff changeset
127 do_divemode_gaslist_bail:
heinrichsweikamp
parents:
diff changeset
128 bcf ccr_diluent_setup ; For OC gases
heinrichsweikamp
parents:
diff changeset
129 bsf is_bailout_menu ; =1: Bailout
heinrichsweikamp
parents:
diff changeset
130 do_divemode_gaslist:
heinrichsweikamp
parents:
diff changeset
131 btfsc is_bailout ; In Bailout case?
heinrichsweikamp
parents:
diff changeset
132 bcf ccr_diluent_setup ; Yes, use OC gases
heinrichsweikamp
parents:
diff changeset
133 bsf short_gas_decriptions
heinrichsweikamp
parents:
diff changeset
134 movlw .1
heinrichsweikamp
parents:
diff changeset
135 movwf menupos ; Set to first option in divemode menu
heinrichsweikamp
parents:
diff changeset
136 MENU_BEGIN tGaslist, .6
heinrichsweikamp
parents:
diff changeset
137 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas
heinrichsweikamp
parents:
diff changeset
138 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas
heinrichsweikamp
parents:
diff changeset
139 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas
heinrichsweikamp
parents:
diff changeset
140 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas
heinrichsweikamp
parents:
diff changeset
141 MENU_DYNAMIC gaslist_strcat_gas_mod, do_switch_gas
heinrichsweikamp
parents:
diff changeset
142 MENU_CALL tMore, do_divemode_gaslist_more0
heinrichsweikamp
parents:
diff changeset
143 MENU_END
heinrichsweikamp
parents:
diff changeset
144
heinrichsweikamp
parents:
diff changeset
145 do_divemode_gaslist_more0:
heinrichsweikamp
parents:
diff changeset
146 movlw .1
heinrichsweikamp
parents:
diff changeset
147 movwf menupos ; Set to first option in divemode menu
heinrichsweikamp
parents:
diff changeset
148 do_divemode_gaslist_more:
heinrichsweikamp
parents:
diff changeset
149 MENU_BEGIN tGaslist, .6
heinrichsweikamp
parents:
diff changeset
150 MENU_DYNAMIC gaslist_strcat_gasx, do_dive_nothing
heinrichsweikamp
parents:
diff changeset
151 MENU_CALL tO2Plus, do_dive_pO2
heinrichsweikamp
parents:
diff changeset
152 MENU_CALL tO2Minus, do_dive_mO2
heinrichsweikamp
parents:
diff changeset
153 MENU_CALL tHePlus, do_dive_pHe
heinrichsweikamp
parents:
diff changeset
154 MENU_CALL tHeMinus, do_dive_mHe
182
93023d78812e minor cleanup
heinrichsweikamp
parents: 181
diff changeset
155 MENU_CALL tExit, do_switch_gas6
0
heinrichsweikamp
parents:
diff changeset
156 MENU_END
heinrichsweikamp
parents:
diff changeset
157
heinrichsweikamp
parents:
diff changeset
158 do_dive_nothing:
heinrichsweikamp
parents:
diff changeset
159 bra do_divemode_gaslist_more
heinrichsweikamp
parents:
diff changeset
160
heinrichsweikamp
parents:
diff changeset
161 do_dive_pO2:
heinrichsweikamp
parents:
diff changeset
162 banksel char_I_O2_ratio
heinrichsweikamp
parents:
diff changeset
163 incf char_I_O2_ratio,F ; O2++
heinrichsweikamp
parents:
diff changeset
164 movf char_I_He_ratio,W
heinrichsweikamp
parents:
diff changeset
165 addwf char_I_O2_ratio,W
heinrichsweikamp
parents:
diff changeset
166 movwf temp_bankx400
heinrichsweikamp
parents:
diff changeset
167 movlw .101
heinrichsweikamp
parents:
diff changeset
168 cpfslt temp_bankx400 ; O2+He<101?
heinrichsweikamp
parents:
diff changeset
169 decf char_I_O2_ratio,F ; O2-- (Unchanged)
heinrichsweikamp
parents:
diff changeset
170 ; bra do_divemode_gaslist_more_common
heinrichsweikamp
parents:
diff changeset
171 do_divemode_gaslist_more_common:
181
32c17df38423 BUGFIX: END/EAD updated when adjusting current gas during the dive
heinrichsweikamp
parents: 99
diff changeset
172 movf char_I_O2_ratio,W ; Add O2...
32c17df38423 BUGFIX: END/EAD updated when adjusting current gas during the dive
heinrichsweikamp
parents: 99
diff changeset
173 addwf char_I_He_ratio,W ; ...and He...
32c17df38423 BUGFIX: END/EAD updated when adjusting current gas during the dive
heinrichsweikamp
parents: 99
diff changeset
174 sublw .100 ; ...subtract both from 100
32c17df38423 BUGFIX: END/EAD updated when adjusting current gas during the dive
heinrichsweikamp
parents: 99
diff changeset
175 movwf char_I_N2_ratio ; -> N2!
0
heinrichsweikamp
parents:
diff changeset
176 banksel common
heinrichsweikamp
parents:
diff changeset
177 bsf gas6_changed ; Set flag
heinrichsweikamp
parents:
diff changeset
178 bra do_divemode_gaslist_more
heinrichsweikamp
parents:
diff changeset
179
heinrichsweikamp
parents:
diff changeset
180 do_dive_mO2:
heinrichsweikamp
parents:
diff changeset
181 banksel char_I_O2_ratio
heinrichsweikamp
parents:
diff changeset
182 decf char_I_O2_ratio,F ; O2--
heinrichsweikamp
parents:
diff changeset
183 movlw gaslist_min_o2
heinrichsweikamp
parents:
diff changeset
184 cpfslt char_I_O2_ratio
heinrichsweikamp
parents:
diff changeset
185 bra do_divemode_gaslist_more_common
heinrichsweikamp
parents:
diff changeset
186 movlw gaslist_min_o2
heinrichsweikamp
parents:
diff changeset
187 movwf char_I_O2_ratio
heinrichsweikamp
parents:
diff changeset
188 bra do_divemode_gaslist_more_common
heinrichsweikamp
parents:
diff changeset
189
heinrichsweikamp
parents:
diff changeset
190
heinrichsweikamp
parents:
diff changeset
191 do_dive_pHe:
heinrichsweikamp
parents:
diff changeset
192 banksel char_I_O2_ratio
heinrichsweikamp
parents:
diff changeset
193 incf char_I_He_ratio,F ; He++
heinrichsweikamp
parents:
diff changeset
194 movf char_I_He_ratio,W
heinrichsweikamp
parents:
diff changeset
195 addwf char_I_O2_ratio,W
heinrichsweikamp
parents:
diff changeset
196 movwf lo
heinrichsweikamp
parents:
diff changeset
197 movlw .101
heinrichsweikamp
parents:
diff changeset
198 cpfslt lo ; O2+He<101?
heinrichsweikamp
parents:
diff changeset
199 decf char_I_He_ratio,F ; Yes, He-- (Unchanged)
heinrichsweikamp
parents:
diff changeset
200 bra do_divemode_gaslist_more_common
heinrichsweikamp
parents:
diff changeset
201
heinrichsweikamp
parents:
diff changeset
202 do_dive_mHe:
heinrichsweikamp
parents:
diff changeset
203 banksel char_I_O2_ratio
heinrichsweikamp
parents:
diff changeset
204 decf char_I_He_ratio,F ; He--
heinrichsweikamp
parents:
diff changeset
205 bnn do_divemode_gaslist_more_common
heinrichsweikamp
parents:
diff changeset
206 clrf char_I_He_ratio
heinrichsweikamp
parents:
diff changeset
207 bra do_divemode_gaslist_more_common
heinrichsweikamp
parents:
diff changeset
208
heinrichsweikamp
parents:
diff changeset
209 do_divemode_splist:
heinrichsweikamp
parents:
diff changeset
210 bsf short_gas_decriptions
heinrichsweikamp
parents:
diff changeset
211 movlw .1
heinrichsweikamp
parents:
diff changeset
212 movwf menupos ; Set to first option in divemode menu
249
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
213 movf hardware_flag,W
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
214 sublw 0x11 ; 2 with BLE
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
215 btfsc STATUS,Z
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
216 bra do_divemode_splist2
0
heinrichsweikamp
parents:
diff changeset
217 MENU_BEGIN tGaslist, .6
heinrichsweikamp
parents:
diff changeset
218 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
heinrichsweikamp
parents:
diff changeset
219 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
heinrichsweikamp
parents:
diff changeset
220 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
heinrichsweikamp
parents:
diff changeset
221 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
heinrichsweikamp
parents:
diff changeset
222 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
heinrichsweikamp
parents:
diff changeset
223 MENU_CALL tCCRSensor, do_divemode_sensor
heinrichsweikamp
parents:
diff changeset
224 MENU_END
heinrichsweikamp
parents:
diff changeset
225
249
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
226 do_divemode_splist2:
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
227 MENU_BEGIN tGaslist, .5
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
228 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
229 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
230 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
231 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
232 MENU_DYNAMIC gaslist_strcat_setpoint, do_switch_sp
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
233 MENU_END
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
234
94bf757690cf ignore sensor for non-sensor hardware
heinrichsweikamp
parents: 195
diff changeset
235
0
heinrichsweikamp
parents:
diff changeset
236 do_divemode_sensor:
heinrichsweikamp
parents:
diff changeset
237 ; Set customview to 1 (HUD Data)
heinrichsweikamp
parents:
diff changeset
238 clrf menupos3 ; customview to come-1
heinrichsweikamp
parents:
diff changeset
239 bsf toggle_customview ; Set flag, the customview will be toggled very soon now...
heinrichsweikamp
parents:
diff changeset
240 movlw .1
heinrichsweikamp
parents:
diff changeset
241 movwf menupos ; Set to first option in divemode menu
heinrichsweikamp
parents:
diff changeset
242 MENU_BEGIN tGaslist, .2
heinrichsweikamp
parents:
diff changeset
243 MENU_CALL tDivemenu_UseSensor, do_switch_to_sensor
heinrichsweikamp
parents:
diff changeset
244 MENU_CALL tExit, do_continue_main_divemenu
heinrichsweikamp
parents:
diff changeset
245 MENU_END
heinrichsweikamp
parents:
diff changeset
246
heinrichsweikamp
parents:
diff changeset
247 do_divemode_togglegf:
heinrichsweikamp
parents:
diff changeset
248 ; Set customview to 5 (GF informations)
heinrichsweikamp
parents:
diff changeset
249 movlw .4
heinrichsweikamp
parents:
diff changeset
250 movwf menupos3 ; Customview to come-1
heinrichsweikamp
parents:
diff changeset
251 bsf toggle_customview ; Set flag, the customview will be toggled very soon now...
heinrichsweikamp
parents:
diff changeset
252 movlw .1
heinrichsweikamp
parents:
diff changeset
253 movwf menupos ; Set to first option in divemode menu
heinrichsweikamp
parents:
diff changeset
254 MENU_BEGIN tDivemenu_ToggleGF, .2
heinrichsweikamp
parents:
diff changeset
255 MENU_CALL tDivemenu_ToggleGF, do_togglegf
heinrichsweikamp
parents:
diff changeset
256 MENU_CALL tExit, do_continue_main_divemenu
heinrichsweikamp
parents:
diff changeset
257 MENU_END
heinrichsweikamp
parents:
diff changeset
258
heinrichsweikamp
parents:
diff changeset
259 END