Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/divemode_menu.asm @ 838:2750099bf5bb
3.15 release
author | heinrichsweikamp |
---|---|
date | Tue, 19 Jan 2021 12:57:23 +0100 |
parents | 2a0e5d884fc3 |
children |
rev | line source |
---|---|
815 | 1 ; OSTC Mk.2, 2N and 2C - diving computer code |
807
c50296c3059e
BUGFIX: Divetime had unwanted "." behind the minutes
heinrichsweikamp
parents:
795
diff
changeset
|
2 ; Copyright (C) 2015 HeinrichsWeikamp GbR |
0 | 3 |
4 ; This program is free software: you can redistribute it and/or modify | |
5 ; it under the terms of the GNU General Public License as published by | |
6 ; the Free Software Foundation, either version 3 of the License, or | |
7 ; (at your option) any later version. | |
8 | |
9 ; This program is distributed in the hope that it will be useful, | |
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 ; GNU General Public License for more details. | |
13 | |
14 ; You should have received a copy of the GNU General Public License | |
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | |
17 | |
18 ; Underwater Menu (Set Gas, Decoplan, etc.) | |
19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com | |
20 ; written: 11/11/05 | |
21 ; last updated: 090305 | |
22 ; known bugs: | |
23 ; ToDo: | |
24 | |
25 | |
112 | 26 test_switches_divemode: ; checks switches in divemode |
337 | 27 btfsc uart_dump_screen ; Asked to dump screen contains ? |
28 call dump_screen ; Yes! | |
29 | |
0 | 30 btfsc switch_left |
31 bra test_switches_divemode2 | |
32 | |
33 btfss switch_right | |
34 return | |
576 | 35 |
36 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
0 | 37 |
38 bcf select_bailoutgas ; Clear Flag for Bailout list | |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
39 |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
40 btfsc premenu ; Pre-Menu? already shown? |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
41 bra test_switches_divemode0 ; Yes, check if we should jump to menu Entry3 |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
42 |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
43 test_switches_divemode_a: |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
44 |
0 | 45 bsf premenu ; Set Flag for premenu |
46 bcf menubit | |
47 clrf timeout_counter3 ; timeout_divemenu | |
48 | |
49 btfsc FLAG_apnoe_mode ; In Apnoe mode? | |
50 bra test_switches_divemode1 ; Yes! | |
51 | |
795 | 52 call DISP_divemask_color ; Set Color for Divemode mask |
0 | 53 WIN_INVERT .1 |
54 DISPLAYTEXT .4 ;Menu? | |
55 WIN_INVERT .0 | |
795 | 56 call DISP_standard_color |
0 | 57 return |
58 | |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
59 test_switches_divemode0: |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
60 btfss menu3_active ; Something to do at Menupos=3? |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
61 bra test_switches_divemode_a ; No |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
62 ; Yes! So show menu and jump to this position |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
63 movlw d'3' |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
64 movwf menupos |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
65 bra test_switches_divemode2b ; Show menu with cursor at menupos=3 |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
66 |
0 | 67 test_switches_divemode1: |
68 DISPLAYTEXT .141 ;Quit? | |
69 return | |
70 | |
71 test_switches_divemode2: | |
576 | 72 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
0 | 73 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
74 btfsc premenu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
75 bra test_switches_divemode2_2 |
109
6e635bf5b7a7
fixed double-effect of ENTER button in divemode
heinrichsweikamp
parents:
107
diff
changeset
|
76 btfsc menubit |
6e635bf5b7a7
fixed double-effect of ENTER button in divemode
heinrichsweikamp
parents:
107
diff
changeset
|
77 bra test_switches_divemode2_2 ; Not in Premenu or Menu... |
0 | 78 |
112 | 79 bsf toggle_customview ; Toggle customview (Cleared in customview.asm) |
80 | |
81 btfsc standalone_simulator ; Standalone Simualtor active? | |
82 bra divemode_menu_simulator ; Yes, Show simulator menu! | |
83 return | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
84 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
85 test_switches_divemode2_2: |
0 | 86 btfss FLAG_apnoe_mode ; In Apnoe mode? |
87 bra test_switches_divemode2a; No! | |
88 | |
89 ; Yes, so quit Apnoe mode at once... | |
90 bcf divemode ; Clear Divemode flag... | |
91 bcf premenu ; clear premenu flag | |
92 return | |
93 | |
94 test_switches_divemode2a: | |
277
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
95 movlw d'1' |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
96 movwf menupos ; reset cursor in divemode menu |
46d1012d096a
Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents:
274
diff
changeset
|
97 test_switches_divemode2b: |
0 | 98 bsf menubit ; Enter Divemode-Menu! |
99 bcf premenu ; clear premenu flag | |
681 | 100 call DISP_clear_divemode_menu ; Clear dive mode menu area |
101 call DISP_divemode_menu_mask_first ; Write Divemode menu1 mask | |
0 | 102 bcf display_set_simulator ; Clear Simulator-Menu flag |
681 | 103 call DISP_divemenu_cursor ; show cursor |
576 | 104 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
0 | 105 return |
106 | |
107 test_switches_divemode_menu: | |
337 | 108 btfsc uart_dump_screen ; Asked to dump screen contains ? |
109 call dump_screen ; Yes! | |
110 | |
0 | 111 btfsc switch_left |
112 bra test_switches_divemode_menu3 | |
113 btfss switch_right | |
114 return | |
115 | |
795 | 116 bcf switch_right ; Left button pressed |
117 | |
0 | 118 btfsc display_see_deco ; Is the Decoplan displayed? |
119 bra divemenu_see_decoplan2 ; Yes, exit menu on left button press | |
120 | |
121 clrf timeout_counter3 ; timout_divemenu! | |
122 incf menupos,F | |
123 | |
124 ; Following routine configures the number of menu entries for the different modes | |
125 movlw d'6' ; number of available gases+1, ; number of menu options+1 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
126 btfsc display_set_gas ; Are we in the "Gaslist" menu? |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
127 movlw d'7' ; Yes, Number of entries for this menu+1 = 7 |
0 | 128 btfsc display_set_setpoint ; In SetPoint Menu? |
647 | 129 movlw d'6' ; Number of entries for this menu+1 = 6 |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
130 btfsc display_set_active ; De/Activate gases underwater menu is visible? |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
131 movlw d'7' ; Number of entries for this menu+1 = 7 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
132 btfsc display_set_xgas ; Are we in the Gas6 menu? |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
133 movlw d'7' ; Number of entries for this menu+1 = 7 |
352
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
134 btfsc display_set_simulator ; Are we in the simulator menu? |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
135 movlw d'7' ; Number of entries for this menu+1 = 7 |
647 | 136 btfsc display_set_diluent ; Are we in the "Diluent" list? |
137 movlw d'6' ; Number of entries for this menu+1 = 6 | |
0 | 138 cpfseq menupos ; =limit? |
139 bra test_switches_divemode_menu1; No! | |
140 movlw d'1' ; Yes, reset to position 1! | |
141 movwf menupos | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
142 |
0 | 143 test_switches_divemode_menu1: |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
144 ; Finally, check if menuposition 3 should be skipped (No customview with function displayed) |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
145 |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
146 btfsc display_set_gas ; Are we in the "Gaslist", "SetPoint" or De/Activate gases menu? |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
147 bra test_switches_divemode_menu1a ; Skip test for sub menus |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
148 btfsc display_set_xgas ; Are we in the "Gaslist", "SetPoint" or De/Activate gases menu? |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
149 bra test_switches_divemode_menu1a ; Skip test for sub menus |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
150 btfsc display_set_active ; Are we in the "Gaslist", "SetPoint" or De/Activate gases menu? |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
151 bra test_switches_divemode_menu1a ; Skip test for sub menus |
647 | 152 btfsc display_set_diluent ; Are we in the "Gaslist", "SetPoint" or De/Activate gases menu? |
153 bra test_switches_divemode_menu1a ; Skip test for sub menus | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
154 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
155 movlw d'3' |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
156 cpfseq menupos ; At position 3? |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
157 bra test_switches_divemode_menu1a ; No |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
158 btfss menu3_active ; Menu position 3 has functionality? |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
159 incf menupos,F ; No, +1, skip to menuos=4 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
160 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
161 test_switches_divemode_menu1a: |
681 | 162 call DISP_divemenu_cursor ; update cursor |
528
67ab3c028bc2
Show change gas depth below gaslist (in divemode)
heinrichsweikamp
parents:
525
diff
changeset
|
163 btfsc display_set_gas ; In Gaslist or Setpoint list menu? |
681 | 164 call DISP_show_change_depth ; Yes, show change depth for gas #menupos |
0 | 165 return |
166 | |
167 test_switches_divemode_menu3: | |
576 | 168 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
0 | 169 bsf menubit ; Enter Divemode-Menu! |
170 bcf premenu ; clear premenu flag | |
171 clrf timeout_counter3 | |
172 | |
173 btfsc display_set_gas ; Are we in the "Gaslist" or "SetPoint" menu? | |
174 bra divemenu_set_gas2 ; Yes, so set gas and exit menu | |
175 | |
176 btfsc display_see_deco ; Is the Decoplan displayed? | |
177 bra divemenu_see_decoplan2 ; Yes, exit menu on right button press | |
178 | |
179 btfsc display_set_xgas ; Are we in the "Set Gas" menu? | |
180 bra divemenu_set_xgas2 ; Yes, so configure gas or set menu and exit menu | |
181 | |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
182 btfsc display_set_active ; Are we in the "De/Activate gases menu?" menu? |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
183 bra divemenu_de_activate2 ; Yes, so toggle active flag |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
184 |
0 | 185 btfsc display_set_simulator ; Are we in the Divemode Simulator menu? |
186 goto divemode_menu_simulator2 ; Yes, so adjust depth or set and exit | |
187 | |
647 | 188 btfsc display_set_diluent ; Are we in the "Diluent" List? |
189 goto divemode_set_diluent2 ; Yes, so choose diluent and exit | |
190 | |
0 | 191 ; Options for Menu 1 |
192 dcfsnz menupos,F | |
73
2227459e8ef2
Exchanged Decoplan and Gaslist in dive mode menu
heinrichsweikamp
parents:
71
diff
changeset
|
193 bra divemenu_set_gas ; Set gas sub-menu |
2227459e8ef2
Exchanged Decoplan and Gaslist in dive mode menu
heinrichsweikamp
parents:
71
diff
changeset
|
194 dcfsnz menupos,F |
0 | 195 bra divemenu_see_decoplan ; display the full decoplan |
196 dcfsnz menupos,F | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
197 bra divemode_menu3 ; Customview-function |
0 | 198 dcfsnz menupos,F |
681 | 199 bra divemode_toggle_brightness ; Toggle DISPLAY-Brightness |
0 | 200 dcfsnz menupos,F |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
201 bra timeout_divemenu2 ; Quit divemode menu |
119 | 202 bra timeout_divemenu2 ; Quit divemode menu |
0 | 203 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
204 divemode_menu3: |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
205 dcfsnz menupos3,W ; copy |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
206 bra toggle_stopwatch ; Toggle Stopwatch/Average register |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
207 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
208 bra set_marker ; Set Marker |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
209 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
210 bra divemode_menu3_nothing ; clock... |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
211 dcfsnz WREG,F |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
212 bra divemode_menu3_nothing ; leading tissue... |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
213 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
214 bra divemode_menu3_nothing ; Average depth (not resetable) |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
215 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
216 bra divemode_menu3_nothing ; Graphs... |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
217 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
218 bra divemode_menu3_nothing ; END/EAD in divemode |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
219 dcfsnz WREG,F |
525 | 220 bra divemode_menu3_nothing ; Future TTS... |
479
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
221 dcfsnz WREG,F |
9fc8feff27a5
Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents:
407
diff
changeset
|
222 bra toggle_stopwatch ; Cave bailout prediction. |
666 | 223 dcfsnz WREG,F |
224 bra divemode_menu3_nothing ; pSCR info | |
225 dcfsnz WREG,F | |
226 bra toggle_gradient_factors ; Toggle gradient factors | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
227 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
228 divemode_menu3_nothing: |
0 | 229 bra timeout_divemenu2 ; Quit divemode menu |
230 | |
666 | 231 toggle_gradient_factors: |
232 btg use_aGF ; Toggle GF selector bit | |
233 bsf decoplan_invalid ; The decoplan needs to updated | |
234 clrf WREG | |
235 movff WREG,char_O_deco_status ; Restart decoplan computation mH | |
236 btfss use_aGF | |
237 bra toggle_gradient_factors2 ; Use aGf | |
238 ; Use normal GF | |
239 ; Load GF values into RAM | |
240 GETCUSTOM8 d'32' ; GF low | |
241 movff EEDATA,char_I_GF_Low_percentage | |
242 GETCUSTOM8 d'33' ; GF high | |
243 movff EEDATA,char_I_GF_High_percentage | |
244 bra timeout_divemenu2 ; quit menu! | |
245 toggle_gradient_factors2: ; Use aGf | |
246 ; Load GF values into RAM | |
247 GETCUSTOM8 d'67' ; aGF low | |
248 movff EEDATA,char_I_GF_Low_percentage | |
249 GETCUSTOM8 d'68' ; aGF high | |
250 movff EEDATA,char_I_GF_High_percentage | |
251 bra timeout_divemenu2 ; quit menu! | |
252 | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
253 set_marker: |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
254 movlw d'6' ; Type of Alarm (Manual Marker) |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
255 movwf AlarmType ; Copy to Alarm Register |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
256 bsf event_occured ; Set Event Flag |
674 | 257 |
258 ; save snapshot of depth and time | |
259 SAFE_2BYTE_COPY rel_pressure,marker_depth | |
260 SAFE_2BYTE_COPY divemins,marker_time | |
261 movff divesecs,marker_time+2 | |
262 | |
263 bra timeout_divemenu2 ; quit menu! | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
264 |
0 | 265 toggle_stopwatch: |
111 | 266 bsf reset_average_depth ; Average Depth will be resetted in divemode.asm |
0 | 267 bra timeout_divemenu2 ; quit menu! |
268 | |
269 divemode_toggle_brightness: | |
270 read_int_eeprom d'90' ; Brightness offset? (Dim>0, Normal = 0) | |
271 tstfsz EEDATA ; Was dimmed? | |
272 bra divemode_toggle_brightness1 ; Yes... | |
273 | |
681 | 274 call DISP_brightness_low |
0 | 275 movlw d'1' |
276 movwf EEDATA ; Copy to EEDATA | |
277 write_int_eeprom d'90' ; Brightness offset? (Dim=1, Normal = 0) | |
278 bra divemode_toggle_brightness3 | |
279 | |
280 divemode_toggle_brightness1: | |
681 | 281 call DISP_brightness_full |
0 | 282 movlw d'0' |
283 movwf EEDATA ; Copy to EEDATA | |
284 write_int_eeprom d'90' ; Brightness offset? (Dim=1, Normal = 0) | |
285 | |
286 divemode_toggle_brightness3: | |
287 ; Now, redraw all outputs (All modes) | |
681 | 288 call DISP_active_gas_divemode ; Display gas, if required |
289 call DISP_temp_divemode ; Displays temperature | |
290 call DISP_depth ; Displays new depth... | |
291 call DISP_max_pressure ; ...and max. depth | |
0 | 292 |
293 bra timeout_divemenu2 ; quit menu! | |
294 | |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
295 divemenu_de_activate: |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
296 bsf display_set_active ; Set display flag |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
297 bcf display_set_xgas ; Clear Flag |
681 | 298 call DISP_clear_divemode_menu ; Clear Menu |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
299 |
681 | 300 call DISP_de_activelist ; show (de)active gaslist |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
301 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
302 movlw d'1' |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
303 movwf menupos ; reset cursor |
681 | 304 call DISP_divemenu_cursor ; update cursor |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
305 return |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
306 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
307 divemenu_de_activate2: ; Toggle active flag |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
308 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
309 bra divemenu_de_activate2_exit ; Exit, Quit, Abort |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
310 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
311 bra divemenu_de_activate2_g1 ; Toggle Gas1 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
312 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
313 bra divemenu_de_activate2_g2 ; Toggle Gas2 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
314 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
315 bra divemenu_de_activate2_g3 ; Toggle Gas3 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
316 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
317 bra divemenu_de_activate2_g4 ; Toggle Gas4 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
318 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
319 bra divemenu_de_activate2_g5 ; Toggle Gas5 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
320 return ; should never be here |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
321 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
322 divemenu_de_activate2_exit: |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
323 bra timeout_divemenu2 ; quit underwater menu! |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
324 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
325 divemenu_de_activate2_g1: |
290
4dbff2aa31ee
Hunting for refusing to ignore disabled gas in list...
JeanDo
parents:
286
diff
changeset
|
326 btg gaslist_active,0 ; Toggle flag |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
327 movlw d'2' |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
328 movwf menupos ; reset cursor |
681 | 329 call DISP_de_activelist ; show (de)active gaslist |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
330 return |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
331 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
332 divemenu_de_activate2_g2: |
290
4dbff2aa31ee
Hunting for refusing to ignore disabled gas in list...
JeanDo
parents:
286
diff
changeset
|
333 btg gaslist_active,1 ; Toggle flag |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
334 movlw d'3' |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
335 movwf menupos ; reset cursor |
681 | 336 call DISP_de_activelist ; show (de)active gaslist |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
337 return |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
338 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
339 divemenu_de_activate2_g3: |
290
4dbff2aa31ee
Hunting for refusing to ignore disabled gas in list...
JeanDo
parents:
286
diff
changeset
|
340 btg gaslist_active,2 ; Toggle flag |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
341 movlw d'4' |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
342 movwf menupos ; reset cursor |
681 | 343 call DISP_de_activelist ; show (de)active gaslist |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
344 return |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
345 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
346 divemenu_de_activate2_g4: |
290
4dbff2aa31ee
Hunting for refusing to ignore disabled gas in list...
JeanDo
parents:
286
diff
changeset
|
347 btg gaslist_active,3 ; Toggle flag |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
348 movlw d'5' |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
349 movwf menupos ; reset cursor |
681 | 350 call DISP_de_activelist ; show (de)active gaslist |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
351 return |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
352 |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
353 divemenu_de_activate2_g5: |
290
4dbff2aa31ee
Hunting for refusing to ignore disabled gas in list...
JeanDo
parents:
286
diff
changeset
|
354 btg gaslist_active,4 ; Toggle flag |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
355 movlw d'6' |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
356 movwf menupos ; reset cursor |
681 | 357 call DISP_de_activelist ; show (de)active gaslist |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
358 return |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
359 |
0 | 360 divemode_set_xgas: ; Set the extra gas... |
361 bsf display_set_xgas ; Set Flag | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
362 bcf display_set_gas ; Clear Flag |
681 | 363 call DISP_clear_divemode_menu ; Clear Menu |
0 | 364 |
365 movff char_I_O2_ratio, EEDATA ; Reset Gas6 to current gas | |
366 write_int_eeprom d'24' | |
367 movff char_I_He_ratio, EEDATA | |
368 write_int_eeprom d'25' | |
369 | |
681 | 370 call DISP_divemode_set_xgas ; Show mask |
0 | 371 |
372 movlw d'1' | |
373 movwf menupos ; reset cursor | |
681 | 374 call DISP_divemenu_cursor ; update cursor |
0 | 375 return |
376 | |
377 divemode_menu_simulator: | |
378 bsf menubit ; Enter Divemode-Menu! | |
379 bcf premenu ; clear premenu flag | |
576 | 380 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
104 | 381 bsf display_set_simulator ; Set Flag |
382 bsf menu3_active ; So "+1" is accessible at all times | |
681 | 383 call DISP_clear_divemode_menu ; Clear Menu |
384 call DISP_divemode_simulator_mask; Show mask | |
0 | 385 movlw d'1' |
386 movwf menupos ; reset cursor | |
681 | 387 call DISP_divemenu_cursor ; update cursor |
0 | 388 return |
389 | |
390 divemode_menu_simulator2: | |
391 dcfsnz menupos,F | |
119 | 392 bra timeout_divemenu2 ; close underwater menu! |
0 | 393 dcfsnz menupos,F |
394 bra divemode_menu_simulator_p1 ; Adjust +1m | |
395 dcfsnz menupos,F | |
396 bra divemode_menu_simulator_m1 ; Adjust -1m | |
397 dcfsnz menupos,F | |
398 bra divemode_menu_simulator_p10 ; Adjust +10m | |
399 dcfsnz menupos,F | |
400 bra divemode_menu_simulator_m10 ; Adjust -10m | |
352
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
401 dcfsnz menupos,F |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
402 bra divemode_menu_simulator_quit; Adjust to zero m |
0 | 403 bra timeout_divemenu2 ; quit underwater menu! |
404 | |
405 divemode_menu_simulator_common: | |
681 | 406 call DISP_divemode_simulator_mask ; Redraw Simualtor mask |
0 | 407 |
119 | 408 ; Check limits (130m and 0m) |
236 | 409 movlw LOW d'14000' ; Compare to 14bar=14000mbar (130m). |
410 subwf sim_pressure+0,W | |
119 | 411 movlw HIGH d'14000' |
236 | 412 subwfb sim_pressure+1,W |
413 bnc divemode_menu_simulator_common2 ; No-carry = borrow = not deeper | |
414 | |
119 | 415 ; Too deep, limit to 130m |
416 movlw LOW d'14000' | |
0 | 417 movwf sim_pressure+0 |
119 | 418 movlw HIGH d'14000' |
0 | 419 movwf sim_pressure+1 |
420 return | |
421 divemode_menu_simulator_common2: | |
236 | 422 movlw LOW d'1000' ; Compare to 1bar == 0m == 1000 mbar. |
423 subwf sim_pressure+0,W | |
0 | 424 movlw HIGH d'1000' |
236 | 425 subwfb sim_pressure+1,W |
426 btfsc STATUS,C ; No-carry = borrow = not deeper. | |
427 return ; Deeper than 0m == Ok. | |
428 | |
0 | 429 ; Too shallow, limit to 1m |
430 movlw LOW d'1000' | |
431 movwf sim_pressure+0 | |
432 movlw HIGH d'1000' | |
433 movwf sim_pressure+1 | |
434 return | |
435 | |
436 divemode_menu_simulator_m10: | |
437 movlw LOW d'1000' | |
438 subwf sim_pressure+0,F | |
439 movlw HIGH d'1000' | |
440 subwfb sim_pressure+1,F | |
441 movlw d'5' | |
442 movwf menupos ; reset cursor | |
443 bra divemode_menu_simulator_common | |
444 | |
445 divemode_menu_simulator_p10: | |
446 movlw LOW d'1000' | |
447 addwf sim_pressure+0,F | |
448 movlw HIGH d'1000' | |
449 addwfc sim_pressure+1,F | |
236 | 450 |
0 | 451 movlw d'4' |
452 movwf menupos ; reset cursor | |
453 bra divemode_menu_simulator_common | |
454 | |
352
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
455 divemode_menu_simulator_quit: |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
456 movlw LOW d'1000' |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
457 movwf sim_pressure+0 |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
458 movlw HIGH d'1000' |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
459 movwf sim_pressure+1 |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
460 bra timeout_divemenu2 ; quit menu |
544a96faa9f3
New "Quit sim" option in simulated dive mode, CF02 now allows more then 240seconds, Bugfix with runtime=1min in runtime simulator
Heinrichsweikamp
parents:
337
diff
changeset
|
461 |
0 | 462 divemode_menu_simulator_p1: |
463 movlw d'100' | |
464 addwf sim_pressure+0,F | |
465 movlw d'0' | |
466 addwfc sim_pressure+1,F | |
467 movlw d'2' | |
468 movwf menupos ; reset cursor | |
469 bra divemode_menu_simulator_common | |
470 | |
471 divemode_menu_simulator_m1: | |
472 movlw d'100' | |
473 subwf sim_pressure+0,F | |
474 movlw d'0' | |
475 subwfb sim_pressure+1,F | |
476 movlw d'3' | |
477 movwf menupos ; reset cursor | |
478 bra divemode_menu_simulator_common | |
479 | |
480 divemenu_see_decoplan: | |
481 bsf display_see_deco ; set flag | |
681 | 482 call DISP_clear_divemode_menu ; Clear Menu |
0 | 483 |
64 | 484 bcf last_ceiling_gf_shown ; Clear flag |
124 | 485 clrf decoplan_page ; Starts on page 0 |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
486 bra divemenu_see_decoplan2_1 |
0 | 487 |
488 divemenu_see_decoplan2: | |
124 | 489 incf decoplan_page,F |
64 | 490 btfsc last_ceiling_gf_shown ; last ceiling shown? |
491 bra divemenu_see_decoplan2_0 ; All done, clear and return | |
492 | |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
493 divemenu_see_decoplan2_1: |
64 | 494 clrf timeout_counter3 ; Clear timeout Divemode menu |
681 | 495 call DISP_decoplan ; Display the new screen |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
496 return |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
497 |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
498 divemenu_see_decoplan2_0: |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
499 bcf display_see_deco ; clear flag |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
500 bra timeout_divemenu2 ; quit menu! |
64 | 501 |
0 | 502 divemenu_set_xgas2: |
503 dcfsnz menupos,F | |
504 bra divemenu_set_xgas2_exit ; Use the gas6 configured and exit | |
505 dcfsnz menupos,F | |
506 bra divemenu_set_xgas2_o2plus ; Adjust O2+ | |
507 dcfsnz menupos,F | |
508 bra divemenu_set_xgas2_o2minus ; Adjust O2- | |
509 dcfsnz menupos,F | |
510 bra divemenu_set_xgas2_heplus ; Adjust He+ | |
511 dcfsnz menupos,F | |
512 bra divemenu_set_xgas2_heminus ; Adjust He- | |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
513 dcfsnz menupos,F |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
514 bra divemenu_de_activate ; Goto (De)active gases underwater list |
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
515 return ; should never be here |
0 | 516 |
517 divemenu_set_xgas2_heminus: | |
518 read_int_eeprom d'25' ; He value | |
519 movff EEDATA,lo | |
520 decf lo,F ; decrease He | |
521 movlw d'255' | |
522 cpfseq lo | |
523 bra divemenu_set_xgas2_heminus2 | |
524 incf lo,F ; limit to min=0 | |
525 divemenu_set_xgas2_heminus2: | |
526 movff lo, EEDATA | |
527 write_int_eeprom d'25' ; He Value | |
528 | |
681 | 529 call DISP_divemode_set_xgas ; Redraw menu |
0 | 530 movlw d'5' |
531 movwf menupos ; reset cursor | |
532 return | |
533 | |
534 divemenu_set_xgas2_heplus: | |
535 read_int_eeprom d'25' ; He value | |
536 movff EEDATA,lo | |
537 incf lo,F ; increase He | |
538 movlw d'101' | |
539 cpfseq lo | |
540 bra divemenu_set_xgas2_heplus2 | |
541 movlw d'4' ; O2 Limit | |
542 movwf lo | |
543 divemenu_set_xgas2_heplus2: ; test if O2+He>100... | |
544 read_int_eeprom d'24' ; O2 value | |
545 movf EEDATA,W | |
546 addwf lo,W ; add He value | |
547 movwf hi ; store in temp | |
548 movlw d'101' | |
549 cpfseq hi ; O2 and He > 100? | |
550 bra divemenu_set_xgas2_heplus3 ; No! | |
551 decf lo,F ; reduce He again = unchanged after operation | |
552 divemenu_set_xgas2_heplus3: ; save current value | |
553 movff lo, EEDATA | |
554 write_int_eeprom d'25' ; He Value | |
555 | |
681 | 556 call DISP_divemode_set_xgas ; Redraw menu |
0 | 557 movlw d'4' |
558 movwf menupos ; reset cursor | |
559 return | |
560 | |
561 divemenu_set_xgas2_o2minus: | |
562 read_int_eeprom d'24' ; O2 value | |
563 movff EEDATA,lo | |
564 decf lo,F ; decrease O2 | |
643 | 565 movlw d'0' |
0 | 566 cpfseq lo |
567 bra divemenu_set_xgas2_o2minus2 | |
643 | 568 read_int_eeprom d'25' ; Read He ratio |
569 movf EEDATA,W ; into WREG | |
570 sublw .100 ; 100% total... | |
571 movwf lo ; Set to Max. value | |
0 | 572 divemenu_set_xgas2_o2minus2: |
573 movff lo, EEDATA | |
574 write_int_eeprom d'24' ; O2 Value | |
575 | |
681 | 576 call DISP_divemode_set_xgas ; Redraw menu |
0 | 577 movlw d'3' |
578 movwf menupos ; reset cursor | |
579 return | |
580 | |
581 divemenu_set_xgas2_o2plus: | |
582 read_int_eeprom d'24' ; O2 value | |
583 movff EEDATA,lo | |
584 incf lo,F ; increase O2 | |
585 movlw d'101' | |
586 cpfseq lo | |
587 bra divemenu_set_xgas2_o2plus2 | |
588 movlw d'5' ; O2 limit | |
589 movwf lo | |
590 divemenu_set_xgas2_o2plus2: ; test if O2+He>100... | |
591 read_int_eeprom d'25' ; He value | |
592 movf EEDATA,W | |
593 addwf lo,W ; add O2 value | |
594 movwf hi ; store in temp | |
643 | 595 movlw d'100' |
596 cpfsgt hi ; O2 and He > 100? | |
0 | 597 bra divemenu_set_xgas2_o2plus3 ; No! |
598 decf lo,F ; reduce O2 again = unchanged after operation | |
599 divemenu_set_xgas2_o2plus3: ; save current value | |
600 movff lo, EEDATA | |
601 write_int_eeprom d'24' ; O2 Value | |
602 | |
681 | 603 call DISP_divemode_set_xgas ; Redraw menu |
0 | 604 movlw d'2' |
605 movwf menupos ; reset cursor | |
606 return | |
607 | |
608 divemenu_set_xgas2_exit: | |
609 read_int_eeprom d'25' ; Read He ratio | |
610 movff EEDATA,char_I_He_ratio ; And copy into hold register | |
611 | |
612 read_int_eeprom d'24' ; Read O2 ratio | |
613 movff EEDATA, char_I_O2_ratio ; O2 ratio | |
614 movff char_I_He_ratio, wait_temp ; copy into bank1 register | |
615 bsf STATUS,C ; | |
616 movlw d'100' ; 100% | |
617 subfwb wait_temp,W ; minus He | |
618 subfwb EEDATA,F ; minus O2 | |
619 movff EEDATA, char_I_N2_ratio ; = N2! | |
620 bsf manual_gas_changed ; set event flag | |
621 bsf event_occured ; set global event flag | |
665
259e4c1bf3c2
grey-out TTS and ceiling after gas change (until new plan is ready)
heinrichsweikamp
parents:
663
diff
changeset
|
622 bsf decoplan_invalid ; The decoplan needs to updated |
663
64194a3c8d5b
Restart building decoplan after gas change
heinrichsweikamp
parents:
647
diff
changeset
|
623 clrf WREG |
64194a3c8d5b
Restart building decoplan after gas change
heinrichsweikamp
parents:
647
diff
changeset
|
624 movff WREG,char_O_deco_status ; Restart decoplan computation mH |
730 | 625 bsf is_bailout ;=1: CC mode, but bailout active! |
626 bsf store_bailout_event | |
681 | 627 clrf lo ; clear Setpoint, DISP_const_ppO2_value now displayes "Bail" |
353
b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
JeanDo
parents:
337
diff
changeset
|
628 movff lo,char_I_const_ppO2 |
b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
JeanDo
parents:
337
diff
changeset
|
629 movlw 6 |
b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
JeanDo
parents:
337
diff
changeset
|
630 movff WREG,char_I_current_gas ; Current gas is Gas6 (manual setting). |
0 | 631 bra timeout_divemenu2 ; quit underwater menu! |
632 | |
633 divemenu_set_gas: | |
634 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? | |
17 | 635 bra divemenu_set_setpoint ; Yes, display SetPoint list |
0 | 636 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
637 divemenu_set_gas_2: |
0 | 638 bsf display_set_gas ; set flag |
681 | 639 call DISP_clear_divemode_menu ; Clear Menu |
640 call DISP_gas_list ; Display all 5 gases | |
629
e755ed869a3b
2.51beta release - remove of MPLAB 8 workspace. Use of MPLAB X IDE recommended
heinrichsweikamp
parents:
598
diff
changeset
|
641 |
e755ed869a3b
2.51beta release - remove of MPLAB 8 workspace. Use of MPLAB X IDE recommended
heinrichsweikamp
parents:
598
diff
changeset
|
642 movlw d'1' ; Reset cursor |
e755ed869a3b
2.51beta release - remove of MPLAB 8 workspace. Use of MPLAB X IDE recommended
heinrichsweikamp
parents:
598
diff
changeset
|
643 btfsc better_gas_available ;=1: A better gas is available and a gas change is advised in divemode |
e755ed869a3b
2.51beta release - remove of MPLAB 8 workspace. Use of MPLAB X IDE recommended
heinrichsweikamp
parents:
598
diff
changeset
|
644 movf better_gas_number,W ; better gas 1-5 |
0 | 645 movwf menupos ; reset cursor |
681 | 646 call DISP_divemenu_cursor ; update cursor |
647 call DISP_show_change_depth ; And show the first change depth | |
0 | 648 return |
649 | |
650 divemenu_set_setpoint: | |
651 bsf display_set_setpoint ; set flag | |
652 bsf display_set_gas ; set flag | |
653 | |
681 | 654 call DISP_clear_divemode_menu ; Clear Menu |
655 call DISP_splist_start ; Display SetPoints | |
647 | 656 DISPLAYTEXT d'137' ; Bailout (as a sub-menu) |
657 DISPLAYTEXT d'232' ; Diluent (as a sub-menu) | |
0 | 658 movlw d'1' |
659 movwf menupos ; reset cursor | |
681 | 660 call DISP_divemenu_cursor ; update cursor |
0 | 661 return |
662 | |
663 | |
664 divemenu_set_gas2: | |
665 btfsc select_bailoutgas ; Are we in the Bailout list? | |
666 bra divemenu_set_gas2a ; Yes, choose gas | |
667 | |
668 btfss FLAG_const_ppO2_mode ; are we in ppO2 mode? | |
669 bra divemenu_set_gas2a ; no, choose gas | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
670 ; Yes, so select SP 1-3 |
3 | 671 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
672 divemenu_set_gas1: |
525 | 673 movlw d'1' |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
674 cpfseq menupos ; At the "Bailout" position? |
647 | 675 bra divemenu_set_gas1b ; No, select SetPoint 1-3 or Diluent |
734 | 676 |
677 bsf select_bailoutgas ; Set Flag | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
678 bcf display_set_setpoint ; Clear Flag |
734 | 679 btfsc is_bailout ; Already in bailout? |
680 bra divemenu_set_gas_2 ; Yes. | |
681 | |
682 ;Setup first gas as better gas | |
683 bsf better_gas_available | |
684 read_int_eeprom .33 ; 1-5 | |
685 movff EEDATA,better_gas_number | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
686 bra divemenu_set_gas_2 ; Configure the extra gas / Select Bailout |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
687 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
688 divemenu_set_gas1b: |
734 | 689 bcf is_bailout ;=1: CC mode, but bailout active! |
690 call DISP_show_ppO2_clear ; Clear ppO2 value | |
647 | 691 movlw d'5' |
692 cpfseq menupos ; At the "Diluent" position? | |
693 bra divemenu_set_gas1c ; No, select SetPoint 1-3 | |
694 ; Choose Diluent from list | |
695 bcf display_set_setpoint ; Clear Flag | |
696 bcf display_set_gas ; Clear Flag | |
697 bsf display_set_diluent ; Set Flag | |
681 | 698 call DISP_clear_divemode_menu ; Clear Menu |
699 call DISP_diluent_list ; Display all 5 diluents | |
647 | 700 movlw d'1' ; Reset cursor |
701 movwf menupos ; reset cursor | |
681 | 702 call DISP_divemenu_cursor ; update cursor |
647 | 703 return |
704 | |
705 divemode_set_diluent2: ; Choose diluent #menupos | |
706 movff menupos,active_diluent ; 1-5 | |
707 bra divemenu_set_gas1d ; Continue here... | |
708 | |
709 divemenu_set_gas1c: | |
525 | 710 decf menupos,F ; Adjust 1-3 to 0-2... |
0 | 711 movlw d'35' ; offset in memory |
712 addwf menupos,W ; add SP number 0-2 | |
713 movwf EEADR | |
714 call read_eeprom ; Read SetPoint | |
715 movff EEDATA, char_I_const_ppO2 ; Use SetPoint | |
4 | 716 movff EEDATA, ppO2_setpoint_store ; Store also in this byte... |
274
a728b4a1b660
Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents:
236
diff
changeset
|
717 bsf setpoint_changed |
407 | 718 bsf event_occured ; set global event flag |
647 | 719 |
720 divemenu_set_gas1d: ; (Re-)Set Diluent | |
721 decf active_diluent,W ; 0-4 -> WREG mH | |
685
aebb6d039249
Use 4byte in EEPROM for diluents (Same as OC gases)
heinrichsweikamp
parents:
681
diff
changeset
|
722 mullw .4 |
647 | 723 movf PRODL,W |
685
aebb6d039249
Use 4byte in EEPROM for diluents (Same as OC gases)
heinrichsweikamp
parents:
681
diff
changeset
|
724 addlw d'98' |
647 | 725 movwf EEADR |
726 call read_eeprom ; Read He | |
727 movff EEDATA,char_I_He_ratio ; And copy into hold register | |
728 decf active_diluent,W ; 0-4 -> WREG | |
685
aebb6d039249
Use 4byte in EEPROM for diluents (Same as OC gases)
heinrichsweikamp
parents:
681
diff
changeset
|
729 mullw .4 |
647 | 730 movf PRODL,W |
685
aebb6d039249
Use 4byte in EEPROM for diluents (Same as OC gases)
heinrichsweikamp
parents:
681
diff
changeset
|
731 addlw d'97' |
647 | 732 movwf EEADR |
733 call read_eeprom ; Read O2 | |
734 movff EEDATA, char_I_O2_ratio ; O2 ratio | |
735 movff char_I_He_ratio, wait_temp ; copy into bank1 register | |
736 bsf STATUS,C ; Borrow bit | |
737 movlw d'100' ; 100% | |
738 subfwb wait_temp,W ; minus He | |
739 bsf STATUS,C ; Borrow bit | |
740 subfwb EEDATA,W ; minus O2 | |
741 movff WREG, char_I_N2_ratio ; = N2! | |
407 | 742 bra timeout_divemenu2 ; quit menu! |
0 | 743 |
744 divemenu_set_gas1a: | |
745 bcf display_set_setpoint ; Clear Display Flag | |
746 bsf stored_gas_changed ; set event flag | |
747 bsf event_occured ; set global event flag | |
665
259e4c1bf3c2
grey-out TTS and ceiling after gas change (until new plan is ready)
heinrichsweikamp
parents:
663
diff
changeset
|
748 bsf decoplan_invalid ; The decoplan needs to updated |
780 | 749 btfsc better_gas_available ; If a gas change was planned... |
750 bsf gaschange_cnt_active ; Show the countdown | |
663
64194a3c8d5b
Restart building decoplan after gas change
heinrichsweikamp
parents:
647
diff
changeset
|
751 clrf WREG |
64194a3c8d5b
Restart building decoplan after gas change
heinrichsweikamp
parents:
647
diff
changeset
|
752 movff WREG,char_O_deco_status ; Restart decoplan computation mH |
0 | 753 bra timeout_divemenu2 ; quit menu! |
754 | |
755 divemenu_set_gas2a: | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
756 movlw d'6' |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
757 cpfseq menupos ; At the "Gas 6.." position? |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
758 bra divemenu_set_gas2b ; No, select Gas1-5 (Stored in Menupos) |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
759 bra divemode_set_xgas ; Configure the extra gas |
353
b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
JeanDo
parents:
337
diff
changeset
|
760 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
761 divemenu_set_gas2b: |
788 | 762 btfss FLAG_const_ppO2_mode ; In CCR mode ? |
763 bra divemenu_set_gas2c ; No | |
730 | 764 bsf is_bailout ;=1: CC mode, but bailout active! |
765 bsf store_bailout_event | |
766 bsf event_occured ; set global event flag | |
788 | 767 divemenu_set_gas2c: |
681 | 768 clrf lo ; clear Setpoint, DISP_const_ppO2_value now displayes "Bail" |
0 | 769 movff lo,char_I_const_ppO2 |
770 | |
771 bcf display_set_gas ; clear flag | |
772 movff menupos,active_gas ; copy into active gas register | |
773 decf menupos,W ; # of selected gas (0-4) | |
774 mullw d'4' ; times 4... | |
775 movf PRODL,W ; | |
776 addlw d'7' ; +7 = address for He ratio | |
777 movwf EEADR | |
778 call read_eeprom ; Read He ratio | |
779 movff EEDATA,char_I_He_ratio ; And copy into hold register | |
780 | |
781 decf menupos,W ; # of selected gas (0-4) | |
782 mullw d'4' ; times 4... | |
783 movf PRODL,W ; | |
784 addlw d'6' ; +6 = address for O2 ratio | |
785 movwf EEADR | |
786 call read_eeprom ; Read O2 ratio | |
787 movff EEDATA, char_I_O2_ratio ; O2 ratio | |
788 movff char_I_He_ratio, wait_temp ; copy into bank1 register | |
789 bsf STATUS,C ; | |
790 movlw d'100' ; 100% | |
791 subfwb wait_temp,W ; minus He | |
792 subfwb EEDATA,F ; minus O2 | |
793 movff EEDATA, char_I_N2_ratio ; = N2! | |
794 bsf stored_gas_changed ; set event flag | |
795 bsf event_occured ; set global event flag | |
780 | 796 btfsc better_gas_available ; If a gas change was planned... |
797 bsf gaschange_cnt_active ; Show the countdown | |
665
259e4c1bf3c2
grey-out TTS and ceiling after gas change (until new plan is ready)
heinrichsweikamp
parents:
663
diff
changeset
|
798 bsf decoplan_invalid ; The decoplan needs to updated |
663
64194a3c8d5b
Restart building decoplan after gas change
heinrichsweikamp
parents:
647
diff
changeset
|
799 clrf WREG |
64194a3c8d5b
Restart building decoplan after gas change
heinrichsweikamp
parents:
647
diff
changeset
|
800 movff WREG,char_O_deco_status ; Restart decoplan computation mH |
353
b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
JeanDo
parents:
337
diff
changeset
|
801 |
b5b030c1ae7e
Avoid spurious switch-depth stops with 3 or more gas.
JeanDo
parents:
337
diff
changeset
|
802 movff menupos,char_I_current_gas ; Inform deco code too. |
0 | 803 bra timeout_divemenu2 ; quit menu! |
804 | |
805 timeout_divemenu: | |
806 btfss menubit ; is the Dive mode menu displayed? | |
807 return ; No | |
808 | |
809 btfsc display_set_simulator ; Is the Simulator Mask active? | |
810 bra timeout_divemenu6 ; Yes, update Simulator mask | |
811 | |
812 btfss display_see_deco ; Is the decoplan active? | |
813 bra timeout_divemenu1 ; No, skip updating the decoplan | |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
814 bra timeout_divemenu3 ; Yes... |
0 | 815 |
816 timeout_divemenu1: | |
817 incf timeout_counter3,F ; increase timeout_counter3 | |
818 GETCUSTOM8 d'10' ; loads timeout_divemenu into WREG | |
819 cpfsgt timeout_counter3 ; ... longer then timeout_divemenu | |
820 return ; No! | |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
821 |
0 | 822 timeout_divemenu2: ; quit divemode menu |
823 ; Restore some outputs | |
124 | 824 clrf decoplan_page ; Page 0-1 of deco list |
681 | 825 call DISP_clear_divemode_menu; Clear dive mode menu |
115 | 826 |
827 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode | |
673 | 828 bra timeout_divemenu2b ; skip! |
115 | 829 btfsc gauge_mode ; Ignore in Gauge mode |
673 | 830 bra timeout_divemenu2b ; skip! |
115 | 831 |
280 | 832 bcf menubit |
0 | 833 btfsc dekostop_active |
681 | 834 call DISP_display_deko_mask ; clear nostop time, display decodata |
0 | 835 btfss dekostop_active |
681 | 836 call DISP_display_ndl_mask ; Clear deco data, display nostop time |
0 | 837 |
725
b5ffde7e569e
show old decoplan after gas change until new decoplan is ready
heinrichsweikamp
parents:
685
diff
changeset
|
838 ; btfsc decoplan_invalid ; The decoplan needs to updated |
b5ffde7e569e
show old decoplan after gas change until new decoplan is ready
heinrichsweikamp
parents:
685
diff
changeset
|
839 ; bra timeout_divemenu2a ; Yes, skip update |
673 | 840 |
281 | 841 btfsc dekostop_active |
681 | 842 call DISP_display_deko ; Update deco display at once |
281 | 843 btfss dekostop_active |
681 | 844 call DISP_display_ndl ; Update NDL display at once |
281 | 845 |
673 | 846 timeout_divemenu2a: |
598
f3735da18809
NEW: CF65: Show a safety stop for no-deco dives
heinrichsweikamp
parents:
576
diff
changeset
|
847 btfsc safety_stop_active |
f3735da18809
NEW: CF65: Show a safety stop for no-deco dives
heinrichsweikamp
parents:
576
diff
changeset
|
848 bcf safety_stop_active ; Clear flag to rebuild the safety stop |
f3735da18809
NEW: CF65: Show a safety stop for no-deco dives
heinrichsweikamp
parents:
576
diff
changeset
|
849 |
673 | 850 timeout_divemenu2b: |
0 | 851 bcf menubit |
852 bcf premenu ; Yes, clear flags and menu, display dive time and mask again | |
681 | 853 call DISP_active_gas_divemode; Display gas, if required |
854 call DISP_divemode_mask ; Display mask | |
855 call DISP_divemins ; Display (new) divetime! | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
87
diff
changeset
|
856 call customview_mask ; Redraw current customview mask |
0 | 857 clrf timeout_counter3 ; Also clear timeout |
858 bcf display_see_deco ; clear all display flags | |
859 bcf display_set_gas | |
860 bcf display_set_xgas | |
861 bcf display_set_setpoint | |
862 bcf display_set_simulator | |
219
b6dd54b3567c
NEW: De/Activate gases underwater (Gaslist -> Gas6.. -> Actve?)
heinrichsweikamp
parents:
169
diff
changeset
|
863 bcf display_set_active |
647 | 864 bcf display_set_diluent |
286 | 865 bcf menu3_active |
576 | 866 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
0 | 867 return |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
868 |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
869 ; Re-Draw current page of decoplan (may have more stops) |
0 | 870 timeout_divemenu3: |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
871 movff char_O_deco_status,WREG ; Get last computation state (BANK safe) |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
872 iorwf WREG ; Is it zero ? |
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
873 btfsc STATUS,Z |
681 | 874 call DISP_decoplan ; Yes: new data available. |
0 | 875 bra timeout_divemenu1 ; Check timeout |
169
e26f49674956
Merge decoplan display for both GF and Buhlmann models.
JeanDo
parents:
124
diff
changeset
|
876 |
0 | 877 timeout_divemenu6: |
878 ; Update Simulator Mask | |
286 | 879 bsf menu3_active ; So "+1" is accessible at all times |
681 | 880 call DISP_divemode_simulator_mask; Show mask |
881 call DISP_divemenu_cursor ; update cursor | |
0 | 882 bra timeout_divemenu1 ; Check timeout |