annotate code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 97:dc349e4264bb

Cleanup CF for bad 15bits value display Cleanup old printf prototype New strings macro
author JeanDo
date Sun, 12 Dec 2010 01:13:48 +0100
parents 8d3c1bef6551
children 6f8e3a08011e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2 ; OSTC - diving computer code
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
5 ; This program is free software: you can redistribute it and/or modify
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
6 ; it under the terms of the GNU General Public License as published by
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
7 ; the Free Software Foundation, either version 3 of the License, or
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
8 ; (at your option) any later version.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
9
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
10 ; This program is distributed in the hope that it will be useful,
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
13 ; GNU General Public License for more details.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
14
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
15 ; You should have received a copy of the GNU General Public License
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
17
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
18
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
19 ; Underwater Menu (Set Gas, Decoplan, etc.)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21 ; written: 11/11/05
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
22 ; last updated: 090305
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
23 ; known bugs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
24 ; ToDo:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
25
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
26
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
27 test_switches_divemode:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
28 ; checks switches in divemode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
29 btfsc switch_left
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30 bra test_switches_divemode2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 btfss switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 bcf switch_left ; Left button pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36 bcf switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
38 bcf select_bailoutgas ; Clear Flag for Bailout list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39 bsf premenu ; Set Flag for premenu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
40 bcf menubit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41 clrf timeout_counter3 ; timeout_divemenu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43 btfsc FLAG_apnoe_mode ; In Apnoe mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44 bra test_switches_divemode1 ; Yes!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46 test_switches_divemode0:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47 WIN_INVERT .1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48 DISPLAYTEXT .4 ;Menu?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
49 WIN_INVERT .0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
52 test_switches_divemode1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
53 DISPLAYTEXT .141 ;Quit?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
56 test_switches_divemode2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
57 bcf switch_left ; Also reactivate left button if there was a right press without prior left press
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 bcf switch_right ; enable right button again
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
59
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
60 btfss premenu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 bra set_marker ; No Pre-Menu displayed -> Set Markerflag!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
62
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63 btfss FLAG_apnoe_mode ; In Apnoe mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64 bra test_switches_divemode2a; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
66 ; Yes, so quit Apnoe mode at once...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
67 bcf divemode ; Clear Divemode flag...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
68 bcf premenu ; clear premenu flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
69 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
70
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
71 test_switches_divemode2a:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
72 bsf menubit ; Enter Divemode-Menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
73 bcf premenu ; clear premenu flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
74 call PLED_clear_divemode_menu ; Clear dive mode menu area
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
75 call PLED_divemode_menu_mask_first ; Write Divemode menu1 mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
76 bcf display_set_simulator ; Clear Simulator-Menu flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
77 bcf divemode_menu_page ; Start in Menu Page one
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
78 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
79 movwf menupos ; reset cursor in divemode menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
80 call PLED_divemenu_cursor ; show cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
81 bcf switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
82 bcf switch_left ; Left button pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
83 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
84
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
85 set_marker:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
86 btfsc standalone_simulator ; Standalone Simualtor active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
87 bra divemode_menu_simulator ; Yes, Show simulator menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
88
71
6beb680a6130 1.72beta - color-coded gaslist, small fix with stopwatch
heinrichsweikamp
parents: 68
diff changeset
89 bsf LED_red ; LEDr on
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
90 movlw d'6' ; Type of Alarm (Manual Marker)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
91 movwf AlarmType ; Copy to Alarm Register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
92 bsf event_occured ; Set Event Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
93
71
6beb680a6130 1.72beta - color-coded gaslist, small fix with stopwatch
heinrichsweikamp
parents: 68
diff changeset
94 btfss stopwatch_active ; =1: Reset Average registers
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
95 return
71
6beb680a6130 1.72beta - color-coded gaslist, small fix with stopwatch
heinrichsweikamp
parents: 68
diff changeset
96 btfsc lock_stopwatch_reset ; Reset locked?
6beb680a6130 1.72beta - color-coded gaslist, small fix with stopwatch
heinrichsweikamp
parents: 68
diff changeset
97 return ; Yes, do not reset (now)...
6beb680a6130 1.72beta - color-coded gaslist, small fix with stopwatch
heinrichsweikamp
parents: 68
diff changeset
98
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
99 ; Maker Set, also reset average Depth....
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
100 clrf average_depth_hold+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
101 clrf average_depth_hold+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
102 clrf average_depth_hold+2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
103 clrf average_depth_hold+3 ; Clear average depth register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
104 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
105 movwf average_divesecs+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
106 clrf average_divesecs+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
107 call calc_average_depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
108 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
109
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
110 test_switches_divemode_menu:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
111 btfsc switch_left
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
112 bra test_switches_divemode_menu3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
113 btfss switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
114 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
115
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
116 btfsc display_see_l_tissue ; Is the leading tissue info screen active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
117 bra divemenu_see_leading_tissue2; Yes, quit menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
118
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
119 btfsc display_see_deco ; Is the Decoplan displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
120 bra divemenu_see_decoplan2 ; Yes, exit menu on left button press
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
121
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
122 btfsc display_set_graphs ; Is the Graph displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
123 bra divemode_set_graphs2 ; Yes, exit menu on right button press
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
124
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
125 bcf switch_right ; Left button pressed
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
126 clrf timeout_counter3 ; timout_divemenu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
127 incf menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
128
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
129 ; Following routine configures the number of menu entries for the different modes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
130 movlw d'6' ; number of available gases+1, ; number of menu options+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
131 btfsc display_set_setpoint ; In SetPoint Menu?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
132 movlw d'4' ; Number of entries for this menu+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
133
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
134 cpfseq menupos ; =limit?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
135 bra test_switches_divemode_menu1; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
136 movlw d'1' ; Yes, reset to position 1!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
137 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
138 test_switches_divemode_menu1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
139 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
140 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
141
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
142 test_switches_divemode_menu3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
143 bcf switch_left
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
144 bcf switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
145 bsf menubit ; Enter Divemode-Menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
146 bcf premenu ; clear premenu flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
147 clrf timeout_counter3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
148
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
149 btfsc display_see_l_tissue ; Is the leading tissue info screen active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
150 bra divemenu_see_leading_tissue2; Yes, quit menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
151
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
152 btfsc display_set_gas ; Are we in the "Gaslist" or "SetPoint" menu?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
153 bra divemenu_set_gas2 ; Yes, so set gas and exit menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
154
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
155 btfsc display_see_deco ; Is the Decoplan displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
156 bra divemenu_see_decoplan2 ; Yes, exit menu on right button press
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
157
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
158 btfsc display_set_graphs ; Is the Graph displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
159 bra divemode_set_graphs2 ; Yes, exit menu on right button press
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
160
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
161 btfsc display_set_xgas ; Are we in the "Set Gas" menu?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
162 bra divemenu_set_xgas2 ; Yes, so configure gas or set menu and exit menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
163
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
164 btfsc display_set_simulator ; Are we in the Divemode Simulator menu?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
165 goto divemode_menu_simulator2 ; Yes, so adjust depth or set and exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
166
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
167 btfsc divemode_menu_page ; Are we in the second menu page?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
168 bra test_switches_divemode_menu4; Yes, use second page items
73
2227459e8ef2 Exchanged Decoplan and Gaslist in dive mode menu
heinrichsweikamp
parents: 71
diff changeset
169
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
170 ; Options for Menu 1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
171 dcfsnz menupos,F
73
2227459e8ef2 Exchanged Decoplan and Gaslist in dive mode menu
heinrichsweikamp
parents: 71
diff changeset
172 bra divemenu_set_gas ; Set gas sub-menu
2227459e8ef2 Exchanged Decoplan and Gaslist in dive mode menu
heinrichsweikamp
parents: 71
diff changeset
173 dcfsnz menupos,F
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
174 bra divemenu_see_decoplan ; display the full decoplan
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
175 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
176 bra divemode_set_xgas ; Configure the extra gas / Select Bailout
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
177 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
178 bra divemenu_enter_second ; Enter second Menu page
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
179 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
180 bra timeout_divemenu2 ; Quit divemode menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
181 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
182
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
183 test_switches_divemode_menu4:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
184 ; Options for Menu 2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
185 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
186 bra divemode_set_graphs ; Show saturation graphs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
187 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
188 bra divemode_toggle_brightness ; Toggle OLED-Brightness
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
189 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
190 bra divemenu_see_leading_tissue ; Display details about leading tissue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
191 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
192 bra toggle_stopwatch ; Toggle Stopwatch
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
193 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
194 bra timeout_divemenu2 ; Quit divemode menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
195 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
196
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
197 toggle_stopwatch:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
198 btg stopwatch_active ; Toggle Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
199
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
200 btfss stopwatch_active ; Show Stopwatch?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
201 bra toggle_stopwatch2 ; No, remove outputs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
203 clrf average_depth_hold+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
204 clrf average_depth_hold+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205 clrf average_depth_hold+2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
206 clrf average_depth_hold+3 ; Clear average depth register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
208 movwf average_divesecs+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
209 clrf average_divesecs+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 call calc_average_depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
211
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
214 toggle_stopwatch2:
87
8d3c1bef6551 some preparations for new custom view
heinrichsweikamp
parents: 73
diff changeset
215 call PLED_clear_customview_divemode ; Remove Stopwatch Outputs
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
216 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
218 divemode_toggle_brightness:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219 read_int_eeprom d'90' ; Brightness offset? (Dim>0, Normal = 0)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220 tstfsz EEDATA ; Was dimmed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 bra divemode_toggle_brightness1 ; Yes...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
222
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
223 call PLED_brightness_low
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
225 movwf EEDATA ; Copy to EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
226 write_int_eeprom d'90' ; Brightness offset? (Dim=1, Normal = 0)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 bra divemode_toggle_brightness3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
228
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229 divemode_toggle_brightness1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
230 call PLED_brightness_full
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
231 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
232 movwf EEDATA ; Copy to EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
233 write_int_eeprom d'90' ; Brightness offset? (Dim=1, Normal = 0)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 divemode_toggle_brightness3:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
236 ; Now, redraw all outputs (All modes)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237 call PLED_active_gas_divemode ; Display gas, if required
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 call PLED_temp_divemode ; Displays temperature
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
239 call PLED_depth ; Displays new depth...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
240 call PLED_max_pressure ; ...and max. depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
244 btfsc gauge_mode ; Ignore in Gauge mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
247 ; Redraw Outputs in Deco modes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
248 btfsc dekostop_active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
249 call PLED_display_deko_mask ; clear nostop time, display decodata
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
250 btfss dekostop_active
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
251 call PLED_display_ndl_mask ; Clear deco data, display nostop time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
252 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
253
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
254 divemenu_enter_second:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
255 call PLED_clear_divemode_menu ; Clear dive mode menu area
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
256 call PLED_divemode_menu_mask_second ; Write Divemode menu1 mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
257 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
258 movwf menupos ; reset cursor to first item in divemode menu page two
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
259 bsf divemode_menu_page ; Enter Menu Page two
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
260 call PLED_divemenu_cursor ; show cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
261 bcf switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
262 bcf switch_left ; Left button pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
263 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
264
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
265 divemode_set_xgas: ; Set the extra gas...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
266 btfsc FLAG_const_ppO2_mode ; are we in ppO2 mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
267 bra divemenu_set_bailout ; Yes, so display Bailot list...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
268
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
269 bsf display_set_xgas ; Set Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
270 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
271
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
272 movff char_I_O2_ratio, EEDATA ; Reset Gas6 to current gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
273 write_int_eeprom d'24'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
274 movff char_I_He_ratio, EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
275 write_int_eeprom d'25'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
276
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
277 call PLED_divemode_set_xgas ; Show mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
278
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
279 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
280 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
281 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
282
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
283 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
284
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
285 divemode_menu_simulator:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
286 bsf menubit ; Enter Divemode-Menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
287 bcf premenu ; clear premenu flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
288 bcf switch_right
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
289 bcf switch_left ; Left button pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
290 bsf display_set_simulator ; Set Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
291 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
292 call PLED_divemode_simulator_mask; Show mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
293 bcf divemode_menu_page ; Start in Menu Page one
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
294 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
295 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
296 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
297 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
298
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
299 divemode_menu_simulator2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
300 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
301 bra timeout_divemenu2 ; quit underwater menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
302 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
303 bra divemode_menu_simulator_p1 ; Adjust +1m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
304 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
305 bra divemode_menu_simulator_m1 ; Adjust -1m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
306 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
307 bra divemode_menu_simulator_p10 ; Adjust +10m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
308 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
309 bra divemode_menu_simulator_m10 ; Adjust -10m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
310 bra timeout_divemenu2 ; quit underwater menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
311
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
312 divemode_menu_simulator_common:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
313 call PLED_divemode_simulator_mask ; Redraw Simualtor mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
314
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
315 ; Check limits (140m and 0m)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
316 movlw LOW d'15000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
317 movwf sub_a+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
318 movlw HIGH d'15000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
319 movwf sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
320 movff sim_pressure+0,sub_b+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
321 movff sim_pressure+1,sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
322 call sub16 ; sub_c = sub_a - sub_b
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
323 btfss neg_flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
324 bra divemode_menu_simulator_common2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
325 ; Too deep, limit to 140m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
326 movlw LOW d'15000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
327 movwf sim_pressure+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
328 movlw HIGH d'15000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
329 movwf sim_pressure+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
330 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
331
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
332 divemode_menu_simulator_common2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
333 movlw LOW d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
334 movwf sub_a+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
335 movlw HIGH d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
336 movwf sub_a+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
337 movff sim_pressure+0,sub_b+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
338 movff sim_pressure+1,sub_b+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
339 call sub16 ; sub_c = sub_a - sub_b
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
340 btfsc neg_flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
341 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
342 ; Too shallow, limit to 1m
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
343 movlw LOW d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
344 movwf sim_pressure+0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
345 movlw HIGH d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
346 movwf sim_pressure+1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
347 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
348
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
349 divemode_menu_simulator_m10:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
350 movlw LOW d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
351 subwf sim_pressure+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
352 movlw HIGH d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
353 subwfb sim_pressure+1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
354 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
355 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
356 bra divemode_menu_simulator_common
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
357
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
358 divemode_menu_simulator_p10:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
359 movlw LOW d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
360 addwf sim_pressure+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
361 movlw HIGH d'1000'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
362 addwfc sim_pressure+1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
363 movlw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
364 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
365 bra divemode_menu_simulator_common
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
366
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
367 divemode_menu_simulator_p1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
368 movlw d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
369 addwf sim_pressure+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
370 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
371 addwfc sim_pressure+1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
372 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
373 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
374 bra divemode_menu_simulator_common
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
375
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
376 divemode_menu_simulator_m1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
377 movlw d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
378 subwf sim_pressure+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
379 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
380 subwfb sim_pressure+1,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
381 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
382 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
383 bra divemode_menu_simulator_common
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
384
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
385 divemode_set_graphs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
386 bsf display_set_graphs ; set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
387 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
388 call deco_main_calc_desaturation_time ; calculate desaturation time
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
389 movlb b'00000001' ; select ram bank 1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
390 call PLED_saturation_graph_divemode ; Display saturation graph
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
391 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
392
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
393 divemode_set_graphs2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
394 bcf display_set_graphs ; clear flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
395 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
396
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
397 divemenu_see_leading_tissue:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
398 bsf display_see_l_tissue ; Set Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
399 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
400 call PLED_show_leading_tissue ; Show infos about leading tissue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
401 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
402
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
403 divemenu_see_leading_tissue2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
404 bcf display_see_l_tissue ; Clear Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
405 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
406
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
407 divemenu_see_decoplan:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
408 bsf display_see_deco ; set flag
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
409 call PLED_clear_divemode_menu ; Clear Menu
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
410
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
411 read_int_eeprom d'34'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
412 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
413 cpfsgt EEDATA ; in multi-gf mode? Z16 GF OC=4 and Z16 GF CC=5
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 66
diff changeset
414 bra divemenu_see_decoplan1 ; No, standard ZH-L16
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
415
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
416 bsf multi_gf_display ; Yes, display the multi-gf table screen
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
417 bcf last_ceiling_gf_shown ; Clear flag
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
418
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 66
diff changeset
419 ; movff char_O_deco_status,deco_status ;
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 66
diff changeset
420 ; tstfsz deco_status ; deco_status=0 if decompression calculation done
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 66
diff changeset
421 ; return ; calculation not yet finished!
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
422
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
423 call PLED_decoplan_gf_page1 ; Display the new screen
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
424 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
425
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
426 divemenu_see_decoplan1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
427
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
428 movff char_O_deco_status,deco_status ;
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
429 tstfsz deco_status ; deco_status=0 if decompression calculation done
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
430 return ; calculation not yet finished!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
431
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
432 call PLED_decoplan ; display the Decoplan
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
433 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
434
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
435 divemenu_see_decoplan2:
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
436 btfsc multi_gf_display ; Next Page in Multi-GF Screen?
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
437 bra divemenu_see_decoplan2_nextgf ; Yes!
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
438 ; No, remove outputs!
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
439 divemenu_see_decoplan2_0:
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
440 bcf display_see_deco ; clear flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
441 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
442
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
443 divemenu_see_decoplan2_nextgf:
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
444 incf temp8,F
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
445 btfsc last_ceiling_gf_shown ; last ceiling shown?
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
446 bra divemenu_see_decoplan2_0 ; All done, clear and return
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
447
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
448 clrf timeout_counter3 ; Clear timeout Divemode menu
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 66
diff changeset
449 bra timeout_divemenu3x ; Display next page
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
450
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
451
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
452
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
453 divemenu_set_xgas2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
454 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
455 bra divemenu_set_xgas2_exit ; Use the gas6 configured and exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
456 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
457 bra divemenu_set_xgas2_o2plus ; Adjust O2+
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
458 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
459 bra divemenu_set_xgas2_o2minus ; Adjust O2-
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
460 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
461 bra divemenu_set_xgas2_heplus ; Adjust He+
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
462 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
463 bra divemenu_set_xgas2_heminus ; Adjust He-
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
464 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
465
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
466 divemenu_set_xgas2_heminus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
467 read_int_eeprom d'25' ; He value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
468 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
469 decf lo,F ; decrease He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
470 movlw d'255'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
471 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
472 bra divemenu_set_xgas2_heminus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
473 incf lo,F ; limit to min=0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
474 divemenu_set_xgas2_heminus2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
475 movff lo, EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
476 write_int_eeprom d'25' ; He Value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
477
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
478 call PLED_divemode_set_xgas ; Redraw menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
479 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
480 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
481 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
482
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
483 divemenu_set_xgas2_heplus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
484 read_int_eeprom d'25' ; He value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
485 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
486 incf lo,F ; increase He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
487 movlw d'101'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
488 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
489 bra divemenu_set_xgas2_heplus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
490 movlw d'4' ; O2 Limit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
491 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
492 divemenu_set_xgas2_heplus2: ; test if O2+He>100...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
493 read_int_eeprom d'24' ; O2 value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
494 movf EEDATA,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
495 addwf lo,W ; add He value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
496 movwf hi ; store in temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
497 movlw d'101'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
498 cpfseq hi ; O2 and He > 100?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
499 bra divemenu_set_xgas2_heplus3 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
500 decf lo,F ; reduce He again = unchanged after operation
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
501 divemenu_set_xgas2_heplus3: ; save current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
502 movff lo, EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
503 write_int_eeprom d'25' ; He Value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
504
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
505 call PLED_divemode_set_xgas ; Redraw menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
506 movlw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
507 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
508 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
509
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
510 divemenu_set_xgas2_o2minus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
511 read_int_eeprom d'24' ; O2 value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
512 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
513 decf lo,F ; decrease O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
514 movlw d'3' ; Limit-1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
515 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
516 bra divemenu_set_xgas2_o2minus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
517 incf lo,F ; limit to min=9
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
518 divemenu_set_xgas2_o2minus2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
519 movff lo, EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
520 write_int_eeprom d'24' ; O2 Value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
521
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
522 call PLED_divemode_set_xgas ; Redraw menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
523 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
524 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
525 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
526
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
527 divemenu_set_xgas2_o2plus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
528 read_int_eeprom d'24' ; O2 value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
529 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
530 incf lo,F ; increase O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
531 movlw d'101'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
532 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
533 bra divemenu_set_xgas2_o2plus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
534 movlw d'5' ; O2 limit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
535 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
536 divemenu_set_xgas2_o2plus2: ; test if O2+He>100...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
537 read_int_eeprom d'25' ; He value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
538 movf EEDATA,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
539 addwf lo,W ; add O2 value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
540 movwf hi ; store in temp
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
541 movlw d'101'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
542 cpfseq hi ; O2 and He > 100?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
543 bra divemenu_set_xgas2_o2plus3 ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
544 decf lo,F ; reduce O2 again = unchanged after operation
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
545 divemenu_set_xgas2_o2plus3: ; save current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
546 movff lo, EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
547 write_int_eeprom d'24' ; O2 Value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
548
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
549 call PLED_divemode_set_xgas ; Redraw menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
550 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
551 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
552 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
553
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
554 divemenu_set_xgas2_exit:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
555 read_int_eeprom d'25' ; Read He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
556 movff EEDATA,char_I_He_ratio ; And copy into hold register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
557
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
558 read_int_eeprom d'24' ; Read O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
559 movff EEDATA, char_I_O2_ratio ; O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
560 movff char_I_He_ratio, wait_temp ; copy into bank1 register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
561 bsf STATUS,C ;
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
562 movlw d'100' ; 100%
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
563 subfwb wait_temp,W ; minus He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
564 subfwb EEDATA,F ; minus O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
565 movff EEDATA, char_I_N2_ratio ; = N2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
566 bsf manual_gas_changed ; set event flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
567 bsf event_occured ; set global event flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
568 bra timeout_divemenu2 ; quit underwater menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
569
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
570 divemenu_set_bailout:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
571 bsf display_set_gas ; set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
572 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
573
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
574 bcf FLAG_const_ppO2_mode ; Delete Flag to show all bailouts
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
575 bsf select_bailoutgas ; Set Flag for Bailout list
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
576 call PLED_gas_list ; Display all 5 gases
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
577 bsf FLAG_const_ppO2_mode ; Reset Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
578
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
579 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
580 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
581 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
582 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
583
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
584 divemenu_set_gas:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
585 btfsc FLAG_const_ppO2_mode ; in ppO2 mode?
17
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
586 bra divemenu_set_setpoint ; Yes, display SetPoint list
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
587
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
588 bsf display_set_gas ; set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
589 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
590 call PLED_gas_list ; Display all 5 gases
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
591 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
592 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
593 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
594 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
595
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
596 divemenu_set_setpoint:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
597 bsf display_set_setpoint ; set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
598 bsf display_set_gas ; set flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
599
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
600 call PLED_clear_divemode_menu ; Clear Menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
601 call PLED_splist_start ; Display SetPoints and Sensor results
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
602 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
603 movwf menupos ; reset cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
604 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
605
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
606 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
607
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
608
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
609 divemenu_set_gas2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
610 btfsc select_bailoutgas ; Are we in the Bailout list?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
611 bra divemenu_set_gas2a ; Yes, choose gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
612
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
613 btfss FLAG_const_ppO2_mode ; are we in ppO2 mode?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
614 bra divemenu_set_gas2a ; no, choose gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
615 ; Yes, so select SP 1-3 or Sensor mode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
616
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
617 bcf is_bailout ;=1: CC mode, but bailout active!
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
618 call PLED_show_ppO2_clear; Clear ppO2 value
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
619
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
620 divemenu_set_gas1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
621 movlw d'35' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
622 addwf menupos,W ; add SP number 0-2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
623 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
624 call read_eeprom ; Read SetPoint
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
625 movff EEDATA, char_I_const_ppO2 ; Use SetPoint
4
2b5c52ae3923 1.52 beta rc
heinrichsweikamp
parents: 3
diff changeset
626 movff EEDATA, ppO2_setpoint_store ; Store also in this byte...
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
627
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
628 divemenu_set_gas1a:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
629 bcf display_set_setpoint ; Clear Display Flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
630 ; Now, Set correct Diluent (again)
17
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
631 ; read_int_eeprom d'33' ; Read byte (stored in EEDATA)
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
632 ; movff EEDATA,active_gas ; Read start gas (1-5)
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
633 ;
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
634 ; decf active_gas,W ; Gas 0-4
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
635 ; mullw d'4'
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
636 ; movf PRODL,W
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
637 ; addlw d'7' ; = address for He ratio
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
638 ; movwf EEADR
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
639 ; call read_eeprom ; Read He ratio
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
640 ; movff EEDATA,char_I_He_ratio ; And copy into hold register
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
641 ; decf active_gas,W ; Gas 0-4
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
642 ; mullw d'4'
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
643 ; movf PRODL,W
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
644 ; addlw d'6' ; = address for O2 ratio
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
645 ; movwf EEADR
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
646 ; call read_eeprom ; Read O2 ratio
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
647 ; movff EEDATA, char_I_O2_ratio ; O2 ratio
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
648 ; movff char_I_He_ratio, wait_temp ; copy into bank1 register
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
649 ; bsf STATUS,C ; Borrow bit
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
650 ; movlw d'100' ; 100%
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
651 ; subfwb wait_temp,W ; minus He
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
652 ; bsf STATUS,C ; Borrow bit
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
653 ; subfwb EEDATA,F ; minus O2
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
654 ; movff EEDATA, char_I_N2_ratio ; = N2!
68825abc35f7 1.55beta rc1
heinrichsweikamp
parents: 4
diff changeset
655 ; call PLED_active_gas_clear ; Clear gas in case of AIR (Will be redrawn)
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
656
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
657 bsf stored_gas_changed ; set event flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
658 bsf event_occured ; set global event flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
659 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
660
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
661 divemenu_set_gas2a:
3
3cf8af30b36e v1.51 beta
heinrichsweikamp
parents: 0
diff changeset
662 bsf is_bailout ;=1: CC mode, but bailout active!
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
663 clrf lo ; clear Setpoint, PLED_const_ppO2_value now displayes "Bail"
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
664 movff lo,char_I_const_ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
665
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
666 bcf display_set_gas ; clear flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
667 movff menupos,active_gas ; copy into active gas register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
668 decf menupos,W ; # of selected gas (0-4)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
669 mullw d'4' ; times 4...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
670 movf PRODL,W ;
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
671 addlw d'7' ; +7 = address for He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
672 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
673 call read_eeprom ; Read He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
674 movff EEDATA,char_I_He_ratio ; And copy into hold register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
675
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
676 decf menupos,W ; # of selected gas (0-4)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
677 mullw d'4' ; times 4...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
678 movf PRODL,W ;
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
679 addlw d'6' ; +6 = address for O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
680 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
681 call read_eeprom ; Read O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
682 movff EEDATA, char_I_O2_ratio ; O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
683 movff char_I_He_ratio, wait_temp ; copy into bank1 register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
684 bsf STATUS,C ;
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
685 movlw d'100' ; 100%
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
686 subfwb wait_temp,W ; minus He
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
687 subfwb EEDATA,F ; minus O2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
688 movff EEDATA, char_I_N2_ratio ; = N2!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
689 bsf stored_gas_changed ; set event flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
690 bsf event_occured ; set global event flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
691 bra timeout_divemenu2 ; quit menu!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
692
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
693 timeout_divemenu:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
694 btfss menubit ; is the Dive mode menu displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
695 return ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
696
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
697 btfsc display_see_l_tissue ; Are the leading tissue details displayed?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
698 bra timeout_divemenu7 ; Yes, update them
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
699
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
700 btfsc display_set_simulator ; Is the Simulator Mask active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
701 bra timeout_divemenu6 ; Yes, update Simulator mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
702
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
703
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
704 btfss display_see_deco ; Is the decoplan active?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
705 bra timeout_divemenu1 ; No, skip updating the decoplan
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
706
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
707 btfsc multi_gf_display ; display the multi-gf table screen?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
708 bra timeout_divemenu3 ; Yes...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
709
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
710 movff char_O_deco_status,deco_status ;
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
711 tstfsz deco_status ; deco_status=0 if decompression calculation done
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
712 bra timeout_divemenu1 ; No, skip updating the decoplan
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
713
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
714 call PLED_decoplan ; update the Decoplan
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
715
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
716 timeout_divemenu1:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
717 incf timeout_counter3,F ; increase timeout_counter3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
718 GETCUSTOM8 d'10' ; loads timeout_divemenu into WREG
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
719 cpfsgt timeout_counter3 ; ... longer then timeout_divemenu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
720 return ; No!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
721 timeout_divemenu2: ; quit divemode menu
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
722 btfss multi_gf_display ; Was the Multi-GF Table displayed?
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
723 bra timeout_divemenu2a ; No, normal OLED rebuild
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
724
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
725 ; Restore some outputs
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
726 clrf temp8 ; Page 0-1 of deco list
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
727 btfsc dekostop_active
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
728 call PLED_display_deko_mask ; clear nostop time, display decodata
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
729 btfss dekostop_active
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
730 call PLED_display_ndl_mask ; Clear deco data, display nostop time
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
731
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
732 timeout_divemenu2a:
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
733 bcf multi_gf_display ; Do not display the multi-gf table screen
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
734 bcf menubit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
735 bcf premenu ; Yes, clear flags and menu, display dive time and mask again
66
6aee3a07f370 1.71beta in work...
heinrichsweikamp
parents: 64
diff changeset
736 call PLED_active_gas_divemode; Display gas, if required
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
737 call PLED_clear_divemode_menu; Clear dive mode menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
738 call PLED_divemode_mask ; Display mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
739 call PLED_divemins ; Display (new) divetime!
87
8d3c1bef6551 some preparations for new custom view
heinrichsweikamp
parents: 73
diff changeset
740 btfss dekostop_active
8d3c1bef6551 some preparations for new custom view
heinrichsweikamp
parents: 73
diff changeset
741 call PLED_display_ndl_mask
8d3c1bef6551 some preparations for new custom view
heinrichsweikamp
parents: 73
diff changeset
742 btfsc dekostop_active
8d3c1bef6551 some preparations for new custom view
heinrichsweikamp
parents: 73
diff changeset
743 call PLED_display_deko_mask
8d3c1bef6551 some preparations for new custom view
heinrichsweikamp
parents: 73
diff changeset
744
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
745 clrf timeout_counter3 ; Also clear timeout
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
746 bcf display_see_deco ; clear all display flags
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
747 bcf display_see_l_tissue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
748 bcf display_set_gas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
749 bcf display_set_graphs
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
750 bcf display_set_xgas
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
751 bcf display_set_setpoint
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
752 bcf display_set_simulator
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
753 bcf switch_left ; and debounce switches
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
754 bcf switch_right
71
6beb680a6130 1.72beta - color-coded gaslist, small fix with stopwatch
heinrichsweikamp
parents: 68
diff changeset
755 bsf lock_stopwatch_reset ; Lock the stopwatch reset for at least one second (Cleared in "calc_average_depth:")
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
756 return
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
757
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
758 timeout_divemenu3:
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
759 movff char_O_deco_status,deco_status ;
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
760 tstfsz deco_status ; deco_status=0 if decompression calculation done
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
761 bra timeout_divemenu1 ; No, skip updating the decoplan
68
d0b677e1e9a5 new decoplan (GF mode) debuged
heinrichsweikamp
parents: 66
diff changeset
762 timeout_divemenu3x:
64
e8756eba54ee 1.71beta - more deco
heinrichsweikamp
parents: 30
diff changeset
763 call PLED_decoplan_gf_page_current ; Re-Draw Current page of GF Decoplan
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
764 bra timeout_divemenu1 ; Check timeout
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
765
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
766 timeout_divemenu6:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
767 ; Update Simulator Mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
768 call PLED_divemode_simulator_mask; Show mask
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
769 call PLED_divemenu_cursor ; update cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
770 bra timeout_divemenu1 ; Check timeout
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
771
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
772 timeout_divemenu7:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
773 ; Update Leading tissue infos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
774 call PLED_show_leading_tissue ; Update infos about leading tissue
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
775 bra timeout_divemenu1 ; Check timeout